mirror of
https://github.com/penpot/penpot.git
synced 2025-04-13 15:31:26 -05:00
🎉 Merge tokens-studio/develoo into develop
commit82cdf41cc0
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Jan 9 18:43:35 2025 +0100 💄 Fix lint commit29a9d39ecb
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Jan 9 18:34:07 2025 +0100 🔧 Disable broken test commit41e6471cc6
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Jan 9 18:24:06 2025 +0100 🐛 Small fix commit6a68411120
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Jan 9 18:06:23 2025 +0100 ✨ Some code enhancements commit170a51f9e5
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Jan 9 14:52:24 2025 +0100 🔧 Fix merge commite9e468ee37
Merge:d980ff05c
e5f865099
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Jan 9 14:27:19 2025 +0100 Merge remote-tracking branch 'origin/develop' into token-studio-develop commite5f8650994
Merge:7e71a26c5
74f807d53
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Jan 9 13:42:00 2025 +0100 Merge branch 'develop' of github.com:penpot/penpot into develop commitd980ff05cd
Author: Xaviju <xaviju@gmail.com> Date: Tue Jan 7 12:28:41 2025 +0100 ♻️ refactor swatch component commit0c80bf76b8
Merge:a5a1d3af3
97c35a8f9
Author: Eva Marco <evamarcod@gmail.com> Date: Thu Jan 9 09:52:53 2025 +0100 Merge pull request #406 from tokens-studio/eva-token-bugfixing Eva token bugfixing commita5a1d3af3c
Author: Eva Marco <evamarcod@gmail.com> Date: Wed Jan 8 12:25:48 2025 +0100 🐛 Fix open border radius on token applied commit97c35a8f9b
Author: Eva Marco <evamarcod@gmail.com> Date: Wed Jan 8 14:28:33 2025 +0100 🐛 Fix token pill on multiselect commit1f5903fa16
Author: Eva Marco <evamarcod@gmail.com> Date: Wed Jan 8 14:28:20 2025 +0100 🐛 Fix partially applied token on Border radius commit791cb7e5fe
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jan 2 09:09:11 2025 +0100 ✨ Implement set group toggling commitd41b4b4e51
Author: Eva Marco <evamarcod@gmail.com> Date: Tue Jan 7 11:12:05 2025 +0100 ♻️ Refactor border radius tooltips commit8a2754cae4
Merge:3bd139286
328cc74c2
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Jan 7 11:04:16 2025 +0100 Merge pull request #402 from tokens-studio/move-sizing-before 💄 Move spacing before sizing commit328cc74c2c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jan 7 10:55:08 2025 +0100 💄 Move spacing before sizing commit3bd139286a
Merge:a9e20391d
1d608edb2
Author: Eva Marco <evamarcod@gmail.com> Date: Fri Jan 3 11:21:12 2025 +0100 Merge pull request #399 from tokens-studio/eva-fix-border-radius-tooltip 🐛 Fix border radius tooltip and padding on token pills commita9e20391d9
Merge:6284f42a7
2a1f76ad1
Author: Eva Marco <evamarcod@gmail.com> Date: Fri Jan 3 11:20:58 2025 +0100 Merge pull request #353 from tokens-studio/eva-fix-context-menu ♻️ Fix context menu commit1d608edb27
Author: Eva Marco <evamarcod@gmail.com> Date: Thu Jan 2 14:02:44 2025 +0100 🐛 Fix layout error and tooltip commit2a1f76ad1a
Author: Eva Marco <evamarcod@gmail.com> Date: Fri Nov 22 13:54:41 2024 +0100 ♻️ Fix context menu commit6284f42a70
Merge:272b60969
4e22a7c03
Author: Eva Marco <evamarcod@gmail.com> Date: Thu Jan 2 10:36:21 2025 +0100 Merge pull request #389 from tokens-studio/eva-fix-double-click-cancel 🐛 Fix double click when canceling a modal commit272b609691
Merge:71f656cc5
f867cb110
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu Jan 2 08:53:13 2025 +0100 Merge pull request #392 from tokens-studio/andrei/338-fix-positioning-of-a-stroke-created-by-token-application ✨ Change default storke alignment if it's created by token commitf867cb110f
Author: Andrey Fedorov <oran9e.red@gmail.com> Date: Wed Dec 18 10:02:31 2024 +0100 ✨ Fix stroke alignment test commitf1034c6bcb
Author: Andrey Fedorov <oran9e.red@gmail.com> Date: Wed Dec 18 09:53:55 2024 +0100 ✨ Change default storke alignment if it's created by token application commit71f656cc5e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Dec 13 15:45:25 2024 +0100 🐛 Fix sets breaking from merge commitfa642d7717
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Dec 13 13:07:34 2024 +0100 🐛 Fix CI breaking commit17a873e9f8
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Fri Dec 13 15:01:22 2024 +0100 🔧 Restore some things broken in merge commitd70b101aa1
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Fri Dec 13 13:12:21 2024 +0100 🔧 A little cleanup commitd453b584ee
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Fri Dec 13 11:30:21 2024 +0100 🎉 Add script to un CI tests in dev env commit78819c68c9
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Fri Dec 13 11:19:18 2024 +0100 🐛 Fix border radius and fills tokens commit4e22a7c039
Author: Eva Marco <evamarcod@gmail.com> Date: Fri Dec 13 10:30:32 2024 +0100 🐛 Fix double click when canceling a modal commitcd6d5491fa
Merge:46a60bc71
7e71a26c5
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Dec 12 17:16:07 2024 +0100 Merge remote-tracking branch 'origin/develop' into token-studio-develop commit7e71a26c50
Merge:4f845b5c4
1c76587d7
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Dec 12 11:44:24 2024 +0100 Merge branch 'develop' of github.com:penpot/penpot into develop commit46a60bc714
Merge:797374b2b
d899fd687
Author: Eva Marco <evamarcod@gmail.com> Date: Thu Dec 12 10:12:42 2024 +0100 Merge pull request #348 from tokens-studio/eva-token-pill ✨ Add token status pills commit797374b2ba
Merge:edfa80d5b
a7c59bb41
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Dec 11 17:25:56 2024 +0100 Merge pull request #383 from tokens-studio/andrei/export-import-themes ✨ Import/Export: Themes #306 [WIP] commita7c59bb413
Merge:2264efa1c
90e0021ce
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Dec 11 17:25:35 2024 +0100 Merge pull request #384 from tokens-studio/andrei/369-export-on-file-without-tokens-crashes 🐛 Export on file without tokens crashes [WIP] commit2264efa1cd
Author: Andrey Fedorov <oran9e.red@gmail.com> Date: Wed Dec 11 17:13:23 2024 +0100 ✨ Exclude hidden theme commit90e0021cec
Author: Andrey Fedorov <oran9e.red@gmail.com> Date: Wed Dec 11 13:18:48 2024 +0100 🐛 Fix export crash when there's no tokens in the project commitedfa80d5b1
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Wed Dec 11 14:25:24 2024 +0100 🎉 Automatically unapply tokens when user changes attr values commit7e8de9aa24
Author: Andrey Fedorov <oran9e.red@gmail.com> Date: Tue Dec 10 12:01:40 2024 +0100 ✨ Fix encoding/decoding tests commitd0ad149e20
Author: Andrey Fedorov <oran9e.red@gmail.com> Date: Tue Dec 10 07:54:48 2024 +0100 ✨ Add themes data to decoding commit19ce9e8ce3
Author: Andrey Fedorov <oran9e.red@gmail.com> Date: Tue Dec 10 11:55:33 2024 +0100 ✨ Include themes to dtcg encoding commit9d67d007fb
Author: Andrey Fedorov <oran9e.red@gmail.com> Date: Mon Dec 9 16:32:14 2024 +0100 📎 Remove trailing space commit05ec84ca1b
Merge:15ba0746c
78d743406
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Dec 10 17:45:55 2024 +0100 Merge pull request #381 from tokens-studio/florian/rename-set-groups ✨ Token set group renaming commit78d743406b
Merge:85ed6f140
15ba0746c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 10 17:31:38 2024 +0100 Merge remote-tracking branch 'origin/token-studio-develop' into florian/rename-set-groups commit15ba0746c6
Merge:88fdafa2c
6e7a5e5c7
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Dec 10 17:23:09 2024 +0100 Merge pull request #379 from tokens-studio/florian/computed-set-checkmark Display computed checkmark next to token set groups commit6e7a5e5c7f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 10 17:15:40 2024 +0100 ♻ Use dm/str commit88fdafa2c6
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Mon Dec 2 15:50:20 2024 +0100 🎉 Add tests to check all types of tokens commitd51a2640bf
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Nov 28 16:36:10 2024 +0100 🐛 Avoid marking copies touched when changing token values commit99c30dd44f
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Tue Nov 26 19:40:21 2024 +0100 🎉 Add frontend unit tests commitddec03966d
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Tue Nov 26 11:23:02 2024 +0100 🔧 Partial refactor to move things to common.types commitd378937a37
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Nov 21 16:39:43 2024 +0100 🎉 Set touched groups when changing tokens in copies commit6077ba6690
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Tue Nov 19 16:14:02 2024 +0100 ✨ Synchronize tokens in components commit85ed6f1409
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 10 14:50:34 2024 +0100 ♻ Unique naming commitd546bc04f8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 10 14:49:30 2024 +0100 ♻ Update docstring commitd899fd687f
Author: Eva Marco <evamarcod@gmail.com> Date: Tue Nov 19 08:37:32 2024 +0100 ✨ Add token status pills commit5bac53ea03
Merge:aa292e482
2a766a719
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 10 14:29:00 2024 +0100 Merge remote-tracking branch 'origin/token-studio-develop' into florian/computed-set-checkmark commitaa292e4829
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 10 14:04:32 2024 +0100 🐛 Fix missing active sets in set groups showing partial selection commit5ff3469da7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 10 14:04:11 2024 +0100 ♻ Accessible checkbox commitddc30b7a3c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Dec 9 15:09:44 2024 +0100 ✨ Rename set groups commit2a766a7190
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Dec 9 11:52:08 2024 +0100 ♻ Fix lint commit82ce61ef49
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Dec 9 11:44:16 2024 +0100 ♻ Fix lint commit09e5d88835
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Dec 4 17:36:58 2024 +0100 ♻ Cleanup commit8b569005e1
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Dec 4 17:16:35 2024 +0100 ✨ Display active state of children checkmark next to set groups in themes modal commit07e3f581d3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Dec 4 16:58:43 2024 +0100 ✨ Display active state of children checkmark next to set groups commit9318c10172
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Dec 4 16:21:09 2024 +0100 ✨ Add function to compute active state of nested sets commitc6f643b7d5
Merge:bb337361b
b9ada1f52
Author: Eva Marco <evamarcod@gmail.com> Date: Wed Dec 4 15:53:07 2024 +0100 Merge pull request #377 from tokens-studio/florian/fix-color-token-bug Fix color token bug commitb9ada1f520
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 3 17:58:30 2024 +0100 🐛 Fix color token only applying fill commit4a06cc04d8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 3 17:42:40 2024 +0100 ✨ Add test for applying colors commitbb337361b8
Merge:1a2fb4e29
ab0cd29af
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Dec 3 17:11:02 2024 +0100 Merge pull request #371 from tokens-studio/rebase-ui-updates Sets UI Updates commitab0cd29af9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 3 17:08:29 2024 +0100 🚧 Add todo commitb875804bce
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 3 17:07:46 2024 +0100 ♻ Use use-fn commit656afa8a35
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 3 15:48:54 2024 +0100 ♻ PR Feedback commit1a2fb4e299
Merge:f0735417f
1a1a535e4
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Dec 3 12:47:20 2024 +0100 Merge pull request #372 from tokens-studio/andrei/fix-token-context-menu-order ✨ Reorder token context menu commit1a1a535e47
Author: Andrey Fedorov <oran9e.red@gmail.com> Date: Tue Dec 3 11:19:49 2024 +0100 ✨ Reorder token context menu commit53229c03d6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 3 11:13:51 2024 +0100 ✨ Add context menu item for set groups commitd34c88b6e4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Dec 3 10:01:18 2024 +0100 🐛 Fix selecting a set in the sidebar toggling the active state commit1f6512cff0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 28 10:16:30 2024 +0100 ♻ Remove unused ref commitc9414824a5
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 28 09:46:21 2024 +0100 ♻ Remove unused token files commit384616c9a8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 28 09:32:11 2024 +0100 ♻ Rename to match ITokenSet glossary commit42ee08445b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 28 09:24:16 2024 +0100 💄 Make sets section not collapsable anymore commit27d0f0a7bc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 28 09:16:38 2024 +0100 🐛 Fix collapse button triggering rename commita0b2b4c55f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 28 09:11:53 2024 +0100 💄 Remove folder icon commit9c7e15f43f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 28 09:09:56 2024 +0100 💄 Disable group selection commitf0735417f4
Author: Eva Marco <evamarcod@gmail.com> Date: Mon Nov 25 14:11:49 2024 +0100 ♻️ Update download button icon commitc8146cf0fe
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Mon Nov 25 16:50:08 2024 +0100 🐛 Fix edit theme form auto submitting when pressing checkbox (II) commit030f074285
Merge:b0252eded
0ea226ede
Author: Florian Schrödl <contact@florianschroedl.com> Date: Fri Nov 29 12:39:14 2024 +0100 Merge pull request #365 from tokens-studio/sets-naming Rename sets paths/name to match guidelines commit0ea226edec
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 28 14:15:47 2024 +0100 Naming commit997cb59ce3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 28 14:13:28 2024 +0100 Naming commita28ed69113
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 28 13:59:47 2024 +0100 Fix arg commit5cbcdb77c9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Nov 27 11:29:04 2024 +0100 Fix token set deletion commit44105c2be2
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Nov 27 10:48:11 2024 +0100 Rename selected-token-set-id -> selected-token-set-path commitf2c6109dd9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Nov 27 10:33:48 2024 +0100 Rename commitffe2abc992
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Nov 27 10:22:23 2024 +0100 Renaming commit8772cdf423
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Nov 26 10:59:40 2024 +0100 Add cancel test commit7bce4ab425
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Nov 26 10:56:52 2024 +0100 Add integration tests for creating sets commitb5110c2222
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Nov 26 09:21:01 2024 +0100 ♻ Pass elements directly commit18bb717699
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Nov 26 09:04:01 2024 +0100 Adapt naming commitd3b88446e2
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Nov 26 08:34:19 2024 +0100 📚 Add glossary commitb0252eded7
Merge:db01b6690
ca632c984
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Nov 26 16:14:57 2024 +0100 Merge pull request #359 from tokens-studio/pr-source-2 Test deploy 2 commitca632c9849
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Nov 26 15:09:49 2024 +0100 Empty commitdb01b66905
Author: Juanfran <juanfran.ag@gmail.com> Date: Tue Nov 19 13:59:54 2024 +0100 🐛 Fix modal overflow and column gap #9055 commit97e5232b7d
Merge:76b276073
e4460acfa
Author: Florian Schrödl <contact@florianschroedl.com> Date: Mon Nov 25 16:51:48 2024 +0100 Merge pull request #352 from tokens-studio/e2e-tests ✨ Adds token creation e2e test commite4460acfae
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Nov 25 16:41:02 2024 +0100 ♻ Extract common token setup logic, fix selector commit85fa635f66
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Nov 25 11:10:17 2024 +0100 ✨ Check for auto-created set commit439ca4b52c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Nov 12 17:26:11 2024 +0100 ✨ Add token creation test commit76b2760737
Author: Xaviju <xaviju@gmail.com> Date: Fri Nov 22 12:47:53 2024 +0100 🐛 fix token input color swatch commit2464ae1eef
Merge:0294695ac
f79ccd52a
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu Nov 21 15:55:07 2024 +0100 Merge pull request #350 from tokens-studio/sets-reference-bug Token Resolving Issues commitf79ccd52aa
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 21 15:42:20 2024 +0100 🐛 Fix shape color being removed for missing token references commit584f8be751
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 21 15:39:19 2024 +0100 🐛 Show fallback color for selected inactive set commite7b07715a4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 21 15:38:53 2024 +0100 🐛 Fix references between separate sets commit805432faec
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Nov 21 15:04:33 2024 +0100 ⬆ Upgrade style-dictionary@4.0.0-prerelease.36 commit0294695acf
Author: Xaviju <xaviju@gmail.com> Date: Thu Nov 21 13:52:57 2024 +0100 💄 add removed labeled input CSS and improve component slot commit0a70f3ccfc
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Nov 21 11:47:11 2024 +0100 🔧 Pass tests in the CI commitddbe53a0ee
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Nov 21 11:25:04 2024 +0100 💄 Fix linter errors commitbf1efdc4b6
Merge:faee45de4
7b57509d2
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Nov 21 09:08:27 2024 +0100 Merge remote-tracking branch 'origin/develop' into token-studio-develop commitfaee45de47
Merge:133759de9
f1bda7b1f
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Nov 20 16:26:21 2024 +0100 Merge pull request #336 from tokens-studio/develop-merge Develop Sync commitf1bda7b1f1
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Nov 20 16:12:21 2024 +0100 🐛 Fix dropdown menu position out of bounds commit75a044e453
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Nov 20 16:03:54 2024 +0100 🐛 Fix token deletion commit9819239d58
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Nov 20 15:53:46 2024 +0100 🐛 Fix new set not working with no sets commit228080043f
Merge:133759de9
59fdf64c6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Nov 20 14:51:29 2024 +0100 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commit133759de97
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Nov 20 14:30:56 2024 +0100 🐛 Fix set creation commit3745475252
Merge:1d2c7dd20
58278867c
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Nov 20 14:00:28 2024 +0100 Merge pull request #327 from tokens-studio/named-set-groups-3 Sets & Sets Group UI commit58278867cc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Nov 20 13:59:09 2024 +0100 🐛 Fix sets tree not working in themes modal commit3afdc72a4e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Nov 20 13:46:01 2024 +0100 ⏪ Restore new sets input commita19d85fb10
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Nov 19 16:43:37 2024 +0100 ✨ Render sets and set groups tree commit1d2c7dd20e
Merge:16a90f5e1
a77dd138b
Author: Eva Marco <evamarcod@gmail.com> Date: Tue Nov 19 08:43:17 2024 +0100 Merge pull request #335 from tokens-studio/9310-color-picker Color picker full inline size commita77dd138b8
Author: Xaviju <xaviju@gmail.com> Date: Mon Nov 18 15:11:05 2024 +0100 💄 allow colorpicker to fill inline space commit16a90f5e17
Author: Xaviju <xaviju@gmail.com> Date: Mon Oct 28 14:54:20 2024 +0100 ✨ Refactor create token modal commit5e0bb5025b
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Wed Nov 13 14:22:57 2024 +0100 💄 Change naming to conform with Penpot DS commitbba504a16b
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Wed Nov 13 13:34:09 2024 +0100 🐛 Fix edit theme form auto submitting when pressing checkbox commit2a8ea8db62
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Tue Nov 12 15:45:37 2024 +0100 🐛 Fix edit button not centered commit43b90e764d
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Tue Nov 12 14:25:56 2024 +0100 🐛 Fix font size of token edit modal commit16952a7087
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Tue Nov 12 14:09:38 2024 +0100 🐛 Fix spacing of theme edit modal commitac9735ef03
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Tue Nov 12 14:03:18 2024 +0100 🐛 Fix new theme modal not opening commit951543ae0a
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Wed Oct 30 00:57:11 2024 +0100 ♻️ Refactor tokens exports toolbar commitb3c5f8f695
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Nov 7 17:52:14 2024 +0100 🐛 Hide empty message when creating set commitcfaf9b8890
Merge:83e34f5ff
332ecd3f4
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu Nov 14 16:14:30 2024 +0100 Merge pull request #332 from tokens-studio/fix-unit-tests-2 ♻ Re-enable token tests commit83e34f5fff
Merge:b4440aad0
76b763b64
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Nov 13 10:27:27 2024 +0100 Merge pull request #323 from tokens-studio/named-set-groups ♻ Remove TokenSetGroup [*] commit76b763b648
Merge:3ff084e77
7044c17d8
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Nov 13 10:27:19 2024 +0100 Merge pull request #324 from tokens-studio/named-set-groups-2 Allow sets and set groups at the same level commit7044c17d89
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Nov 5 15:48:37 2024 +0100 ♻ Allow token set grouping - Remove slash to dash conversion commit3c5c9a8e14
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Nov 5 15:29:31 2024 +0100 ♻ Add a prefix to sets and set groups commit3ff084e77a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Nov 12 14:03:04 2024 +0100 ♻ Update only TokensLib to 1.1 commit332ecd3f4b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Nov 12 13:44:48 2024 +0100 ♻ Re-enable token tests commit3869bcf754
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Nov 5 13:13:31 2024 +0100 ♻ Remove TokenSetGroup [*] [*] We do not need meta data on set groups, this was only necessary for defining order in TokensStudio and is not relevant for token implementations. commitb4440aad04
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Fri Nov 8 16:08:07 2024 +0100 🔧 Fix wrong code in merge commit5fee74cea8
Merge:a34207634
4f845b5c4
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Fri Nov 8 12:38:59 2024 +0100 Merge remote-tracking branch 'origin/develop' into token-studio-develop commit4f845b5c4d
Merge:fb3f74e74
960f095c1
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Fri Nov 8 12:38:34 2024 +0100 Merge remote-tracking branch 'upstream/develop' into develop commita34207634b
Merge:a757556e9
2c4eb96ab
Author: Florian Schrödl <contact@florianschroedl.com> Date: Fri Nov 8 12:12:31 2024 +0100 Merge pull request #328 from tokens-studio/fix-merge-issues [WIP] Restore style-dictionary prerelease commit2c4eb96ab1
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Nov 8 12:03:58 2024 +0100 Remove comment block commit424b930990
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Nov 8 11:59:08 2024 +0100 Remove patch file commitcfd291db5e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Nov 8 11:46:42 2024 +0100 Restore default commitc76569e4b7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Nov 8 11:40:31 2024 +0100 Downgrade commit456da5a46e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Nov 8 10:16:29 2024 +0100 🐛 Fix name on fnc crashing the process commit072cec7a22
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Nov 8 09:58:42 2024 +0100 Add testing block commita757556e9c
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Nov 7 18:32:09 2024 +0100 Revert "🐛 Fix import of tinycolor2" This reverts commit8e4574888d
. commit8e4574888d
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Nov 7 18:17:24 2024 +0100 🐛 Fix import of tinycolor2 commit78a1a615d9
Merge:a910f06b2
fb3f74e74
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Nov 7 14:07:58 2024 +0100 Merge remote-tracking branch 'origin/develop' into token-studio-develop commitfb3f74e74f
Merge:20590a5d1
96f8832bc
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Nov 7 14:06:45 2024 +0100 Merge remote-tracking branch 'upstream/develop' into develop commit20590a5d18
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Nov 7 14:02:55 2024 +0100 🔧 fix commite9c32841a9
Merge:040a94f71
33ff74e53
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Nov 7 13:49:11 2024 +0100 Merge remote-tracking branch 'upstream/develop' into develop commita910f06b2f
Merge:b3b8121d6
3d99c2a5e
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Nov 6 16:26:19 2024 +0100 Merge pull request #326 from tokens-studio/stroke-context-menu [WIP] ✨ Allow setting stroke-color via context-menu commit3d99c2a5eb
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Nov 6 15:43:20 2024 +0100 ✨ Allow setting stroke-color via context-menu commit040a94f719
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Tue Nov 5 13:16:56 2024 +0100 🔧 Disable tokens in dev env by default commitb3b8121d60
Merge:32865c41c
a33e0a386
Author: Florian Schrödl <contact@florianschroedl.com> Date: Mon Nov 4 13:45:44 2024 +0100 Merge pull request #320 from tokens-studio/fix-dot-rename 🐛 Fix renaming token to other namespace not working commita33e0a386e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Nov 4 13:43:38 2024 +0100 ♻️Ensure collection return commit32865c41c9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 30 08:49:30 2024 +0100 ♻ Remove zip.js compability warning when starting shadow-cljs commit315431fd49
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Mon Nov 4 13:02:32 2024 +0100 🔧 Update dependencies commitb47c5f9e60
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Oct 31 15:18:39 2024 +0100 🐛 Fix sidebar tabs when there are no design tokens commita1fd7a912e
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Wed Oct 30 10:52:08 2024 +0100 🔧 Use bun only for dev env (is needed to run frontend tests) commit60761eec07
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 29 17:06:32 2024 +0100 🐛 Fix renaming token to other namespace not working commit62b859b84e
Merge:bc3ab8981
4f7622cb9
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Oct 29 16:27:25 2024 +0100 Merge pull request #318 from tokens-studio/fix-delete-set 🐛 When deleting set remove it from theme commit4f7622cb93
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 29 14:19:42 2024 +0100 🐛 When deleting set remove it from theme commitbc3ab8981e
Author: Eva Marco <evamarcod@gmail.com> Date: Fri Oct 25 14:54:00 2024 +0200 ♻️ Review sets code and add DS components commitbef648a63f
Merge:cd7763ca0
0923dcc43
Author: Florian Schrödl <contact@florianschroedl.com> Date: Mon Oct 28 09:06:34 2024 +0100 Merge pull request #312 from tokens-studio/import-sd-2 ✨ Import: Verify data with StyleDictionary commit0923dcc43f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Oct 25 14:40:14 2024 +0200 ♻ Make `process-sd-tokens` more readable commitcd7763ca08
Merge:a1c401594
0ff5df4b8
Author: Andrés Moya <hirunatan@hammo.org> Date: Thu Oct 24 14:50:56 2024 +0200 Merge pull request #313 from tokens-studio/eva-review-themes ♻️ Review themes section commit0ff5df4b8d
Author: Eva Marco <evamarcod@gmail.com> Date: Wed Oct 23 16:28:30 2024 +0200 ♻️ Review themes section commitf5596b2b3f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Oct 24 10:13:03 2024 +0200 🐛 Temporary fix for import on sets with groups (/ delimiter) commita1c401594c
Merge:03ea5414b
52d8bed0f
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu Oct 24 09:42:25 2024 +0200 Merge pull request #314 from tokens-studio/fix/deployment Fix/deployment commit52d8bed0fc
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Oct 24 09:29:38 2024 +0200 Remove all gimlet and custom workflow code commit66dce0e795
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 22 10:14:47 2024 +0200 ✨ Detect reference errors when importing tokens commitd3ded00bc6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 23 14:13:49 2024 +0200 🐛 Fix text-editor missing from token tests commitbf3880a21c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 23 10:05:24 2024 +0200 🐛 Remove box shadow from supported tokens commit951f558d1f
Merge:fa8037c4b
03ea5414b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 23 12:05:58 2024 +0200 Merge branch 'develop' into token-studio-develop commit7debdefa22
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Oct 21 16:03:19 2024 +0200 🐛 Fix outdated notifications map commit03ea5414be
Author: Eva Marco <evamarcod@gmail.com> Date: Mon Oct 21 17:14:17 2024 +0200 ♻️ Review create and edit modal commit31b5f5cefa
Author: Eva Marco <evamarcod@gmail.com> Date: Mon Oct 21 16:36:47 2024 +0200 ♻️ Format code commit96af0f065d
Merge:2bdbd81a1
77ba6c135
Author: Florian Schrödl <contact@florianschroedl.com> Date: Mon Oct 21 10:10:55 2024 +0200 Merge pull request #310 from tokens-studio/fix-set-rename 🐛 Keep selection when renaming set commit77ba6c135e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Oct 21 10:08:03 2024 +0200 🐛 Keep selection when renaming set commitfa8037c4b5
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Oct 17 17:40:25 2024 +0200 Deploy commit2bdbd81a19
Merge:aaac7fb04
9fe4919a2
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu Oct 17 17:11:05 2024 +0200 Merge pull request #308 from tokens-studio/merge-develop-2 Sync with upstream develop commit9fe4919a2b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Oct 17 17:04:19 2024 +0200 Migrate msg -> ntf commit6af6dd1288
Merge:aaac7fb04
b4c2f2eca
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Oct 17 17:03:23 2024 +0200 Merge branch 'develop' into token-studio-develop commitaaac7fb041
Merge:41dc6083c
c6ed081a0
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu Oct 17 16:41:54 2024 +0200 Merge pull request #305 from tokens-studio/dtcg-import DTCG Tokens Import / Export commitc6ed081a0b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Oct 10 13:08:35 2024 +0200 ✨ Implement token import / export commit41dc6083cf
Merge:bbf5fce0c
85fee87bc
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu Oct 10 12:41:38 2024 +0200 Merge pull request #298 from tokens-studio/dnd Sets Drag & Drop commit85fee87bc4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 8 10:24:07 2024 +0200 🎉 Token Sets dnd re-ordering commita85a7d2b2f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 8 17:09:58 2024 +0200 🐛 Fix logic in oassoc-in-before wher top items couldn't be move to bottom commitbbf5fce0c9
Merge:bc4969c25
07beef572
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Oct 9 13:21:38 2024 +0200 Merge pull request #297 from tokens-studio/feature-flag ✨ Add feature flag for design tokens commit07beef5727
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 9 11:00:51 2024 +0200 Remove $PENPOT_FLAGS from frontend deployment commit11c8fa468f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 9 10:30:59 2024 +0200 Manually override ff flags commitb0ec9034dc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 9 10:09:45 2024 +0200 Enable FF for gimlet commit18e0948b0c
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Mon Oct 7 14:16:08 2024 +0200 ✨ Add feature flag for design tokens commitbc4969c25d
Merge:d58932c2e
2baa1aa73
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu Oct 3 15:44:02 2024 +0200 Merge pull request #296 from tokens-studio/fix-reference-color-preview Fix reference color preview commit2baa1aa734
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Oct 3 15:30:39 2024 +0200 Show resolved color commitb3e73b9abc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Oct 3 15:18:41 2024 +0200 Move over helper commit5de1f450c1
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Oct 3 15:14:38 2024 +0200 Move over token value reference check function commitd58932c2e5
Merge:6f086326f
69cc9d02b
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu Oct 3 13:26:27 2024 +0200 Merge pull request #290 from tokens-studio/refactor-themes-sets Refactor themes sets commit69cc9d02ba
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 17:23:04 2024 +0200 Cleanup: item->token commitd097b5b179
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 17:10:26 2024 +0200 Cleanup commit921f4a6660
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 17:10:07 2024 +0200 Restore all logic tests commit1097c1f282
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 17:02:10 2024 +0200 Restore apply overwrite commitf9a49f82f8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 17:00:31 2024 +0200 Restore apply-multiple commitf2900c6519
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 16:57:53 2024 +0200 Cleanup: Sort commit1df40ea07a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 16:57:20 2024 +0200 Restore apply-tokens test commiteceffda095
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 16:47:17 2024 +0200 Added todo commite55f323d60
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 15:47:59 2024 +0200 Fix tests commit2634388d09
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 14:37:24 2024 +0200 Remove logging commitfa6b8cb6de
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 14:31:56 2024 +0200 Use d/nilf commit2b6075d1a2
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 14:21:18 2024 +0200 Cleanup commit306a5e5f85
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 14:20:27 2024 +0200 Sets don't have a specific order inside themes commit5170d328bd
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 14:19:02 2024 +0200 Fix docstring commit4a818d55c8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 14:18:49 2024 +0200 Rename, fix docstring commitbbdc9e95f7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 14:17:20 2024 +0200 Add todo commitb12d5938e0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 14:10:41 2024 +0200 Replace generic arg name commit041e04dcb1
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 14:09:51 2024 +0200 Remove unneeded -> commita235327c3e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 11:33:14 2024 +0200 Cleanup commit0ffcda404b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 11:09:52 2024 +0200 Cleanup commit93cc8214fa
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 11:05:39 2024 +0200 Fix border-radius and sizing panels commit845de5d885
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 10:52:48 2024 +0200 Fix export commitfdca6e4edf
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 10:46:55 2024 +0200 Fix measures options commit028809f1d5
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 10:22:09 2024 +0200 Cleanup commit053d0fc923
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 10:15:35 2024 +0200 Cleanup function commit0b081d24e0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 10:03:34 2024 +0200 Only show warning when string has / commit669594e3c1
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 09:42:56 2024 +0200 Cleanup commit57a133e09d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 09:42:49 2024 +0200 Add ordered tokens test commit43e5367988
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Oct 2 09:42:42 2024 +0200 Fix testing from cljs commitfa3e2c90e6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 1 15:45:14 2024 +0200 Fix renaming via context menu commit7418d1fa2c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 1 15:42:09 2024 +0200 Dont support token set grouping for now commit3681678dc4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 1 14:40:05 2024 +0200 Migrate token tests to tokens-lib commitbca4ea3819
Merge:9268b18e5
6f086326f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 1 12:58:26 2024 +0200 Merge remote-tracking branch 'origin/token-studio-develop' into refactor-themes-sets commit9268b18e56
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 1 12:53:01 2024 +0200 Fix edit button commitf1f2767e2a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 1 12:49:03 2024 +0200 Activating initial sets by adding them to the token theme commit5825fa656b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 1 09:56:03 2024 +0200 Fix tests commit993df23624
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 1 09:55:58 2024 +0200 Remove unneeded tests commit442732117b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 1 09:55:23 2024 +0200 Disable logic tests for now (nee new setup) commit0d870610e1
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Oct 1 09:14:54 2024 +0200 Fix infer warnings in tokens test commit231baac31d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 16:41:51 2024 +0200 Fix renaming token creating new token commit4b39b6970a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 16:26:26 2024 +0200 Fix theme sets not being in order of the root order commitc5173d2df8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 15:33:17 2024 +0200 Remove hidden token theme when activating a theme commit0ea0834b1a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 15:21:15 2024 +0200 Cleanup commitbfa90d0347
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 15:18:26 2024 +0200 Fix duplicate token event commitb0d46e1767
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 15:15:05 2024 +0200 Cleanup commit3182ff1e15
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 15:08:18 2024 +0200 Cleanup commitdc0a1c1555
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 15:07:22 2024 +0200 Cleanup commit18d120bbaa
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 15:04:12 2024 +0200 Fix token creation without set commitc75ab61732
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 14:44:42 2024 +0200 Fix renamed theme staying in active-themes commitdf8f67b5d3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 13:52:50 2024 +0200 Update workspace tokens commit1194eb7c61
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 09:39:11 2024 +0200 Remove unused functions commita49992a74e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 09:38:01 2024 +0200 Fix token updating commit5d61ddb385
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 09:33:35 2024 +0200 Fix property applying commita59e391b38
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 09:19:06 2024 +0200 Fix token deletion menu commitcfec4ae958
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 09:08:14 2024 +0200 Cleanup commit99a3ed98c9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 08:46:31 2024 +0200 Only load context menu when open commit8c58ed80ac
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 08:31:18 2024 +0200 Fix id commit066ee9c489
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 30 08:23:22 2024 +0200 Tokens in sidebar commitcce4014fbe
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Sep 27 15:36:07 2024 +0200 Fix token create commitb7cedf219b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Sep 27 11:21:30 2024 +0200 Cleanup commit93ed1ded17
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Sep 27 11:14:34 2024 +0200 Token resolving on add fixed commit1d50bacfbc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 17:21:02 2024 +0200 Fix set renaming not being updated in themes commit7c4cbe5265
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 16:40:38 2024 +0200 Cleanup commit2f13814285
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 16:37:30 2024 +0200 Cleanup commit9f2b96332c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 16:16:44 2024 +0200 Fix up active themes tokens method commit577fa2bc81
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 15:38:36 2024 +0200 Cleanup commitc8494c9931
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 15:32:46 2024 +0200 Remove unused commit3843253a5d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 15:27:16 2024 +0200 Dont render starting slash commit5f6a76dfce
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 15:24:02 2024 +0200 Use currently active sets as sets for temporary theme commit29a2478bb5
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 15:15:50 2024 +0200 Fix theme group drop-down not updating group value commitb3ff480e81
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 15:08:54 2024 +0200 Hide temporary theme commit2104fc04df
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 14:28:27 2024 +0200 Fix theme select commit9c97b31d28
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 13:21:53 2024 +0200 Fix theme creation/editing commit895f92e7c2
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 12:03:03 2024 +0200 Hide temporary token theme from user commite216d84484
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 26 11:28:14 2024 +0200 Set toggling without a theme commit6f086326f5
Merge:2f4a012be
c755b764a
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Sep 25 16:22:20 2024 +0200 Merge pull request #289 from tokens-studio/revert-288-active-themes Revert "Adds `active-themes` to `TokensLib`" commitc755b764a2
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Sep 25 16:21:53 2024 +0200 Revert "Adds `active-themes` to `TokensLib`" commit0b2b8a71fb
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 25 15:08:52 2024 +0200 Token deletion commit9c1a509fa4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 25 14:59:20 2024 +0200 Set renaming commitd2ed6b5501
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 25 14:45:31 2024 +0200 Add set commit2f4a012beb
Merge:fb38e4378
6d75993fd
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Sep 25 13:48:41 2024 +0200 Merge pull request #288 from tokens-studio/active-themes Adds `active-themes` to `TokensLib` commit99e551925a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 25 11:08:54 2024 +0200 Updates commit4d4c4355ad
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 25 08:33:34 2024 +0200 Selection by name commitec96e7918d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 25 08:16:29 2024 +0200 Token theme deletion commit844819a50c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 24 15:25:29 2024 +0200 Activate themes via lib commit4c327f38ef
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 23 15:18:46 2024 +0200 Replace sets commitf5c122b0db
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Sep 20 14:42:48 2024 +0200 Remove legacy commitc6770f43c7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Sep 20 14:38:53 2024 +0200 Move out of legacy commit43e5e78053
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Sep 20 14:35:47 2024 +0200 Cleanup commitf5249196f9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Sep 20 14:27:19 2024 +0200 Sets sidebar commit501256f16b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Sep 20 09:34:54 2024 +0200 Disable namespace loading info in console from shadow-cljs commit9b2993a344
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 19 16:22:47 2024 +0200 Fix theme select commit191d957984
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 19 16:06:53 2024 +0200 Use theme listing commit743f61f2cd
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 19 15:44:56 2024 +0200 Adding themes commit7758e48c48
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 19 10:52:15 2024 +0200 Add legacy macro commit80e8903754
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 19 10:26:17 2024 +0200 Refactor: Use tokens-lib for getting tokens theme commit6d75993fd7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 24 14:24:35 2024 +0200 Move theme-path impl to ITokenTheme commit49579d75c6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 24 13:42:56 2024 +0200 Simplify as this commitd7d974242e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 24 11:18:12 2024 +0200 Add active-themes to data serialization tests commitf2569a1c4a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 24 11:13:41 2024 +0200 Cleanup commit44e4e85201
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 24 11:10:07 2024 +0200 Add schema validation commit5e39f33bff
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 24 11:06:12 2024 +0200 Rename with theme prefix commit416297d298
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 23 17:37:16 2024 +0200 Implement active-themes commitfb38e4378a
Merge:1a9d703bb
5b7b343f6
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Sep 18 18:10:42 2024 +0200 Merge pull request #273 from tokens-studio/color-token Color token commit5b7b343f62
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 17:25:55 2024 +0200 Cleanup commitf5b62a5fc1
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 17:23:42 2024 +0200 Style the form to fit the color ramp exactly commit8804d1432e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 17:15:45 2024 +0200 Update the input field value when chosing color from color ramp commit6084c49582
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 17:03:18 2024 +0200 Share color picker effect to set hue slider css variables commit2a3fc9e7bd
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 17:03:08 2024 +0200 Pointer commit061cd08e66
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 11:43:35 2024 +0200 Remove unused functions commit48a8b1bc55
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 11:30:32 2024 +0200 Fix color updating commitc007170603
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 11:28:31 2024 +0200 Cleanup commitb68e7af844
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 11:27:30 2024 +0200 Use tinycolor to convert hex color commite0e7b98ed7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 11:21:43 2024 +0200 Docstring commit3bd2278dec
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 11:15:11 2024 +0200 Use penpot logging system instead of custom debug flag commit77141887a8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 10:57:05 2024 +0200 Pass in value with error commit3a21643158
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 10:38:16 2024 +0200 Add shared error handling commit308fff05c3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 18 10:19:59 2024 +0200 Dont show name error when editing new token and not touching name field commit49ff0df7f6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 17 16:35:08 2024 +0200 Add tinycolor bindings commit3c4e0e2447
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 16 16:57:01 2024 +0200 Add color ramp commitac51309f81
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Sep 16 15:59:04 2024 +0200 Add placeholder color swatch commit2b886c54e0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 29 12:52:18 2024 +0200 Color ramp wip commit0b29767c95
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 30 11:51:21 2024 +0200 Add color token commit1a9d703bb1
Merge:0697e6988
f0a9444ab
Author: Andrés Moya <hirunatan@hammo.org> Date: Wed Sep 18 11:00:06 2024 +0200 Merge pull request #284 from tokens-studio/refactor-theme-groups tokens-lib refactor: Get collection of theme groups commitf0a9444ab6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 17 10:48:23 2024 +0200 tokens-lib refactor: Get collection of theme groups commit0697e69888
Merge:1d7536687
0e15da5ed
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Sep 17 09:44:00 2024 +0200 Merge pull request #283 from tokens-studio/refactor-types-2 Refactor types 2 commit0e15da5ede
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Tue Sep 17 00:51:33 2024 +0200 🔧 Make tokens again a flat ordered map commit5f703d6a79
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Mon Sep 16 17:47:05 2024 +0200 🔧 Make themes a two-level only tree commit3a4ec32f8e
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Sep 12 10:04:03 2024 +0200 🔧 add groups handling v2 commite2ff6f7ba6
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Sep 5 17:51:02 2024 +0200 🔧 Add first draft of token set groups attributes commitfa8f8ac54b
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Thu Sep 5 16:49:29 2024 +0200 🔧 add groups handling commit316d333c96
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Wed Sep 4 02:00:31 2024 +0200 🔧 Add token themes in tokens-lib custom type commit1d7536687a
Merge:6cba685e8
27073e22e
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu Sep 12 17:27:39 2024 +0200 Merge pull request #282 from tokens-studio/enable-ff Enable sets/themes for all commit6cba685e87
Merge:6f37a43be
a1e4d6b3b
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu Sep 12 13:17:26 2024 +0200 Merge pull request #281 from tokens-studio/token-refactor-common Fixes missing name attribute commit27073e22e3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 12 13:16:35 2024 +0200 Enable sets/themes for all commita1e4d6b3b3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 12 10:36:05 2024 +0200 Fix context menu missing name param commit309476fdfd
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Sep 12 10:23:45 2024 +0200 Cleanup commit6f37a43be1
Merge:361b02a76
0dca04733
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Sep 11 15:35:45 2024 +0200 Merge pull request #262 from tokens-studio/refactor-types-1 🔧 Add tokens-lib custom type commit361b02a76a
Merge:1568a7afb
0cd7d4dd7
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Sep 11 15:11:22 2024 +0200 Merge pull request #279 from tokens-studio/fix-inspect-tokens-tab Disable tokens tab in inspect mode commit1568a7afb5
Merge:f5ab6e65f
20e2c4edb
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Sep 11 15:11:02 2024 +0200 Merge pull request #278 from tokens-studio/fix-set-token-name Allow giving name of tokens in other sets commit0cd7d4dd7a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 11 11:09:06 2024 +0200 Disable tokens tab in inspect mode commitf5ab6e65fc
Merge:012e79603
56374171d
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Sep 11 11:02:55 2024 +0200 Merge pull request #277 from tokens-studio/group-select-themes Themes & Sets: Add groups select to modal commit20e2c4edb1
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Sep 11 10:17:46 2024 +0200 Allow giving name of tokens in other sets commit012e79603f
Merge:27409f43d
9876c2e4f
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Sep 11 09:09:51 2024 +0200 Merge pull request #276 from tokens-studio/token-sets-context-menu Token Sets & Themes: Sets context menu commit56374171d6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 10 15:44:11 2024 +0200 Fix theme groups not showing up in create state commit281b801112
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 10 15:42:44 2024 +0200 Show dropdown only when groups exist commit21f42021d8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 10 15:37:01 2024 +0200 Add groups select commitdf16d0c222
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 10 15:16:52 2024 +0200 Add abstract dropdown component commitd54c5476d8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 10 14:33:45 2024 +0200 Add dropdown button commit9876c2e4fc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Sep 10 12:51:07 2024 +0200 Add context menu commit0dca047339
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Tue Sep 3 14:20:55 2024 +0200 fix token update commitd147d844fb
Author: Andrés Moya <andres.moya@kaleidos.net> Date: Fri Aug 16 12:11:18 2024 +0200 🔧 Add tokens-lib custom type commit27409f43d2
Merge:734acd27b
ae5aaf833
Author: Florian Schrödl <contact@florianschroedl.com> Date: Fri Aug 30 11:15:31 2024 +0200 Merge pull request #264 from tokens-studio/token-sets-themes-ui Token sets themes UI commitae5aaf8332
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 29 16:02:22 2024 +0200 Cleanup commit54b754c38c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 29 16:01:31 2024 +0200 Cleanup commitca611c6668
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 29 15:59:58 2024 +0200 Cleanup commit6bae2efe9d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 29 14:26:11 2024 +0200 Validate against names in all token sets commit734acd27b9
Merge:93ce6b6eb
1ed6d92d8
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Aug 27 17:09:47 2024 +0200 Merge pull request #263 from tokens-studio/token-sets-themes Token sets themes commite363b58774
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 27 15:22:02 2024 +0200 HACK: Fix empty sets showing up in listing commitb24b178e29
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 27 15:00:15 2024 +0200 Make resizable commitd6823e8583
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 27 14:49:11 2024 +0200 Always switch to temporary theme when toggling sets in sidebar commit3bb99e8f7c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 27 14:37:24 2024 +0200 Remove default theme name, disable empty themen name submit commit3b7432a859
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 27 14:32:26 2024 +0200 Use non editable context in form commit4dd3367bdd
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 27 14:26:06 2024 +0200 Allow creating token sets commitd4910ce2fc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 27 14:25:52 2024 +0200 Auto select new token sets commit4f96550bca
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 27 14:13:29 2024 +0200 Use context commitdb22beb857
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 27 10:20:38 2024 +0200 Fix iterating over unordered sets commit965016b63f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 27 10:04:12 2024 +0200 Allow token renaming commit293250a30d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 16:35:49 2024 +0200 Rename commit1d599cbf7d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 16:33:07 2024 +0200 Always render ungroupd themes first commit0d2d1a8b8a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 16:23:23 2024 +0200 Link up actions commitcb46e11162
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 16:14:27 2024 +0200 Add edit button commitc807baaf7a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 15:54:44 2024 +0200 Add custom select with grouped options commitf25db592a0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 15:07:58 2024 +0200 Clone over select commit2e23543c11
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 15:04:45 2024 +0200 Show create text when no theme is available commit4060b6d40f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 15:02:38 2024 +0200 Style empty state, jump to create theme dialog when no themes exist commit7cd9c60fb6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 14:36:00 2024 +0200 Disable user-selection commit5939db771e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 14:34:41 2024 +0200 Link up delete button & fix create theme ui jumping commit1405720e0b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 14:32:21 2024 +0200 Cleanup commitb5e08c5b8b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 14:32:01 2024 +0200 Add theme creation form commitf37cf8be5e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 14:31:34 2024 +0200 Add defaults for theme form commit84b5be5547
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 14:17:37 2024 +0200 Fix button being chosen as main button for form submit commit7aff690e7b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 14:17:30 2024 +0200 Wire up theme updating commit70b570f112
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 13:49:57 2024 +0200 Show only on create commit36f92aa241
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 13:47:44 2024 +0200 Allow group and name updating commita0dd3f63bf
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 13:41:02 2024 +0200 Allow controlling state of theme editing commitfe702988f9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 26 13:40:49 2024 +0200 Cleanup commit12e915dec8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 17:48:43 2024 +0200 Style edit button commita52e20f49d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 17:22:05 2024 +0200 Cleanup commit967fab416a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 17:20:20 2024 +0200 Add back button commit3ce2531b42
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 17:11:38 2024 +0200 Design commitdb1250a315
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 17:07:47 2024 +0200 Add footer buttons commit6f7b69c7ee
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 16:58:49 2024 +0200 Allow toggling individual set themes commit7e7203eb7c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 16:44:11 2024 +0200 Allow passing custom functions commit8a20e3a698
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 16:34:33 2024 +0200 Allow tokens sets component to be controlled commit1c0233098d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 16:28:06 2024 +0200 Add sets list for theme commitc7fa0f2cf8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 16:27:42 2024 +0200 Cleanup commitcac421f862
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 15:41:32 2024 +0200 Design commit7970440ffc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 15:30:17 2024 +0200 Toggle theme via ui commitcc7de14539
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 15:08:53 2024 +0200 Add basic toggle switch commitd23c5cbbbe
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 14:53:22 2024 +0200 Move the temporary ui to modal commitb62722bdbb
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 14:11:13 2024 +0200 Add themes modal dialog commit1ed6d92d87
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 13:36:46 2024 +0200 Remove margin commitb48bfde5c8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 11:43:19 2024 +0200 Automatically open when creating set commit1cc1d94a27
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 11:42:14 2024 +0200 Automatically open when adding token commit40846b87c2
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 11:39:13 2024 +0200 Add tokens header commitacc3606cbb
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 11:36:54 2024 +0200 Align Eye commit97f119f3da
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 11:32:54 2024 +0200 Add delete set action button commit88c899c5c6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 10:17:52 2024 +0200 Wrap themes ui in header commita9a5f69c93
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 10:15:37 2024 +0200 Cleanup commitbac16aadd8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 23 10:14:45 2024 +0200 Migrate to official UI commitb1cf641587
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 22 14:56:41 2024 +0200 Fix cancelling set prompt breaking user state commite4f01d1d5e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 22 11:59:06 2024 +0200 Fix logic commit157cc5a994
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 22 11:21:53 2024 +0200 Automatically show themes and sets on dev and PR previews commit37a3fbcec2
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 22 11:02:01 2024 +0200 Fix not possible naming token to same token name in other set commit8343a9f3b5
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 22 10:59:40 2024 +0200 Fix description commit4b47fa5d7a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 22 10:58:31 2024 +0200 Fix names clash commit7a2a521075
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 22 10:54:41 2024 +0200 Allow passing config commit6c802bc132
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 22 09:37:47 2024 +0200 Rename commitc130dc39c3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 21 19:11:53 2024 +0200 Resolve tokens from other active sets commit8264da3a2a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 21 15:36:40 2024 +0200 Use active sets tokens for form commit6c6be35292
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 21 15:12:13 2024 +0200 Fix token updates not taking order commit011fc734f6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 21 14:42:39 2024 +0200 Make passing of names-map explicit commit7c3716a709
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 21 11:18:52 2024 +0200 Move temporary ui behind flag commit98207b02bf
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 21 11:18:47 2024 +0200 Remove log commit0df89cf60d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 21 11:17:12 2024 +0200 Use storage to toggle themes ui commit2df577cba2
Merge:4e81a94d0
93ce6b6eb
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 21 11:04:00 2024 +0200 Merge remote-tracking branch 'origin/token-studio-develop' into token-sets-themes commit4e81a94d0f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 21 11:03:39 2024 +0200 Remove unused functions commit4f02d8b47d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 21 11:01:23 2024 +0200 Fix multi run test commit74801e72d3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 21 10:54:22 2024 +0200 Fix simple token creation / scaffolding test commitcfefbadb64
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 21 10:29:14 2024 +0200 Fix id commit93ce6b6eb3
Merge:9dd681c15
f9704fe7a
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 22:14:51 2024 +0530 Merge pull request #256 from tokens-studio/token-sets-ui Token sets UI commitf9704fe7aa
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 20 18:40:02 2024 +0200 Fix padding without sets commit2487f34b72
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 21:34:07 2024 +0530 formatting commitb3e939d12a
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 21:30:59 2024 +0530 add a hardcoded flag to display/hide token sets section commit247e3a1559
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 21:25:22 2024 +0530 fix some styling issues commit5b1eaf4b8f
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 20:55:02 2024 +0530 remove unused prop and some optimizations commit463ab3c866
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 20:41:25 2024 +0530 change current-set to selected-set commit5358cd1c52
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 20 16:14:32 2024 +0200 Fix tests crashing commit3a2f4df387
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 17:08:31 2024 +0530 add source code comment commit1a3184d327
Merge:187ab3166
9dd681c15
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 17:02:00 2024 +0530 Merge branch 'token-studio-develop' into token-sets-ui commit187ab31667
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 17:00:19 2024 +0530 format commitfeb5cec84b
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 16:57:53 2024 +0530 ad sets-section wrapper commitf052b75dac
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 16:38:18 2024 +0530 formatting commite62323ac0a
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 16:35:33 2024 +0530 add variable commitd4c88d4441
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 16:32:36 2024 +0530 remove folder open icon commit4bad9fa6f8
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 16:30:51 2024 +0530 add chevron icon commite4f5b6005e
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 16:30:38 2024 +0530 move sets-sidebar component to sidebar tokens commit98b5791e27
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 20 15:37:37 2024 +0530 remove set-item-set-selected and remove class commit6049c32839
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 19 15:46:42 2024 +0200 Compute tokens from each activated set commit8e02dced2f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 19 10:49:46 2024 +0200 Extract to function commit97436531d0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 19 10:46:48 2024 +0200 Showing only active sets commit8660c372dc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 19 09:41:23 2024 +0200 Add theme deletion commit3413d4b42f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 19 09:09:09 2024 +0200 Add tests commit93a23c66ec
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 19 09:01:08 2024 +0200 Docstrings commite8bbb75008
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 19 08:49:03 2024 +0200 Implement group theme switching commit9a745ea8bc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 19 08:05:19 2024 +0200 Add active theme toggling commitf0e0e9334e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 19 07:29:20 2024 +0200 Cleanup commitae1c30ad56
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 14:22:56 2024 +0200 Allow providing set name commite502def755
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 14:21:25 2024 +0200 Show themes commit62712ef8da
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 13:59:18 2024 +0200 Cleanup styles commit6a7ced3204
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 13:36:54 2024 +0200 Add token set visibility toggle commit636c3b822c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 12:22:57 2024 +0200 Example styling commitc2a045ad5b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 11:44:41 2024 +0200 Add selected sets UI commit0f95ddef8f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 11:32:36 2024 +0200 Add new sets to active theme commit3e41e7d234
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 11:32:20 2024 +0200 Fix workspace-data key missing commit879ef1123f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 10:32:59 2024 +0200 Create temporary theme when creating set commit9329513949
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 08:04:41 2024 +0200 Add token set deletion commitae39586d8c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 07:10:15 2024 +0200 Add temporary theme commit4c1bc81b19
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 07:10:08 2024 +0200 Add name commit7406af2e79
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 07:09:59 2024 +0200 Add theme creation commit8482a128de
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 07:09:17 2024 +0200 Fix expeted id instead of set commit3695ba3438
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 07:09:07 2024 +0200 Add token theme data scaffold commit35759792a3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 06:24:15 2024 +0200 Render grouped themes ui commitf0aaa29d66
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 06:24:03 2024 +0200 Add type functions commitcefa498f4d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 16 06:23:53 2024 +0200 Add group and selected properties to theme commitf3d4346c0d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 15 18:52:42 2024 +0200 Add create token-set event commit1f0c1dbbe6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 15 18:52:31 2024 +0200 Update shapes on token set switch commit587a2936e6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 15 18:26:37 2024 +0200 Add simple UI commit73078d802a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 15 18:26:20 2024 +0200 Add refs commiteaf568f154
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 15 14:26:22 2024 +0200 Get tokens from current or first token set commitead8a983ab
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 15 14:26:12 2024 +0200 Move to token-set namespace commit9dd681c156
Merge:b2962b560
43e064a76
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu Aug 15 12:28:19 2024 +0200 Merge pull request #254 from tokens-studio/fix-token-editing Fix token editing commit43e064a768
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 15 10:12:45 2024 +0200 Update doc string commit4bd3b14adb
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 15 10:07:12 2024 +0200 Add unit to tests commite4e488a9ee
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 15 10:03:25 2024 +0200 Adds style-dictionary test commitc6d13af071
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 15 09:21:49 2024 +0200 Fix validation not working while editing [*] [*] We've passed the resolved tokens to the validation, but the validation needs the original tokens set. commit6be2ca8491
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 15 09:21:18 2024 +0200 Fix resolved value not showing up when editing token commitb2962b5603
Merge:c7d4db900
ecf4fb8bd
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Aug 14 19:41:36 2024 +0200 Merge pull request #251 from tokens-studio/fix-spacing-token Fixes design tab spacing token commitecf4fb8bd0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 14 16:52:46 2024 +0200 Fix popover position commit1ba2acea7c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 14 16:39:43 2024 +0200 Fix crash for applying spacing layout token commitcf9ef2ae60
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 14 15:33:24 2024 +0200 Remove unused function commit74c6228c25
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Aug 14 17:15:30 2024 +0530 add dom/stop-propagation commit188e7d220a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 14 09:25:17 2024 +0200 Fix name commitc7d4db900e
Merge:d8621974c
726b0a267
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Aug 14 09:16:23 2024 +0200 Merge pull request #245 from tokens-studio/use-token-name-ref Use token name ref commit1135b7e2db
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 13 18:30:00 2024 +0200 Update token sets commit71439637aa
Merge:21c42626a
d8621974c
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 13 21:56:06 2024 +0530 Merge branch 'token-studio-develop' into token-sets-ui commit21c42626ae
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 13 21:51:31 2024 +0530 remove comment commit007cf0fb8a
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 13 21:50:55 2024 +0530 remove comments and unused import commit46c73fe51f
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 13 21:44:08 2024 +0530 formatting commit66170eb889
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 13 21:42:08 2024 +0530 make current-set-id the key on div element commit68c0d93f91
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 13 21:12:38 2024 +0530 change sets list div to ul commit7addba71fb
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 13 21:07:52 2024 +0530 remove debug statements commit950257a212
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 13 20:42:42 2024 +0530 change eye icon size commit9aadb8c72f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 13 16:18:24 2024 +0200 Add test commitfa230a4224
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 13 19:31:34 2024 +0530 add folder-open icon and use for open groups commit2f2ed0a42f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 13 15:45:38 2024 +0200 Cleanup commita4865522cc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 13 15:25:36 2024 +0200 Select token set on create commitba31914ca4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 13 14:41:58 2024 +0200 Fix typo commitc275923621
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 13 14:41:49 2024 +0200 Fix indent commitec01ce7550
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 13 14:41:18 2024 +0200 Ensure vector commitbcd4b6d9ec
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 13 13:31:43 2024 +0200 Fix schema errors commit547358d579
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 13 11:57:06 2024 +0200 Add token set changes commitbcf61f34fe
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 13 14:11:30 2024 +0530 add current set and selected set commitad9a4e7244
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Aug 13 01:17:18 2024 +0530 Add full lenght highlight commit9ff3a135a8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 12 10:50:47 2024 +0200 Cleanup commit6c3415b92c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 6 14:56:11 2024 +0200 Differentiate groups and sets commitdbddd7fb68
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 6 14:26:30 2024 +0200 Add token themes & sets schema commit726b0a2671
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 9 18:04:33 2024 +0200 Fix :applied-tokens not being updated commit51a27c07ec
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 9 18:03:47 2024 +0200 Use token identifier commit9ff4567955
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 9 18:03:20 2024 +0200 Remove unused function commit5552295d61
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Aug 9 17:37:36 2024 +0200 Add docstring commitb93b0b209a
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu Aug 8 21:40:35 2024 +0530 Add hover styles and collapse capabilities commitbb3a22a219
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu Aug 8 18:46:58 2024 +0530 add hide/show icon commite992bf0aa6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 8 15:13:04 2024 +0200 Fix sizing test commit8b8b909fb7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 8 15:12:28 2024 +0200 Parse values with unit commit2d67a92d64
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 8 11:39:58 2024 +0200 Fix getter commita073520d0e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 8 11:22:40 2024 +0200 Restore tests to work with new identifier commite27e2d357c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 8 11:09:12 2024 +0200 Add simple applying test commitd98e982664
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 8 11:07:32 2024 +0200 Cleanup commit31674db11d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 8 11:07:24 2024 +0200 Skip parsing on numbers commit0684d893e0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 8 11:06:49 2024 +0200 Return resolved & parsed token names map commit37f23855e8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 8 09:52:51 2024 +0200 Fix re-find only accepting string values throw commit2e8e33d701
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 8 09:40:26 2024 +0200 Add token value parsing function commit980238e27b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 8 09:22:32 2024 +0200 Move find-token-references to token namespace commitb28a45c2d8
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu Aug 8 00:14:36 2024 +0530 add more changes working tree display commitfcea989586
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Aug 7 22:39:41 2024 +0530 add more changes commit1434ddb5d5
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Aug 7 20:58:21 2024 +0530 change fotn color commit252797183c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 7 15:14:32 2024 +0200 Use :name as the token identifier [*] [*] Using uuid as the token identiefier for :applied-tokens is not correct as we want to merge all sets together by their name, to get the final values. commitd8621974c2
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 7 17:14:05 2024 +0200 Update with upstream commit192f847d50
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 7 17:13:39 2024 +0200 Ignore rxjs errors commitc9673ca828
Merge:d7ee804ca
22f3dba84
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 7 16:21:08 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commitd7ee804ca3
Merge:eb9b4be6e
edb89bccc
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Aug 7 12:53:02 2024 +0200 Merge pull request #243 from tokens-studio/fix-tests Temporary fix for tests commitedb89bcccb
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Aug 7 12:38:24 2024 +0200 Temporary fix for tests [*] [*] Async tests got broken with the latest upstream. This will still print a bunch of warnings from rxjs but the tests are still running. commiteb9b4be6ea
Merge:e02611da2
4ae467987
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Aug 7 08:26:08 2024 +0200 Merge pull request #241 from tokens-studio/sync-master Sync penpot master commit02a19a6b33
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Aug 7 00:57:13 2024 +0530 Next commit commit22e497398f
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Aug 7 00:08:12 2024 +0530 Initial commit commit4ae467987a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 6 11:25:31 2024 +0200 Update changes commit3bd0318999
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 6 11:16:38 2024 +0200 Update lock file commitdd8780db69
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 6 11:16:30 2024 +0200 Use register commit5fbbdd36fd
Merge:e02611da2
36ac81bb4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Aug 6 11:06:51 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commite02611da20
Merge:57c9d6d3a
f7e770192
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Aug 6 10:31:13 2024 +0200 Merge pull request #238 from tokens-studio/213-opacity-fixes-03 Fixes Opacity commitf7e7701923
Merge:6cb3afe87
57c9d6d3a
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Aug 6 08:23:39 2024 +0200 Merge branch 'token-studio-develop' into 213-opacity-fixes-03 commit57c9d6d3a9
Merge:3c7261e75
fe9bb69c7
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Aug 6 06:38:31 2024 +0200 Merge pull request #239 from tokens-studio/236-stroke-width-fix Fix stroke width applying crash commitfe9bb69c75
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 5 11:45:32 2024 +0200 Update CHANGELOG commitc9d1fe44e9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 5 11:43:46 2024 +0200 Add stroke-width test commit2a97749d23
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 5 11:42:36 2024 +0200 Add shape property passing commit3826afb76b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 5 11:18:19 2024 +0200 Fix applying stroke commit6cb3afe87f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 5 11:05:49 2024 +0200 Add opacity tests commit62a9dd6582
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 5 10:54:46 2024 +0200 Cleanup commitad468582b3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 5 10:53:59 2024 +0200 Add changelog commitc29024bd62
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Aug 5 10:51:35 2024 +0200 Dont update values outside of 0..1 (e.g.: 20) commit1f88c8288a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 11:08:15 2024 +0200 Parse double to preserve opacity commit3c7261e75b
Merge:ab72bdf09
72c5c3ec9
Author: Florian Schrödl <contact@florianschroedl.com> Date: Fri Aug 2 08:56:30 2024 +0200 Merge pull request #231 from tokens-studio/update-token-shapes Update token shapes commit72c5c3ec9a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 1 15:45:37 2024 +0200 Cleanup commit13163a4571
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 1 15:37:53 2024 +0200 Clean up debugging code commit0c757f05e3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 1 15:37:39 2024 +0200 Apply actions directly commitfc6d64fb5d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 1 15:32:33 2024 +0200 Fix import commit518441e582
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 1 12:12:03 2024 +0200 Fix spacing token click will add padding commitfdce370bb6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 1 12:05:15 2024 +0200 Disable debug commit9ebd743635
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 1 11:09:36 2024 +0200 Testing comment commitcc6f34f78a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 1 11:07:02 2024 +0200 Fix trying to update shapes for deleted tokens crash commitfeb438f882
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 1 10:41:45 2024 +0200 Safety net commit68b32448d1
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 1 10:41:03 2024 +0200 Fix exact match of diff adding nil attrs group and crashing the app commitac27f95091
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 1 09:41:28 2024 +0200 Fix undo deleting the token on update commit68415b6668
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 1 09:14:21 2024 +0200 Update tokens after shape update commite52623c728
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Aug 1 09:13:58 2024 +0200 Update shapes in one undo step, resolve tokens from state not cache atom commita1fefe66ae
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 31 17:26:50 2024 +0200 Working updates! commitd22234fe2a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 31 16:51:55 2024 +0200 Cleanup commit0166c38486
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 31 16:43:03 2024 +0200 Split logical attribute groups commit69d9359237
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 31 14:36:09 2024 +0200 Collecting update functions by attributes commit6225f59ea0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 31 14:04:00 2024 +0200 Cleanup commitab72bdf09c
Merge:dde8ab068
1d4b41750
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Jul 30 08:02:50 2024 +0200 Merge pull request #224 from tokens-studio/ux-context-menu Ux context menu commit1d4b417501
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 30 06:57:21 2024 +0200 Fix missing function shorthand commitf69db7ce9e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 18:43:47 2024 +0200 Cleanup commit5e33eab7d0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 18:31:11 2024 +0200 Fix position updating commit9340ba9cc0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 18:30:59 2024 +0200 Allow passing custom on-update-shape function commitededd23849
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 17:48:30 2024 +0200 Trigger Build commitb423a9c782
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 17:43:32 2024 +0200 Always update all layout-gap on token pill click commit70904dbc64
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 16:38:40 2024 +0200 Trigger Build commit9ba4776c8e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 16:34:26 2024 +0200 Trigger Build commitc92decedeb
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 16:21:42 2024 +0200 Trigger Build commita893a66ec8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 16:07:33 2024 +0200 Fix crash on applying col/row gap commit3f14af9e03
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 16:00:46 2024 +0200 Fix highlighting for dimensions token commit596d662ca8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 15:24:17 2024 +0200 Cleanup commit1eea55ad43
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 15:09:35 2024 +0200 Test commit55ed79d968
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 14:22:37 2024 +0200 Move to sidebar, should not be rendered in root commit6fc370bb30
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 14:22:07 2024 +0200 Fix token position wrong, component gets rendered on user mount commit1633f8035e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 29 13:51:17 2024 +0200 Indent commit9bec2509c9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 25 10:11:36 2024 +0200 Better context-menu position, remove hardcoded value commit1e481412e8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 25 09:12:23 2024 +0200 Remove old token applying events commitcc41a42dfa
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 25 09:11:03 2024 +0200 Update CHANGELOG commita3a4883875
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 25 08:58:26 2024 +0200 Cleanup commitf094654837
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 25 08:56:02 2024 +0200 Fix only shape ids being applied commitf93a5ab109
Merge:957ad0dae
dde8ab068
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 25 08:42:17 2024 +0200 Merge remote-tracking branch 'origin/token-studio-develop' into ux-context-menu commit957ad0dae3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 16:21:48 2024 +0200 Always highlight if one of the attributes is active, but only apply minimal set on pill click commitb9b4abf1e0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 16:10:41 2024 +0200 Fix edit modal not opening commitcb942996a9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 16:05:43 2024 +0200 Fix render-loop after token was deleted commit37bef1e2ea
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 16:05:29 2024 +0200 Cleanup commitb392c3ba65
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 15:46:14 2024 +0200 Move token change events to changes ns commit56e72b5247
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 15:29:40 2024 +0200 Refactor - Separate core into namespaces: changes, token_types commit03370c267d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 15:02:10 2024 +0200 Cleanup commitd5a03e154b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 14:57:33 2024 +0200 Cleanup commit386a4c94ba
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 14:51:59 2024 +0200 Disallow clicking pill when nothing is selected commit5e911d814c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 14:49:39 2024 +0200 Show attribute actions only when something is selected commit310033fd75
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 14:20:08 2024 +0200 Inline attributes commit46250003d3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 14:17:43 2024 +0200 Reuse all-or-sepearate-actions for border-radius commit871402bd84
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 14:07:42 2024 +0200 Fix overriding of existing radius-4 commit38499e2f1f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 14:07:29 2024 +0200 Fix properties commit893e533afe
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 14:01:56 2024 +0200 Cleanup commite6889fc92e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 13:41:32 2024 +0200 Fix typo commitc11c1e0c03
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 13:41:08 2024 +0200 Use all-or-sepearate-actions for gap commit335808bf03
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 13:41:00 2024 +0200 Remove unneeded actions commitcbd5d42069
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 13:36:38 2024 +0200 Simplify commit113fc9891b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 13:29:26 2024 +0200 Simplify component & css commitfbd2ab833d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 10:59:26 2024 +0200 Inline separator commit08cc777096
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 10:58:34 2024 +0200 Restructure commit81c83f9dd4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 10:55:22 2024 +0200 Recurse tree instead of repetition commitf20313e7f8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 09:43:28 2024 +0200 Add dimensions sub-menu commit1776591fec
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 09:42:09 2024 +0200 Fix react index warning commitaa75f30858
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 24 09:19:31 2024 +0200 Allow type overriding via prop commit62f7f8a74f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 23 16:35:07 2024 +0200 Add sizing commit65dbafafb8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 23 16:02:14 2024 +0200 Add width/height applying commit214a323682
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 23 16:01:56 2024 +0200 Add abstract method for a all or seperate actions commitda3f2f820c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 23 15:28:13 2024 +0200 Add generic context menu actions commitcabc3d3f36
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 23 14:55:14 2024 +0200 Simplify passed prop date commitbad9056d54
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 23 11:35:07 2024 +0200 Update gap commit4cf8b2c143
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 23 10:54:23 2024 +0200 Extract gap as extra function commit39822a3b31
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 23 10:49:19 2024 +0200 Add single padding commit0e858d880d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 23 10:37:51 2024 +0200 Add horizontal/vertical padding toggle commitdde8ab0680
Merge:64da0983f
cb051d2e5
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Jul 23 13:02:21 2024 +0530 Merge pull request #223 from tokens-studio/fic-spacing-crash-on-non-layout Fix app crashing when spacing padding is applied to a shape without a… commit2411eeb644
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 22 18:23:12 2024 +0200 Add separate gap commitc00023319a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 22 18:13:37 2024 +0200 Extract data commitfd2f5537cf
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 22 18:07:16 2024 +0200 Extract common logic commit2836ff2693
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 22 17:07:42 2024 +0200 Fix actions commitf731a30f81
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 22 13:54:36 2024 +0200 Allow removing other attributes with apply-token function commit91033d6dea
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 22 11:30:27 2024 +0200 Fix indent commit64da0983f3
Merge:2f17b79be
337e1c9fa
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Fri Jul 19 00:30:15 2024 +0530 Merge pull request #222 from tokens-studio/fix-stroke-width-crash Fix application crashing when stroke width is applied to a shape with… commitcb051d2e5b
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Fri Jul 19 00:28:00 2024 +0530 Fix app crashing when spacing padding is applied to a shape without a layout commit337e1c9fa0
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu Jul 18 23:13:51 2024 +0530 Fix application crashing when stroke width is applied to a shape without a stroke commit359ec592fb
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 8 15:40:33 2024 +0200 Single attribute context menu commitae2da534e9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 8 15:40:18 2024 +0200 Move radius updating to core commit9bf763efb3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 8 15:19:48 2024 +0200 Add all action commit77fe4d556f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 8 15:10:51 2024 +0200 Convert border-radius to new UX commit7b2d11019c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 8 15:10:01 2024 +0200 Only show atrribute actions when shapes are selected commitbf994fcd56
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 8 14:40:57 2024 +0200 Rename commit3ad009b515
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 8 14:40:35 2024 +0200 Fix lint commit82b44e6569
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 8 14:40:07 2024 +0200 Inline concat commitda0389e304
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 8 14:38:19 2024 +0200 Improved logic to run once for all shapes commit90618ec89a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 8 11:41:25 2024 +0200 Add separator between default actions and attribute actions commit2f17b79bef
Merge:c2777ed6e
bc1f27eac
Author: Florian Schrödl <contact@florianschroedl.com> Date: Mon Jul 8 13:53:10 2024 +0200 Merge pull request #216 from tokens-studio/ux-improvements UX improvements commitdb7391e4cb
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 8 11:40:05 2024 +0200 Separate entries commite75f9a7c7f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 8 11:06:57 2024 +0200 Add predicate for all test commit62ecee2cf8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 8 10:24:23 2024 +0200 Add grouping function by type commit3c67872d3c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jul 5 14:44:57 2024 +0200 Add future test cases for providing a toggle all/attributes commit5a358e3d0c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jul 5 14:13:14 2024 +0200 Extract singular token applied predicate commitbc1f27eac9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jul 5 09:18:36 2024 +0200 Trigger Build commit0fad53ea6c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jul 5 08:55:01 2024 +0200 Convert stroke to event commitc7a46c31b4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jul 5 08:53:45 2024 +0200 Convert layout spacing to function commitc70bb876b2
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jul 5 08:31:38 2024 +0200 Add changelog commit4fc7efd3b7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 16:03:32 2024 +0200 Restore performance measuring lines commit4a329a6318
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 15:52:58 2024 +0200 Override http server commit828e3a719f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 15:29:42 2024 +0200 Disable running tests from shadow-cljs directly commit785961f7c6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 14:31:50 2024 +0200 Cleanup commit55713275b6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 14:14:06 2024 +0200 Add test for overriding token commitf20c08f31b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 14:05:20 2024 +0200 Specify tests commit893e790787
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 11:41:00 2024 +0200 Only remove given token commitb73cdd15e0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 11:28:15 2024 +0200 Add helper to remove attributes from applied-tokens commit658e7ebd0a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 11:15:06 2024 +0200 Cleanup commit694baeee0c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 11:12:49 2024 +0200 Add sizing test commit7abfaef1cb
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 11:08:46 2024 +0200 Test applying rotation commit322c8ef8ec
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 11:06:48 2024 +0200 Update opacity commitb43d16008f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 10:51:08 2024 +0200 Extract to helpers commit1f0f35e754
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 10:48:27 2024 +0200 Remove unused commita842cb2d7d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 10:41:57 2024 +0200 Cleanup commit8f806ef1fe
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 10:41:46 2024 +0200 Test single property updates commitf3261c9b0f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 10:41:10 2024 +0200 Fix emit! side-effect commit818aa043ca
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 10:40:59 2024 +0200 Wrap in undo sequence commit596480d177
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 10:05:36 2024 +0200 Add test to verify toggle removes token for applied & unapplied commitab62c5b4ef
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 10:00:58 2024 +0200 Add helper to apply token to shape commit581ced0ab8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 10:00:44 2024 +0200 Abstract into helper commite85de19a5e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 09:29:48 2024 +0200 Add multiple shapes test commit8370fd06d4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 09:29:43 2024 +0200 Remove cb commit3793e98660
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 09:29:16 2024 +0200 Disable complete log commitb12e59a8d7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jul 4 09:13:02 2024 +0200 Rename event to toggle-token commit71976ed7e9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 3 18:24:09 2024 +0200 Add helpers for creating test tokens commit0730ecef46
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 3 17:15:23 2024 +0200 Cleanup commit219d184e6c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 3 17:06:08 2024 +0200 Add multiple tokens for tests commita7e735bd81
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 3 17:04:47 2024 +0200 Add helper for asnc stores commited7aad6c4e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 3 16:11:39 2024 +0200 Async token event tests working commite203646085
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 3 11:16:16 2024 +0200 Naming commit1e70a4d714
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 3 11:09:50 2024 +0200 Implement using rx observables instead of side-effects commit97db3c29ca
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jul 3 09:50:54 2024 +0200 Trying to convert to rx structure commit50635ae879
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 2 16:06:41 2024 +0200 Found error in handler logic, need rx streams commit3e5126251c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 2 15:19:31 2024 +0200 Add failing logic test commit10d92f598c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 2 15:03:09 2024 +0200 Add nodemon watcher commitc486ea81f4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 2 15:03:04 2024 +0200 Cleanup commitf2358b9827
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jul 2 08:22:27 2024 +0200 Use toggle function commitc2777ed6e3
Merge:5c5b37826
224b656d5
Author: Florian Schrödl <contact@florianschroedl.com> Date: Mon Jul 1 18:43:17 2024 +0200 Merge pull request #211 from tokens-studio/fix-sub-name-space Fix token naming clashes commit5cef23267c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 1 14:14:36 2024 +0200 Move to tokens ns, add test commitcf07de3bcf
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 1 14:05:06 2024 +0200 Add tests for token-applied? commite38a943ce0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 1 13:51:20 2024 +0200 Move token-applied? to token ns commit224b656d57
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 1 10:40:38 2024 +0200 Add CHANGELOG commit111be97228
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 1 10:31:16 2024 +0200 Remove logs commitec511cc589
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 1 10:30:03 2024 +0200 Fix setting token to own path commit9d637cbe5e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 1 10:16:52 2024 +0200 Path selector test predicate is enough commit4a85ef3608
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 1 10:16:15 2024 +0200 Split path/selector for disallowing creating tokens at path segments commita98f59469e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jul 1 09:56:45 2024 +0200 Add - to allowed token-name commit174d91a519
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 28 14:39:36 2024 +0200 Add function to check if a token can be placed under a name path commit48a7c52664
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 28 14:17:42 2024 +0200 Separate errors commit2fa152d364
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 28 13:51:32 2024 +0200 Move to token namespace commit504369ec13
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 28 13:43:41 2024 +0200 Move tokens-name-tree to core, add test commitef5f019200
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 28 13:34:54 2024 +0200 Add helper utility to convert name to path commit6da855c741
Merge:3a500fb8a
a4bbef991
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 28 11:24:55 2024 +0200 Merge branch 'fix-token-reference-issue' into 199-branch-name commita4bbef9917
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Fri Jun 28 14:43:49 2024 +0530 Fix token reference issue when name has . commit3a500fb8a7
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 26 19:40:06 2024 +0530 Update CHANGELOG.md with PR link commit00dabaf38c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 26 16:08:21 2024 +0200 Remove comment form commitf24c314d63
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 26 16:04:50 2024 +0200 Update commitf9530c5a10
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 26 16:01:41 2024 +0200 Restrict token naming commit5c5b378262
Merge:3a594d239
4aac3eee7
Author: Florian Schrödl <contact@florianschroedl.com> Date: Fri Jun 28 08:19:57 2024 +0200 Merge pull request #204 from tokens-studio/fix-deploy Fix deploy commit4aac3eee7f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 28 08:18:43 2024 +0200 Test synchronize commit325ad66a46
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 28 08:16:26 2024 +0200 Fix branches not being re-deployed after push commit3a594d2393
Merge:bd5a0d2d1
b2a983fd0
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu Jun 27 16:31:14 2024 +0200 Merge pull request #203 from tokens-studio/fix-new-document-token Fix creating a token issue on empty document commitb2a983fd05
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jun 27 16:07:47 2024 +0200 Fix creating a token issue on empty document commitbd5a0d2d1b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 26 15:06:22 2024 +0200 Cleanup commit19c6c6d3bf
Merge:7fa31b143
c9a40ee9b
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 26 17:58:01 2024 +0530 Merge pull request #195 from tokens-studio/json-export-changelog Add Json export Changelog commitc9a40ee9b3
Merge:350654f96
7fa31b143
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 26 17:57:49 2024 +0530 Merge branch 'token-studio-develop' into json-export-changelog commit350654f968
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 26 17:51:23 2024 +0530 Update CHANGELOG.md image commit7fa31b143e
Merge:357a0781b
bf1c9e2c1
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 26 17:48:08 2024 +0530 Merge pull request #198 from tokens-studio/json-dtcg-format Make tokens JSON export DTCG compatible commitbf1c9e2c18
Merge:96bfce13b
357a0781b
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 26 17:47:54 2024 +0530 Merge branch 'token-studio-develop' into json-dtcg-format commit357a0781bb
Merge:5ca916f8c
86fd667a1
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Jun 26 14:11:08 2024 +0200 Merge pull request #194 from tokens-studio/style-dictionar-validation Token Insert/Edit Validation + Value Preview commit96bfce13be
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 26 17:28:10 2024 +0530 Update CHANGELOG.md image commitd6f1e2efc9
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 26 12:36:01 2024 +0530 Update CHANGELOG commit158d5cba31
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 26 12:32:07 2024 +0530 Make tokens JSON export DTCG compatible commitaabbe2fd94
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Jun 25 22:34:09 2024 +0530 Update CHANGELOG commit86fd667a11
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 17:06:52 2024 +0200 Hide template section in preview document commit56976e2499
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 17:04:13 2024 +0200 Update CHANGELOG commit9f6c587c95
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 16:46:15 2024 +0200 Remove duplicate similar errors commit9f3e1743a1
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 16:45:01 2024 +0200 Cleanup commite1b683f670
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 16:43:52 2024 +0200 Cleanup commitb4d1ef3fc7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 16:40:48 2024 +0200 Cleanup commitb924bbc9c7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 16:39:43 2024 +0200 Cleanup commit656cc00923
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 16:38:28 2024 +0200 Add missing deps commitb89dc759be
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 16:36:21 2024 +0200 Cleanup commit135ecf0e3a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 16:33:07 2024 +0200 Cleanup commitaf374276e4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 16:30:57 2024 +0200 Extract missing reference error check commit2c42ca5a4b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 14:24:20 2024 +0200 Cleanup commitb905ff7d2c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 14:18:07 2024 +0200 Validate forms again on submit commiteb123bf8ef
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 12:15:14 2024 +0200 Extract token validation commit6e9623153c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 11:55:57 2024 +0200 Remove caching layer for now commitd0f8e9612a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 11:52:39 2024 +0200 Validate name before submitting commit5df0cf545e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 11:33:18 2024 +0200 Remove form-touched work-around commiteac7d9288b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 11:30:53 2024 +0200 Fix on-submit taking old ref-values when user submits before errors have been validated commit05f6cfc4b0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 11:30:45 2024 +0200 Remove unneeded state commit33131fa943
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 11:15:43 2024 +0200 Restore token saving commitca98747dea
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 11:02:21 2024 +0200 Add description with schema commitd2bdc6c624
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 25 10:40:31 2024 +0200 Fix ref logic commit5ca916f8c4
Merge:1ca3f2970
ee057c498
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon Jun 24 20:53:31 2024 +0530 Merge pull request #191 from tokens-studio/tokens-json-export Tokens json export commitee057c498e
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon Jun 24 20:44:08 2024 +0530 Simplify tranform tokens function commite0be30bb79
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 24 15:58:19 2024 +0200 Dont show error when unfocusing name input field, but keep form disabled commit29e3171bd9
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon Jun 24 19:07:53 2024 +0530 Incorporate styling changes to match Penpot design language commitc98162d0bf
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 24 15:24:22 2024 +0200 Move callback function to component commitfb7b11a139
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon Jun 24 18:50:36 2024 +0530 Remove : from token type in export commitdb26b38e81
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon Jun 24 18:47:12 2024 +0530 Modify transform tokens to nest within token names commit28f25da9e8
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 24 14:29:29 2024 +0200 Move to tests commit111900c122
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 24 14:23:28 2024 +0200 Cleanup commit10033ead91
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 24 14:23:03 2024 +0200 Add specific esm testing environment for tokens commit2b3f602312
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon Jun 24 17:50:24 2024 +0530 Move json encode functionalities to tokens namespace commitba6a6059c1
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 24 14:07:21 2024 +0200 Move to custom ns commit69d9c8e88f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 24 12:44:29 2024 +0200 Add esm test commitab51b43365
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 24 12:44:05 2024 +0200 Add type commit0a73cbc6f1
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon Jun 24 14:18:57 2024 +0530 Move transform and download functionality to core.cljs commitbbb09567f6
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon Jun 24 14:18:35 2024 +0530 Remove sample json data commit5c42514170
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 24 09:59:22 2024 +0200 Add style dictionary find-token-reference test commit75bdda6b07
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Sun Jun 23 00:16:15 2024 +0530 add some formatting commit62fc2cf652
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Sun Jun 23 00:10:02 2024 +0530 Add initial working export tokens-json commit5f25bd8a7b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 21 19:41:04 2024 +0200 Add comments commit59780a9d4d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 21 19:40:03 2024 +0200 Add token finding function commit598e4d36fc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 21 17:19:59 2024 +0200 Disable on value error commit910485008f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 21 17:19:13 2024 +0200 Fix name not updating button commit39eb964cb7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 21 17:18:56 2024 +0200 Reduce debounce timeout commitdd62c7fe18
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 21 17:00:56 2024 +0200 Give new tokens without a name a temporary hardcoded string commit1dcdddb2db
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 21 17:00:45 2024 +0200 Check for self references commit941fb041b6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 21 17:00:00 2024 +0200 Add form styling commit8db47b5877
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 21 15:09:46 2024 +0200 Use initial value commit53f01ef46c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 21 15:04:30 2024 +0200 Use input as cache key commit35ee732701
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 21 14:59:08 2024 +0200 Debounced update of resolved value commitf00ac72fbe
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 21 10:10:45 2024 +0200 Revert to use-var commite394216f00
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 21 10:02:21 2024 +0200 Move form out of modal specific code commit1ca3f29708
Merge:f000a5145
80ec74f77
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Thu Jun 20 17:03:45 2024 +0200 Merge pull request #190 from tokens-studio/pr-test Test commit80ec74f77e
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 17:00:38 2024 +0200 Fix resolver and add an oauth2 proxy commitef6074a5af
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 15:35:33 2024 +0200 Test commitf000a51451
Merge:15041a8b9
125e14615
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Thu Jun 20 13:29:37 2024 +0200 Merge pull request #189 from tokens-studio/clean-ci Fix proxy cache for config map commit125e146150
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 13:28:13 2024 +0200 fix proxy cache for config map commit15041a8b9a
Merge:31344a532
5c93cf9cd
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Thu Jun 20 13:04:29 2024 +0200 Merge pull request #188 from tokens-studio/clean-ci Fix font issues commit5c93cf9cd3
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 13:03:49 2024 +0200 Fix font issues Fix minio resolution not working Fix redis auth on by default commit31344a5322
Merge:ea5dbe275
867fd2391
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Thu Jun 20 02:18:31 2024 +0200 Merge pull request #187 from tokens-studio/clean-ci Cleanup commit867fd23917
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 02:15:35 2024 +0200 Cleanup commitea5dbe275e
Merge:dcf4b7ce6
41bd4c621
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Thu Jun 20 02:06:50 2024 +0200 Merge pull request #185 from tokens-studio/feat/mailslurper Feat/mailslurper commit41bd4c621f
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 02:06:21 2024 +0200 Last round of changes commit228665f5f2
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 00:58:10 2024 +0200 Pr should be a prefix commitbe6b217ef0
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 00:49:33 2024 +0200 Fix to use the sanitize the backend tag commit87b1bc12c2
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu Jun 20 00:40:10 2024 +0200 Change asset storage commit4b61e0d80c
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 21:09:18 2024 +0200 Fix branch name detection commitf5514b419a
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 21:02:16 2024 +0200 Use a raw tag commit349bdbb776
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 20:52:33 2024 +0200 Change to use branch names instead of shas commit0fd4f814d8
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 20:47:35 2024 +0200 Remove node affinity commit79b49bae27
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 20:31:21 2024 +0200 Update namespace commitdcf4b7ce64
Merge:596c1997b
f45789596
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 20:16:39 2024 +0200 Merge pull request #186 from tokens-studio/feat/clean-images Add clean images workflow commitf457895961
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 18:15:53 2024 +0000 Add clean images workflow commitb40f222d16
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 20:06:35 2024 +0200 Add quote commit99d6df4588
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 19:58:44 2024 +0200 Build backend as part of PR commit034d5ad5ab
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 19:57:19 2024 +0200 Overhaul penpot chart commit885322d479
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 19 17:17:00 2024 +0200 Reestore fields commit0830a26be9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 19 17:11:28 2024 +0200 Add error state for invalid name commit905ccfdec9
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 16:36:00 2024 +0200 Capitalize chart commite3d73be7c5
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 16:35:46 2024 +0200 Make sure the uppercase goes through commit072baf9c7b
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 16:30:45 2024 +0200 Test PR again commit3e20e15ffd
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 16:22:28 2024 +0200 Try fix PR chart commit6ed788aa5a
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 16:15:20 2024 +0200 Add patch to enable SMTP commit0c45d15fe7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 19 16:01:40 2024 +0200 Variadic function doesn't work for hooks commit596c1997b8
Merge:f3d5b10e1
21ef1586f
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 15:57:35 2024 +0200 Merge pull request #184 from tokens-studio/feat/mailslurper Move config from chart to include the smtp settings commit21ef1586f0
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 15:56:03 2024 +0200 Move config commitf3d5b10e1f
Merge:2ce3a180e
3e94d4685
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 15:37:02 2024 +0200 Merge pull request #183 from tokens-studio/feat/mailslurper Typo in infra manifest commit3e94d46850
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 15:35:15 2024 +0200 Typo commit2ce3a180eb
Merge:caa41146c
569db9d1e
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 15:27:59 2024 +0200 Merge pull request #182 from tokens-studio/feat/mailslurper Try cleanup namespace control commit569db9d1e6
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 15:25:12 2024 +0200 Try cleanup namespace control commitcaa41146c4
Merge:a2292eb38
5e32a5bbf
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 14:56:29 2024 +0200 Merge pull request #181 from tokens-studio/feat/mailslurper Remove onechart for simple manifests commit5e32a5bbfd
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 14:53:21 2024 +0200 Remove onechart for simple manifests commita2292eb387
Merge:4c236ab42
deb7ba982
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 14:43:24 2024 +0200 Merge pull request #180 from tokens-studio/feat/mailslurper Setup mailslurper commitdeb7ba9823
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 14:42:04 2024 +0200 Setup mailslurper commit4c236ab423
Merge:168a5d57d
386bf1bc2
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Wed Jun 19 14:10:43 2024 +0200 Merge pull request #179 from tokens-studio/fix/persistence Add persistence to penpot deploys commit386bf1bc2f
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Wed Jun 19 14:09:35 2024 +0200 Add persistence to penpot deploys commit1596dbe155
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 19 13:54:09 2024 +0200 Add function to verify already used names commitdeb9cb1120
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 19 11:26:29 2024 +0200 Remove debugging code commitf169d49397
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 19 11:18:41 2024 +0200 Remove double cljs conversion commit0a73c3aa95
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 19 11:09:01 2024 +0200 Validation in modal commit168a5d57d4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 19 10:49:35 2024 +0200 Add template commita4ef2ee8bf
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 19 10:42:42 2024 +0200 Add changelog commit83515250da
Merge:0d4e3e862
5a8a32ddc
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed Jun 19 10:10:43 2024 +0200 Merge pull request #168 from tokens-studio/style-dictionary References & Expressions in Tokens commit5a8a32ddc7
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 19 09:43:36 2024 +0200 Remove items with missing references commit23de79bd04
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 19 09:40:26 2024 +0200 Remove unneeded function commit0d4e3e8629
Merge:35135635c
0105e4206
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 19 12:58:54 2024 +0530 Merge pull request #174 from tokens-studio/fix-dimensions-keys-applied Fix keys applied when dimensions or sizing token is applied directly commit35135635c4
Merge:2ed3ea6d6
0afddac5d
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 19 12:58:43 2024 +0530 Merge pull request #175 from tokens-studio/fix-min-max-height-error Fix/ min and max height-width application commit2ed3ea6d6a
Merge:1ebd2ee3d
3bbee9532
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 19 12:58:25 2024 +0530 Merge pull request #177 from tokens-studio/remove-registration-questionnaire Remove registration questionnaire commit3bbee9532f
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 19 12:38:28 2024 +0530 Fix error message commitf99239341f
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 19 12:18:39 2024 +0530 add message to undo this change in the future commitf405612a25
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 19 12:16:54 2024 +0530 Remove Onboarding Questionnaire commit0afddac5d1
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Jun 18 23:52:54 2024 +0530 Fix/ min and max height-width application commit0105e42068
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Jun 18 23:21:17 2024 +0530 Fix keys applied when dimensions or sizing token is applied directly commitb4d7680cb4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 18 11:29:02 2024 +0200 Show resolved value commit742bb6de05
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 18 11:28:09 2024 +0200 Handle tokens with issues in ui commita390942722
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 18 11:19:09 2024 +0200 Resolve token value commitcf52e873e2
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 18 11:13:26 2024 +0200 Cleanup commit5c2891b247
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 18 11:10:51 2024 +0200 Use resolved tokens from style-dictionary commit9261c53aff
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 18 10:23:52 2024 +0200 Don't override original value, add resolved value, add missing reference error commitd65d880845
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 18 09:59:36 2024 +0200 Silence errors commit09609c18ef
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 17 17:07:02 2024 +0200 Remove compile style dictionary commitf0bc262a18
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 17 17:05:51 2024 +0200 Working version commit5a64947b08
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 17 16:13:34 2024 +0200 Add patched StyleDictionary commit0a86e3a651
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri Jun 14 10:52:30 2024 +0200 Simplify commitc9df90577f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Jun 13 09:27:53 2024 +0200 Add compiled library commit965da83c97
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 12 17:14:34 2024 +0200 Add workspace-tokens helper commit9bc48a3a1a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 12 17:14:27 2024 +0200 Allow passing custom cache atom commit908cc2240f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 12 16:48:13 2024 +0200 Docs commita79d1013bf
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 12 16:45:24 2024 +0200 Prevent reprocessing the style-dictionary cache multiple times commit73e8b80521
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 12 16:19:39 2024 +0200 Cleanup commit2f45ab1b62
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 12 16:19:03 2024 +0200 Add hook for using resolved tokens cache commit0921f8043b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed Jun 12 16:10:02 2024 +0200 Allow passing of tokens commitb1b6b5292c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 11 17:52:29 2024 +0200 Disable invalid token style for now commit4fec7d5af2
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 11 17:52:12 2024 +0200 Applying resolved token value commit66b4b892df
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 11 16:43:54 2024 +0200 Fix data-keys being converted to camel-case commit4b90e90974
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 11 16:41:50 2024 +0200 Backporting resolved tokens to the original structure commit1519f8f560
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 11 15:12:30 2024 +0200 Move to ns commite691628648
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 11 10:42:25 2024 +0200 Test out tokens-studio data commitefd4c5dcca
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue Jun 11 10:24:12 2024 +0200 Add performance measuring commita5b22d5427
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 10 15:50:48 2024 +0200 Got resolve working commit7da772d6a2
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 10 11:54:34 2024 +0200 Add sd function commit1023ba866a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 10 10:52:03 2024 +0200 Add StyleDictionary as compiled lib commit1ebd2ee3d7
Merge:dc36f4f6d
8d444b4b0
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Fri Jun 14 12:40:44 2024 +0530 Merge pull request #172 from tokens-studio/hide-unfunctional-token-sections Hide non functional token sections commit8d444b4b02
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu Jun 13 21:33:38 2024 +0530 Hide non functional token types from UI commitdc36f4f6d3
Merge:93c249c77
f10a4f28e
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu Jun 13 12:59:49 2024 +0530 Merge pull request #164 from tokens-studio/other-token-types-context-menu Add context menu for opacity, rotation and stroke width tokens commitf10a4f28ea
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 12 16:18:51 2024 +0530 Add context menu for opacity, rotation and stroke width commit93c249c77a
Merge:01d2a25c8
3f55536fc
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 12 15:29:30 2024 +0530 Merge pull request #161 from tokens-studio/dimensions-context-menu Dimensions context menu commit3f55536fc0
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon Jun 10 23:25:11 2024 +0530 Add custom context menu and fix styling issues with subcontext menu commit842b76f3c1
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Fri Jun 7 01:37:26 2024 +0530 replace 30px with variables commite86038d52f
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Fri Jun 7 01:27:18 2024 +0530 Add CSS to deal with margin before the Sub Context Menu titles commit91eb59696c
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu Jun 6 23:09:22 2024 +0530 Remove children attribute and use submenu instead commit67a34c91d8
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 5 23:19:43 2024 +0530 Add leading spaces to subcontext menu titles commit307f472528
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 5 22:23:27 2024 +0530 remove print statement commita5c235754c
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 5 22:06:59 2024 +0530 Cleanup debug statements commita98d6b4c07
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 5 22:06:31 2024 +0530 Add context menu functionalities for dimensions token commited0d9e1cf5
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 5 13:49:18 2024 +0530 initial dimensions context menu commit819c50eaf8
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed Jun 5 13:49:00 2024 +0530 change dimension to dimensions across commit01d2a25c8c
Merge:e8b755c75
ea593221b
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Jun 4 17:02:04 2024 +0530 Merge pull request #160 from tokens-studio/sizing-token-context-menu Add new changes from token-studio-develop merge commitea593221b3
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Jun 4 15:52:52 2024 +0530 Add new changes from token-studio-develop merge commite8b755c757
Merge:202b72dcd
88d3fc234
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Jun 4 15:47:58 2024 +0530 Merge pull request #159 from tokens-studio/sizing-token-context-menu Add context menu functionalities on sizing tokens commit88d3fc234d
Merge:a553253d2
202b72dcd
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue Jun 4 15:46:02 2024 +0530 Resolve merge conflicts in context_menu.cljs commit202b72dcd0
Merge:1056c6b44
057934c88
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Tue Jun 4 11:23:49 2024 +0200 Merge pull request #132 from tokens-studio/feat/branch-deploys Prefer wait over deploy for build commit057934c883
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Tue Jun 4 11:11:58 2024 +0200 Cleanup PR commit3b3fbc2ccd
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Tue Jun 4 11:06:00 2024 +0200 fix deploys commit1056c6b448
Merge:dc14933f3
580076355
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue Jun 4 10:39:03 2024 +0200 Merge pull request #158 from tokens-studio/142-when-a-token-is-applied-on-a-shape-in-the-context-menu-there-should-be-check-box-indicating-which-attribute-is-applied Show checkmark next to selected token attributes commita553253d28
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon Jun 3 23:34:51 2024 +0530 remove println statement commit193ad115a2
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon Jun 3 23:25:59 2024 +0530 Add context menu functionalities on sizing tokens commit580076355b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 3 15:21:08 2024 +0200 Show checkmark for applied tokens commit65942ef63b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 3 13:39:26 2024 +0200 Use set of attributes for action generation commitc1096e15da
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 3 13:39:16 2024 +0200 Cleanup commitdc14933f3a
Merge:e89f03393
3c3ef57da
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon Jun 3 10:51:04 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commite89f03393b
Merge:5c7e235c9
86e6421b6
Author: Florian Schrödl <contact@florianschroedl.com> Date: Mon Jun 3 10:48:49 2024 +0200 Merge pull request #157 from tokens-studio/florian/input-select Allow token selection with keyboard from right side commit86e6421b68
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 31 16:25:30 2024 +0200 Disable selection when entering with mouse commit710fa0d817
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 31 16:22:01 2024 +0200 Allow arrow selection commit5c7e235c97
Merge:d624a559a
c3cee77ef
Author: Akshay Gupta <akshay@hyma.io> Date: Fri May 31 18:31:37 2024 +0530 Merge pull request #155 from tokens-studio/spacing-context-menu Spacing context menu commitc3cee77efb
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Fri May 31 18:19:42 2024 +0530 remove unused imports and refactor functions commitd624a559aa
Merge:420b8cf52
d16f1c773
Author: Florian Schrödl <contact@florianschroedl.com> Date: Fri May 31 10:46:51 2024 +0200 Merge pull request #150 from tokens-studio/flex-row-gap-commit Spacing tokens commit76347228fe
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu May 30 22:25:21 2024 +0530 Add all spacing token context menu functionalities commit84d96a1004
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed May 29 18:47:17 2024 +0530 Add initial spacing context menu entries commitd16f1c773e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 29 14:53:40 2024 +0200 Change both properties commit7376cb634a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 29 14:32:09 2024 +0200 Add padding x/y tokens commit0e7e37afc2
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 29 14:21:33 2024 +0200 Add padding editable select commit28bdf62454
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 29 13:50:31 2024 +0200 Integrate changes commit420b8cf524
Merge:bdefc97c2
c2c0fbf40
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed May 29 13:20:44 2024 +0200 Merge pull request #146 from tokens-studio/135-flex-row--gap-token-updating-from-the-right-sidebar 135 flex row gap token updating from the right sidebar commit78f3d54dee
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 29 10:55:40 2024 +0200 Add commit commitc2c0fbf40a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 29 09:37:24 2024 +0200 Add spacing/row options commit1ad998de23
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 29 09:28:38 2024 +0200 Use editable-select for col-gap/row-gap commitfb5f7e870a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 29 09:23:47 2024 +0200 Fix drop-down button spacing commit5c83247256
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 29 09:20:14 2024 +0200 Prevent selection on disabled selects commitc6f5da8873
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 29 09:16:55 2024 +0200 Move select styles to select component commit9a7c944763
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 29 09:04:49 2024 +0200 Remove unused classname commit985d8d33ff
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 29 09:02:26 2024 +0200 Add event to passed arguments [*] [*] Needed for layout_container component commit384da8555d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 29 08:50:50 2024 +0200 Dynamically pass props to input commitbdefc97c21
Merge:144b164fa
bb3ee2278
Author: Akshay Gupta <akshay@hyma.io> Date: Tue May 28 17:36:59 2024 +0530 Merge pull request #140 from tokens-studio/general-token-context-menu-functions General token context menu functions and specific context menu functions for border radius commitbb3ee22780
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue May 28 17:03:26 2024 +0530 pass context menu attributes as map and some minor fixes commite02777b855
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Tue May 28 10:23:20 2024 +0200 Be explicit in tagging for prs commit144b164fa0
Merge:169d71b2d
96a7cf2e9
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue May 28 10:06:12 2024 +0200 Merge pull request #139 from tokens-studio/fix-staging Fix staging commiteeb87e49a2
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Tue May 28 09:58:15 2024 +0200 Cleanup github token usage commit9066ad9e39
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue May 28 02:22:25 2024 +0530 Add border radius specific context menu functions commit464bdf3d9c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon May 27 15:09:36 2024 +0200 Use single undo operation for width/height change commit96a7cf2e98
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon May 27 14:50:55 2024 +0200 Convert kebab keys into camelCase commit47d75e7e2a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon May 27 14:43:28 2024 +0200 Remove closed for now commit6ed5dc138d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon May 27 14:43:11 2024 +0200 Fix editing/saving commit169d71b2df
Merge:65563e2d3
6bacd1d66
Author: Florian Schrödl <contact@florianschroedl.com> Date: Mon May 27 11:22:27 2024 +0200 Merge pull request #138 from tokens-studio/124-disable-1password-completion 124 disable 1password completion commit6bacd1d663
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon May 27 11:13:05 2024 +0200 Disable password manager completion commit86d7979e1e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon May 27 11:12:36 2024 +0200 Remove unused component commitd1fc43d8d6
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 27 10:38:35 2024 +0200 Try force deploy branch PR commit370a5d9bb8
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon May 27 13:02:24 2024 +0530 Add initial context menu token specific functionality commit65563e2d3c
Merge:968c6437f
7a8722de1
Author: Akshay Gupta <akshay@hyma.io> Date: Fri May 24 18:13:00 2024 +0530 Merge pull request #133 from tokens-studio/editing-tokens :feat editing tokens commit968c6437fb
Merge:75b935187
cbad5033c
Author: Florian Schrödl <contact@florianschroedl.com> Date: Fri May 24 11:46:45 2024 +0200 Merge pull request #134 from tokens-studio/123-other-fields-to-update Width/Height Token Changing from the sidebar commitcbad5033c2
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 24 11:25:30 2024 +0200 Cleanup commitf52e2e3a41
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 24 10:34:20 2024 +0200 Differentiate width/height sizing selected properties commit49d9b52b12
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 24 10:01:13 2024 +0200 Cleanup commitea9d850412
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 24 10:00:43 2024 +0200 Fix selectionStart not being detectable (selectionStart doesnt work for number) commitb6061cc4a0
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 24 10:00:26 2024 +0200 Fix instant value change applies shape attributes commitbc620ba2cd
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 24 08:55:04 2024 +0200 Update width value commit595831118d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 24 08:36:28 2024 +0200 Allow aligning dropwdown to the left commit406e8d110c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 24 07:34:43 2024 +0200 De-Applying token commit7a8722de1b
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Fri May 24 00:14:17 2024 +0530 Add ability to edit existing token attributes commit5131b79060
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu May 23 16:22:31 2024 +0200 Prefer wait over deploy for build commit75b9351871
Merge:557195cd5
84ad8a6be
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Thu May 23 16:19:31 2024 +0200 Merge pull request #131 from tokens-studio/feat/branch-deploys Test PR deploys commit84ad8a6be6
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu May 23 15:39:21 2024 +0200 Escape interpolation commitf9e1a65631
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu May 23 15:23:27 2024 +0200 Trigger cleanup as well commit66f67ddff4
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Thu May 23 15:13:43 2024 +0200 Test PR deploys commit2dd994799c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu May 23 09:41:16 2024 +0200 Abstract API commite181065bda
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu May 23 09:29:17 2024 +0200 Formatting commit1ed692230b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu May 23 09:24:12 2024 +0200 Abstract functionality commit557195cd55
Merge:2818d097a
80ff7f769
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu May 23 11:05:12 2024 +0200 Merge pull request #130 from tokens-studio/129-bug-file-is-crashing-post-applying-a-border-radius-token-to-a-shape Fix non-optional keys breaking staging server commit80ff7f769c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu May 23 10:53:18 2024 +0200 Fix non-optional keys breaking staging server commit273a9530ea
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu May 23 13:14:28 2024 +0530 initial edit commit commit2818d097ab
Merge:1a144192a
cc0e4af4b
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu May 23 08:43:51 2024 +0200 Merge pull request #128 from tokens-studio/119-higlight-applied-token-in-the-editing-field Show token value inside shapes panel (border-radius) commitcc0e4af4bc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 16:37:19 2024 +0200 Fix token value not being removed after submit commitb1379ed7de
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 16:35:44 2024 +0200 Fix refocus prop not being removed commit5bccfa9e2f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 16:29:18 2024 +0200 Dont submit token when text is selected commit5806ae7426
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 16:20:40 2024 +0200 Abstract functions commit2eb5efb274
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 16:13:58 2024 +0200 Cleanup commit850bf80ffc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 15:59:22 2024 +0200 Replace token with value when inserted after token input commit6f5930bf15
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 15:43:40 2024 +0200 Clear token value on blur commit2efd6e1584
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 15:36:26 2024 +0200 Refocus input on token deletion commit86b493522c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 15:12:56 2024 +0200 Remove unneeded focus hack commit1a144192a9
Merge:cbfcc5056
04c43acf3
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed May 22 15:00:05 2024 +0200 Merge pull request #127 from tokens-studio/fix-sass-pipe-break Dont break pipe when sass has an error commit70336ea45e
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 14:26:37 2024 +0200 Style focused pill commit7e79cf274d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 14:17:56 2024 +0200 Fix input background being clipped on hover commit42df426375
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 14:13:33 2024 +0200 Style pill and input combination commit7c80f87f30
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 14:13:23 2024 +0200 Show value instead of label, add title commit019759392c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 10:23:57 2024 +0200 Unlink token when pressing backspace on empty input field commit7da382dfed
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue May 21 15:47:18 2024 +0200 Clear value when pressing backspace as last action commit35f384ce9b
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue May 21 15:40:34 2024 +0200 Use custom input value logic when token is applied commit50354ccb71
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue May 21 15:40:19 2024 +0200 Fix state being reset at start commit975f41bc08
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue May 21 15:21:01 2024 +0200 Display regular input field when token is applied [*] [*] Numeric input renders default 0 commit04c43acf39
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 13:48:13 2024 +0200 Dont break pipe when sass has an error commitcbfcc50563
Merge:44f55308a
eb168a6f9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 22 13:46:26 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commit44f55308a6
Merge:e874ed5b6
2b1066535
Author: Akshay Gupta <akshay@hyma.io> Date: Wed May 22 15:14:54 2024 +0530 Merge pull request #126 from tokens-studio/rotation-token Add ability to apply rotation token commit2b10665356
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed May 22 15:11:01 2024 +0530 close applied tokens map schema commit13a8872dbd
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed May 22 15:08:05 2024 +0530 add rotation to applied tokens schema commit3793f1791a
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed May 22 13:08:59 2024 +0530 Add ability to apply rotation token commite874ed5b6c
Merge:cb7d4409e
eca133426
Author: Akshay Gupta <akshay@hyma.io> Date: Tue May 21 17:11:21 2024 +0530 Merge pull request #125 from tokens-studio/remember-token-section-state Remember token section open/close state commiteca1334266
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue May 21 16:52:47 2024 +0530 Remember token section open/close state commitcb7d4409e2
Merge:a1f09d69b
9b13444c4
Author: Akshay Gupta <akshay@hyma.io> Date: Tue May 21 13:28:34 2024 +0530 Merge pull request #116 from tokens-studio/spacing-token-layout-update spacing token to update only row or column gap as per flex direction commita1f09d69b0
Merge:162e7b6c5
344a27602
Author: Akshay Gupta <akshay@hyma.io> Date: Tue May 21 13:27:42 2024 +0530 Merge pull request #117 from tokens-studio/sort-tokens-by-insert-order sort tokens by insert order commit344a27602b
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon May 20 22:25:46 2024 +0530 sort tokens by insert order commit9b13444c44
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Mon May 20 21:59:28 2024 +0530 spacing token to update only row or column gap as per flex direction commit162e7b6c58
Merge:90ab485e7
5954a8698
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 20 12:59:50 2024 +0200 Merge branch 'token-studio-develop' of github.com:tokens-studio/tokens-studio-for-penpot into feat/port-tracking-and-smoke commit90ab485e78
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 20 12:56:43 2024 +0200 Needs depend on smoke commit5954a8698b
Merge:ec36e06b7
851054c61
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 20 12:45:42 2024 +0200 Merge pull request #114 from tokens-studio/feat/port-tracking-and-smoke Add port label tracking and add a smoke test commit851054c617
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 20 12:11:29 2024 +0200 Add port label tracking and add a smoke test commitec36e06b7b
Merge:0bd3b0598
3caa9d780
Author: Florian Schrödl <contact@florianschroedl.com> Date: Fri May 17 14:59:28 2024 +0200 Merge pull request #113 from tokens-studio/108-custom-editable-select-for-token-completion Custom editable select for token completion commit3caa9d780a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 17 11:37:36 2024 +0200 Show checkmark icon for applied tokens commitad26d9e2d3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 17 10:55:24 2024 +0200 More styling commit85a40d19ed
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 17 10:26:32 2024 +0200 Extract component commitb61a59d375
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 17 10:16:01 2024 +0200 Extract key down handler commitced325e009
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 17 10:15:22 2024 +0200 Return selected item map instead of value [*] [*] Multiple tokens could have the same value commite69bfb8c54
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 17 09:05:18 2024 +0200 Style select commit8dd2ba7d78
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 17 09:04:50 2024 +0200 Fix naming commitcb980ace44
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 17 09:04:35 2024 +0200 Use regular map for options commit165e222117
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 17 08:17:51 2024 +0200 Only show dropdown when options contain items commitb0dcbae3ac
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 17 08:13:55 2024 +0200 Fix border clipping commit6a8887d9cc
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 17 08:04:23 2024 +0200 Remove text transform commitd2107e7f69
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 17 08:02:06 2024 +0200 Fix width of drop down commit91271b9e41
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 17 07:57:55 2024 +0200 Custom editable-select commit0bd3b0598b
Merge:23ee54b4b
a3d4d6226
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu May 16 18:43:05 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commit23ee54b4b7
Merge:bde2b4b3a
c654766f8
Author: Florian Schrödl <contact@florianschroedl.com> Date: Thu May 16 18:37:46 2024 +0200 Merge pull request #111 from tokens-studio/71-apply-token-from-the-shapes-panel-right-side Apply border radius token from the shapes panel commitbde2b4b3a5
Merge:3e7a42213
c44ac862f
Author: Akshay Gupta <akshay@hyma.io> Date: Thu May 16 17:15:59 2024 +0530 Merge pull request #110 from tokens-studio/duplicate-token add functionality to duplicate token from context menu commitc44ac862f0
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu May 16 15:48:39 2024 +0530 simplify duplicate token function commitc654766f87
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu May 16 11:43:37 2024 +0200 Cleanup outdated props commit5205b684e9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu May 16 11:36:08 2024 +0200 Fix token not being applied commite1ae3d55af
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu May 16 14:08:11 2024 +0530 ad functionality to duplicate token from context menu commit23bee8415a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu May 16 09:59:55 2024 +0200 Fix missing dependency commit48c85d7200
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu May 16 09:55:57 2024 +0200 Simplify token application commit0d154679e9
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu May 16 09:44:11 2024 +0200 Add docstrings commitc60c5ac34f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu May 16 09:33:20 2024 +0200 Apply tokens directly to shape commitcdca00a986
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu May 16 09:02:48 2024 +0200 Extract token apply function commit4e3af1407d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 15 18:28:04 2024 +0200 Fix styling of dropdown items? commit9a58188dc3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 15 18:20:47 2024 +0200 Show border-radius tokens as options commitd9dbaad281
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 15 18:20:28 2024 +0200 Add tokens map generators commit5e301605ad
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 15 17:44:06 2024 +0200 Extract token grouping to core commit622843f18d
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 15 17:43:49 2024 +0200 Take tokens as ref commit8f852bf48f
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 15 17:26:10 2024 +0200 Use :as commit3e7a422136
Merge:f8972efea
591e33340
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed May 15 17:14:41 2024 +0200 Merge pull request #104 from tokens-studio/fix-sizing-dimensions-mixup Fix sizing/dimensions token mixup commit591e333400
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Wed May 15 15:40:07 2024 +0200 Fix sizing/dimensions token mixup commitf8972efea0
Merge:d4dd49bdb
d69cca2d9
Author: Akshay Gupta <akshay@hyma.io> Date: Wed May 15 18:56:42 2024 +0530 Merge pull request #103 from tokens-studio/simple-context-menu fix delimiter mismatch and add missing data/tokens package commitd69cca2d9c
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed May 15 18:50:30 2024 +0530 fix delimiter mismatch and add missing data/tokens package commitd4dd49bdb7
Merge:157bb01e8
ec5a11731
Author: Akshay Gupta <akshay@hyma.io> Date: Wed May 15 18:31:13 2024 +0530 Merge pull request #97 from tokens-studio/simple-context-menu Simple context menu commitec5a117318
Merge:d3d454a43
157bb01e8
Author: Akshay Gupta <akshay@hyma.io> Date: Wed May 15 18:30:53 2024 +0530 Merge branch 'token-studio-develop' into simple-context-menu commitd3d454a43c
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed May 15 14:50:24 2024 +0530 move delete token to tokens actions section commit5fa2048b23
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed May 15 14:40:46 2024 +0530 re-use workspace context menu entry and fix double nested ul commit316db61c8a
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed May 15 13:23:47 2024 +0530 remove warning modal when deletion of a token commitfcd7a35b46
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed May 15 12:59:18 2024 +0530 move context menu functions to data/tokens commit157bb01e8f
Merge:b9e9f9fb1
584ac6341
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Tue May 14 16:39:16 2024 +0200 Merge pull request #99 from tokens-studio/fix/containerization Downtune replica amount. Cleanup redis host commit584ac6341d
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Tue May 14 16:37:16 2024 +0200 Downtune replica amount. Cleanup redis host commitb9e9f9fb13
Merge:d67311b12
4d14d78ee
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue May 14 16:27:19 2024 +0200 Merge pull request #98 from tokens-studio/icons-spacing Add more space between icon and label, fix icon offset commit4d14d78eed
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue May 14 16:01:11 2024 +0200 Add more space between icon and label, fix icon offset commitd67311b126
Merge:230b271be
e6f86cda6
Author: Florian Schrödl <contact@florianschroedl.com> Date: Tue May 14 15:26:01 2024 +0200 Merge pull request #96 from tokens-studio/95-placeholder-icons Add token placeholder icons commit8cb9d9c352
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue May 14 18:48:48 2024 +0530 Add delete token functionality in context menu commit31b487ed86
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue May 14 18:25:08 2024 +0530 remoev translation function commit24f1693684
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Tue May 14 18:10:13 2024 +0530 Add Context Menu for tokens and simple placeholder functions commite6f86cda64
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue May 14 14:24:36 2024 +0200 Add token placeholder icons commit230b271be3
Merge:740024061
677b28218
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue May 14 12:00:45 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commit7400240616
Merge:550045cb3
aa8b1f4c7
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 16:42:34 2024 +0200 Merge pull request #94 from tokens-studio/fix/containerization Chart does auto inject the release name commitaa8b1f4c73
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 16:41:51 2024 +0200 Chart does auto inject the release name commit550045cb3b
Merge:50f69936a
60207fd01
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 16:21:37 2024 +0200 Merge pull request #93 from tokens-studio/fix/containerization Circumvent bug commit60207fd01e
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 16:21:01 2024 +0200 Circumvent bug commit50f69936a4
Merge:d90755531
f9d4b9f69
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 16:10:32 2024 +0200 Merge pull request #92 from tokens-studio/fix/containerization Add missing secretName commitf9d4b9f699
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 16:09:56 2024 +0200 Add missing secretName commitd907555314
Merge:d3c0abc11
e50a46409
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 15:32:21 2024 +0200 Merge pull request #90 from tokens-studio/fix/containerization Add redis. Ingress should be under front end for some reason commite50a46409f
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 15:31:03 2024 +0200 Add redis. Ingress should be under front end for some reason commitd3c0abc11a
Merge:64dc685f2
98d7895e2
Author: Florian Schrödl <contact@florianschroedl.com> Date: Mon May 13 15:09:48 2024 +0200 Merge pull request #85 from tokens-studio/84-border-width Stroke Width commit64dc685f2a
Merge:071df4074
79ce39612
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 15:07:23 2024 +0200 Merge pull request #89 from tokens-studio/fix/containerization Fix pull secrets needed to be a reference commit79ce396122
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 15:06:22 2024 +0200 Fix pull secrets needed to be a reference commit071df4074f
Merge:309abec88
0ce5c165d
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 14:43:15 2024 +0200 Merge pull request #88 from tokens-studio/fix/containerization Update secrets commit0ce5c165db
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 14:41:58 2024 +0200 Update secrets commit309abec88a
Merge:425155153
10aaa966f
Author: SorsOps <80043879+SorsOps@users.noreply.github.com> Date: Mon May 13 14:26:44 2024 +0200 Merge pull request #87 from tokens-studio/fix/containerization Change deploy to use alternate chart as truecharts using a weird helm… commit10aaa966f9
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Mon May 13 14:25:07 2024 +0200 Change deploy to use alternate chart as truecharts using a weird helm dependency commit98d7895e2a
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Mon May 13 11:23:30 2024 +0200 Add stroke-width token commit4251551535
Merge:eafd4f01e
ae263363e
Author: Florian Schrödl <contact@florianschroedl.com> Date: Fri May 10 17:36:50 2024 +0200 Merge pull request #83 from tokens-studio/82-opacity Add opacity commiteafd4f01eb
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Fri May 10 14:34:05 2024 +0200 Use raw manifests commit153ea95a55
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Fri May 10 14:02:34 2024 +0200 Typo commit16c893fa60
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Fri May 10 14:01:08 2024 +0200 Add matrix for docker build commit0e94c9851a
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Fri May 10 13:59:09 2024 +0200 Move workflow file commit07583b5e34
Author: SorsOps <80043879+sorsOps@users.noreply.github.com> Date: Fri May 10 13:57:17 2024 +0200 Add deployment config commitae263363ed
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu May 9 21:36:38 2024 +0530 Add opacity commit4e3ee7bdab
Merge:5efcb0f42
42b25479b
Author: Florian Schrödl <contact@florianschroedl.com> Date: Fri May 10 12:05:06 2024 +0200 Merge pull request #81 from tokens-studio/value-resolve Value resolve commit42b25479b3
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 10 10:36:56 2024 +0200 Highlight invalid token values commit5813acea02
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 10 10:26:22 2024 +0200 Log whole token commitdf48295903
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 10 10:22:09 2024 +0200 Add resolving function and move to core ns commit5efcb0f424
Merge:2ed4ece23
6d5beb758
Author: Akshay Gupta <akshay@hyma.io> Date: Fri May 10 12:25:23 2024 +0530 Merge pull request #78 from tokens-studio/fix-assets-panel-view Fix assets panel tab view commit2ed4ece23d
Merge:d81b1f328
9a243e3b4
Author: Akshay Gupta <akshay@hyma.io> Date: Fri May 10 12:22:03 2024 +0530 Merge pull request #76 from tokens-studio/token-pills-wrap Add flex wrap to token pills wrapper commitd81b1f328d
Merge:68a201374
0c856702c
Author: Akshay Gupta <akshay@hyma.io> Date: Fri May 10 12:21:38 2024 +0530 Merge pull request #80 from tokens-studio/add-spacing-function Add simple token spacing application commit0c856702c6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Fri May 10 08:36:40 2024 +0200 Remove unneeded import commit76a38bcb0c
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu May 9 21:36:38 2024 +0530 Add simple token spacing application commit6d5beb7583
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu May 9 18:42:33 2024 +0530 Fix assets panel tab view commit9a243e3b4f
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Thu May 9 17:51:48 2024 +0530 Add flex wrap to token pills wrapper commit68a201374c
Merge:11d4496e9
69ed15e78
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed May 8 14:29:15 2024 +0200 Merge pull request #74 from tokens-studio/70-sort-sections-by-tokens Sort token groups commit11d4496e9a
Merge:6fa1d6eec
fd3922936
Author: Florian Schrödl <contact@florianschroedl.com> Date: Wed May 8 14:29:02 2024 +0200 Merge pull request #68 from tokens-studio/65-dimensions Dimensions Token commit6fa1d6eecc
Merge:6bb4eec80
3d13015e3
Author: Akshay Gupta <akshay@hyma.io> Date: Wed May 8 17:52:33 2024 +0530 Merge pull request #66 from tokens-studio/close-token-modal add ability to close modal once save token button is clicked commit69ed15e789
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Apr 25 19:00:00 2024 +0200 Remove search bar commite5a7f87d1c
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Apr 25 19:00:00 2024 +0200 Sort token groups commitfd39229367
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Apr 25 19:00:00 2024 +0200 Add shape dimensions updating commita9aac4c867
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Apr 25 19:00:00 2024 +0200 Move emit to the shape update function [*] [*] A shape update might need multiple emit functions commit3d13015e30
Author: Akshay Gupta <gravity.akshay@gmail.com> Date: Wed May 8 15:16:11 2024 +0530 add ability to close modal once save token button is clicked commit28e6db9bb4
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Apr 25 19:00:00 2024 +0200 Reuse attribute keys from token schema commit6bb4eec805
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Apr 25 19:00:00 2024 +0200 Remove unneeded on-apply prop commit76f42a0aec
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Apr 25 19:00:00 2024 +0200 Cleanup on-apply-token function commitf71ce60b11
Merge:e5c564041
e7b065ac6
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Tue May 7 14:39:33 2024 +0200 Merge remote-tracking branch 'penpot/develop' into token-studio-develop commite5c5640413
Author: Florian Schroedl <flo.schroedl@gmail.com> Date: Thu Apr 25 19:00:00 2024 +0200 Start tokens studio plugin base
This commit is contained in:
parent
d500058aa9
commit
50125fe264
86 changed files with 3463 additions and 1050 deletions
|
@ -415,6 +415,12 @@
|
|||
[:type [:= :add-token-sets]]
|
||||
[:token-sets [:sequential ::ctot/token-set]]]]
|
||||
|
||||
[:rename-token-set-group
|
||||
[:map {:title "RenameTokenSetGroup"}
|
||||
[:type [:= :rename-token-set-group]]
|
||||
[:from-path-str :string]
|
||||
[:to-path-str :string]]]
|
||||
|
||||
[:mod-token-set
|
||||
[:map {:title "ModTokenSetChange"}
|
||||
[:type [:= :mod-token-set]]
|
||||
|
@ -1063,6 +1069,13 @@
|
|||
(ctob/ensure-tokens-lib)
|
||||
(ctob/add-sets (map ctob/make-token-set token-sets)))))
|
||||
|
||||
(defmethod process-change :rename-token-set-group
|
||||
[data {:keys [from-path-str to-path-str]}]
|
||||
(update data :tokens-lib (fn [lib]
|
||||
(-> lib
|
||||
(ctob/ensure-tokens-lib)
|
||||
(ctob/rename-set-group from-path-str to-path-str)))))
|
||||
|
||||
(defmethod process-change :mod-token-set
|
||||
[data {:keys [name token-set]}]
|
||||
(update data :tokens-lib (fn [lib]
|
||||
|
@ -1153,7 +1166,7 @@
|
|||
; We need to trigger a sync if the shape has changed any
|
||||
; attribute that participates in components synchronization.
|
||||
(and (= (:type operation) :set)
|
||||
(get ctk/sync-attrs (:attr operation))))
|
||||
(ctk/component-attr? (:attr operation))))
|
||||
any-sync? (some need-sync? operations)]
|
||||
(when any-sync?
|
||||
(if page-id
|
||||
|
|
|
@ -812,6 +812,14 @@
|
|||
(update :undo-changes conj {:type :del-token-set :name (:name token-set)})
|
||||
(apply-changes-local)))
|
||||
|
||||
(defn rename-token-set-group
|
||||
[changes from-path-str to-path-str]
|
||||
(-> changes
|
||||
(update :redo-changes conj {:type :rename-token-set-group :from-path-str from-path-str :to-path-str to-path-str})
|
||||
;; TODO: Figure out undo
|
||||
#_(update :undo-changes conj {:type :rename-token-set-group :name (:name token-set) :token-set (or prev-token-set token-set)})
|
||||
(apply-changes-local)))
|
||||
|
||||
(defn update-token-set
|
||||
[changes token-set prev-token-set]
|
||||
(-> changes
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
[app.common.types.shape-tree :as ctst]
|
||||
[app.common.types.shape.interactions :as ctsi]
|
||||
[app.common.types.shape.layout :as ctl]
|
||||
[app.common.types.token :as cto]
|
||||
[app.common.types.typography :as cty]
|
||||
[app.common.uuid :as uuid]
|
||||
[clojure.set :as set]
|
||||
|
@ -1479,6 +1480,44 @@
|
|||
[{:type :set-remote-synced
|
||||
:remote-synced (:remote-synced shape)}]}))))))
|
||||
|
||||
(defn- update-tokens
|
||||
"Token synchronization algorithm. Copy the applied tokens that have changed
|
||||
in the origin shape to the dest shape (applying or removing as necessary).
|
||||
|
||||
Only the given token attributes are synced."
|
||||
[changes container dest-shape orig-shape token-attrs]
|
||||
(let [orig-tokens (get orig-shape :applied-tokens {})
|
||||
dest-tokens (get dest-shape :applied-tokens {})
|
||||
dest-tokens' (reduce (fn [dest-tokens' token-attr]
|
||||
(let [orig-token (get orig-tokens token-attr)
|
||||
dest-token (get dest-tokens token-attr)]
|
||||
(if (= orig-token dest-token)
|
||||
dest-tokens'
|
||||
(if (nil? orig-token)
|
||||
(dissoc dest-tokens' token-attr)
|
||||
(assoc dest-tokens' token-attr orig-token)))))
|
||||
dest-tokens
|
||||
token-attrs)]
|
||||
(if (= dest-tokens dest-tokens')
|
||||
changes
|
||||
(-> changes
|
||||
(update :redo-changes conj (make-change
|
||||
container
|
||||
{:type :mod-obj
|
||||
:id (:id dest-shape)
|
||||
:operations [{:type :set
|
||||
:attr :applied-tokens
|
||||
:val dest-tokens'
|
||||
:ignore-touched true}]}))
|
||||
(update :undo-changes conj (make-change
|
||||
container
|
||||
{:type :mod-obj
|
||||
:id (:id dest-shape)
|
||||
:operations [{:type :set
|
||||
:attr :applied-tokens
|
||||
:val dest-tokens
|
||||
:ignore-touched true}]}))))))
|
||||
|
||||
(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.
|
||||
|
@ -1511,37 +1550,41 @@
|
|||
(loop [attrs (->> (seq (keys ctk/sync-attrs))
|
||||
;; We don't update the flex-child attrs
|
||||
(remove ctk/swap-keep-attrs)
|
||||
|
||||
;; We don't do automatic update of the `layout-grid-cells` property.
|
||||
(remove #(= :layout-grid-cells %)))
|
||||
applied-tokens #{}
|
||||
roperations []
|
||||
uoperations '()]
|
||||
|
||||
(let [attr (first attrs)]
|
||||
(if (nil? attr)
|
||||
(if (empty? roperations)
|
||||
(if (and (empty? roperations) (empty? applied-tokens))
|
||||
changes
|
||||
(let [all-parents (cfh/get-parent-ids (:objects container)
|
||||
(:id dest-shape))]
|
||||
(-> changes
|
||||
(update :redo-changes conj (make-change
|
||||
container
|
||||
{:type :mod-obj
|
||||
:id (:id dest-shape)
|
||||
:operations roperations}))
|
||||
(update :redo-changes conj (make-change
|
||||
container
|
||||
{:type :reg-objects
|
||||
:shapes all-parents}))
|
||||
(update :undo-changes conj (make-change
|
||||
container
|
||||
{:type :mod-obj
|
||||
:id (:id dest-shape)
|
||||
:operations (vec uoperations)}))
|
||||
(update :undo-changes concat [(make-change
|
||||
container
|
||||
{:type :reg-objects
|
||||
:shapes all-parents})]))))
|
||||
(cond-> changes
|
||||
(seq roperations)
|
||||
(-> (update :redo-changes conj (make-change
|
||||
container
|
||||
{:type :mod-obj
|
||||
:id (:id dest-shape)
|
||||
:operations roperations}))
|
||||
(update :redo-changes conj (make-change
|
||||
container
|
||||
{:type :reg-objects
|
||||
:shapes all-parents}))
|
||||
(update :undo-changes conj (make-change
|
||||
container
|
||||
{:type :mod-obj
|
||||
:id (:id dest-shape)
|
||||
:operations (vec uoperations)}))
|
||||
(update :undo-changes concat [(make-change
|
||||
container
|
||||
{:type :reg-objects
|
||||
:shapes all-parents})]))
|
||||
(seq applied-tokens)
|
||||
(update-tokens container dest-shape origin-shape applied-tokens))))
|
||||
|
||||
(let [;; position-data is a special case because can be affected by :geometry-group and :content-group
|
||||
;; so, if the position-data changes but the geometry is touched we need to reset the position-data
|
||||
;; so it's calculated again
|
||||
|
@ -1564,14 +1607,21 @@
|
|||
:val (get dest-shape attr)
|
||||
:ignore-touched true}
|
||||
|
||||
attr-group (get ctk/sync-attrs attr)]
|
||||
attr-group (get ctk/sync-attrs attr)
|
||||
|
||||
token-attrs (cto/shape-attr->token-attrs attr)
|
||||
applied-tokens' (cond-> applied-tokens
|
||||
(not (and (touched attr-group)
|
||||
omit-touched?))
|
||||
(into token-attrs))]
|
||||
(if (or (= (get origin-shape attr) (get dest-shape attr))
|
||||
(and (touched attr-group) omit-touched?))
|
||||
(recur (next attrs)
|
||||
applied-tokens'
|
||||
roperations
|
||||
uoperations)
|
||||
(recur (next attrs)
|
||||
applied-tokens'
|
||||
(conj roperations roperation)
|
||||
(conj uoperations uoperation)))))))))
|
||||
|
||||
|
|
|
@ -14,8 +14,35 @@
|
|||
[app.common.types.container :as ctn]
|
||||
[app.common.types.shape.interactions :as ctsi]
|
||||
[app.common.types.shape.layout :as ctl]
|
||||
[app.common.types.token :as cto]
|
||||
[app.common.uuid :as uuid]))
|
||||
|
||||
(defn- generate-unapply-tokens
|
||||
"When updating attributes that have a token applied, we must unapply it, because the value
|
||||
of the attribute now has been given directly, and does not come from the token."
|
||||
[changes objects]
|
||||
(let [mod-obj-changes (->> (:redo-changes changes)
|
||||
(filter #(= (:type %) :mod-obj)))
|
||||
|
||||
check-attr (fn [shape changes attr]
|
||||
(let [tokens (get shape :applied-tokens {})
|
||||
token-attrs (cto/shape-attr->token-attrs attr)]
|
||||
(if (some #(contains? tokens %) token-attrs)
|
||||
(pcb/update-shapes changes [(:id shape)] #(cto/unapply-token-id % token-attrs))
|
||||
changes)))
|
||||
|
||||
check-shape (fn [changes mod-obj-change]
|
||||
(let [shape (get objects (:id mod-obj-change))
|
||||
xf (comp (filter #(= (:type %) :set))
|
||||
(map :attr))
|
||||
attrs (into [] xf (:operations mod-obj-change))]
|
||||
(reduce (partial check-attr shape)
|
||||
changes
|
||||
attrs)))]
|
||||
(reduce check-shape
|
||||
changes
|
||||
mod-obj-changes)))
|
||||
|
||||
(defn generate-update-shapes
|
||||
[changes ids update-fn objects {:keys [attrs ignore-tree ignore-touched with-objects?]}]
|
||||
(let [changes (reduce
|
||||
|
@ -29,8 +56,12 @@
|
|||
(pcb/with-objects objects))
|
||||
ids)
|
||||
grid-ids (->> ids (filter (partial ctl/grid-layout? objects)))
|
||||
changes (pcb/update-shapes changes grid-ids ctl/assign-cell-positions {:with-objects? true})
|
||||
changes (pcb/reorder-grid-children changes ids)]
|
||||
changes (-> changes
|
||||
(pcb/update-shapes grid-ids ctl/assign-cell-positions {:with-objects? true})
|
||||
(pcb/reorder-grid-children ids)
|
||||
(cond->
|
||||
(not ignore-touched)
|
||||
(generate-unapply-tokens objects)))]
|
||||
changes))
|
||||
|
||||
(defn- generate-update-shape-flags
|
||||
|
|
42
common/src/app/common/logic/tokens.cljc
Normal file
42
common/src/app/common/logic/tokens.cljc
Normal file
|
@ -0,0 +1,42 @@
|
|||
(ns app.common.logic.tokens
|
||||
(:require
|
||||
[app.common.files.changes-builder :as pcb]
|
||||
[app.common.types.tokens-lib :as ctob]))
|
||||
|
||||
(defn generate-update-active-sets
|
||||
"Copy the active sets from the currently active themes and move them to the hidden token theme and update the theme with `update-hidden-theme-fn`.
|
||||
|
||||
Use this for managing sets active state without having to modify a user created theme (\"no themes selected\" state in the ui)."
|
||||
[changes tokens-lib update-hidden-theme-fn]
|
||||
(let [prev-active-token-themes (ctob/get-active-theme-paths tokens-lib)
|
||||
active-token-set-names (ctob/get-active-themes-set-names tokens-lib)
|
||||
|
||||
prev-hidden-token-theme (ctob/get-hidden-theme tokens-lib)
|
||||
hidden-token-theme (-> (or (some-> prev-hidden-token-theme (ctob/set-sets active-token-set-names))
|
||||
(ctob/make-hidden-token-theme :sets active-token-set-names))
|
||||
(update-hidden-theme-fn))
|
||||
|
||||
changes (-> changes
|
||||
(pcb/update-active-token-themes #{ctob/hidden-token-theme-path} prev-active-token-themes))
|
||||
|
||||
changes (if prev-hidden-token-theme
|
||||
(pcb/update-token-theme changes hidden-token-theme prev-hidden-token-theme)
|
||||
(pcb/add-token-theme changes hidden-token-theme))]
|
||||
changes))
|
||||
|
||||
(defn generate-toggle-token-set
|
||||
"Toggle a token set at `set-name` in `tokens-lib` without modifying a user theme."
|
||||
[changes tokens-lib set-name]
|
||||
(generate-update-active-sets changes tokens-lib #(ctob/toggle-set % set-name)))
|
||||
|
||||
(defn generate-toggle-token-set-group
|
||||
"Toggle a token set group at `prefixed-set-path-str` in `tokens-lib` without modifying a user theme."
|
||||
[changes tokens-lib prefixed-set-path-str]
|
||||
(let [deactivate? (contains? #{:all :partial} (ctob/sets-at-path-all-active? tokens-lib prefixed-set-path-str))
|
||||
sets-names (->> (ctob/get-sets-at-prefix-path tokens-lib prefixed-set-path-str)
|
||||
(map :name)
|
||||
(into #{}))
|
||||
update-fn (if deactivate?
|
||||
#(ctob/disable-sets % sets-names)
|
||||
#(ctob/enable-sets % sets-names))]
|
||||
(generate-update-active-sets changes tokens-lib update-fn)))
|
|
@ -58,6 +58,12 @@
|
|||
(validate-file! file')
|
||||
file'))
|
||||
|
||||
(defn apply-undo-changes
|
||||
[file changes]
|
||||
(let [file' (ctf/update-file-data file #(cfc/process-changes % (:undo-changes changes) true))]
|
||||
(validate-file! file')
|
||||
file'))
|
||||
|
||||
;; ----- Pages
|
||||
|
||||
(defn sample-page
|
||||
|
|
93
common/src/app/common/test_helpers/tokens.cljc
Normal file
93
common/src/app/common/test_helpers/tokens.cljc
Normal file
|
@ -0,0 +1,93 @@
|
|||
;; 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.common.test-helpers.tokens
|
||||
(:require
|
||||
[app.common.test-helpers.files :as thf]
|
||||
[app.common.test-helpers.shapes :as ths]
|
||||
[app.common.types.container :as ctn]
|
||||
[app.common.types.file :as ctf]
|
||||
[app.common.types.pages-list :as ctpl]
|
||||
[app.common.types.shape-tree :as ctst]
|
||||
[app.common.types.token :as cto]
|
||||
[app.common.types.tokens-lib :as ctob]))
|
||||
|
||||
(defn get-tokens-lib
|
||||
[file]
|
||||
(:tokens-lib (ctf/file-data file)))
|
||||
|
||||
(defn add-tokens-lib
|
||||
[file]
|
||||
(ctf/update-file-data file #(update % :tokens-lib ctob/ensure-tokens-lib)))
|
||||
|
||||
(defn update-tokens-lib
|
||||
[file f]
|
||||
(ctf/update-file-data file #(update % :tokens-lib f)))
|
||||
|
||||
(defn get-token
|
||||
[file set-name token-name]
|
||||
(let [tokens-lib (:tokens-lib (:data file))]
|
||||
(when tokens-lib
|
||||
(-> tokens-lib
|
||||
(ctob/get-set set-name)
|
||||
(ctob/get-token token-name)))))
|
||||
|
||||
(defn- set-stroke-width
|
||||
[shape stroke-width]
|
||||
(let [strokes (if (seq (:strokes shape))
|
||||
(:strokes shape)
|
||||
[{:stroke-style :solid
|
||||
:stroke-alignment :inner
|
||||
:stroke-width 1
|
||||
:stroke-color "#000000"
|
||||
:stroke-opacity 1}])
|
||||
new-strokes (update strokes 0 assoc :stroke-width stroke-width)]
|
||||
(ctn/set-shape-attr shape :strokes new-strokes {:ignore-touched true})))
|
||||
|
||||
(defn- set-stroke-color
|
||||
[shape stroke-color]
|
||||
(let [strokes (if (seq (:strokes shape))
|
||||
(:strokes shape)
|
||||
[{:stroke-style :solid
|
||||
:stroke-alignment :inner
|
||||
:stroke-width 1
|
||||
:stroke-color "#000000"
|
||||
:stroke-opacity 1}])
|
||||
new-strokes (update strokes 0 assoc :stroke-color stroke-color)]
|
||||
(ctn/set-shape-attr shape :strokes new-strokes {:ignore-touched true})))
|
||||
|
||||
(defn- set-fill-color
|
||||
[shape fill-color]
|
||||
(let [fills (if (seq (:fills shape))
|
||||
(:fills shape)
|
||||
[{:fill-color "#000000"
|
||||
:fill-opacity 1}])
|
||||
new-fills (update fills 0 assoc :fill-color fill-color)]
|
||||
(ctn/set-shape-attr shape :fills new-fills {:ignore-touched true})))
|
||||
|
||||
(defn apply-token-to-shape
|
||||
[file shape-label token-name token-attrs shape-attrs resolved-value]
|
||||
(let [page (thf/current-page file)
|
||||
shape (ths/get-shape file shape-label)
|
||||
shape' (as-> shape $
|
||||
(cto/apply-token-to-shape {:shape $
|
||||
:token {:name token-name}
|
||||
:attributes token-attrs})
|
||||
(reduce (fn [shape attr]
|
||||
(case attr
|
||||
:stroke-width (set-stroke-width shape resolved-value)
|
||||
:stroke-color (set-stroke-color shape resolved-value)
|
||||
:fill (set-fill-color shape resolved-value)
|
||||
(ctn/set-shape-attr shape attr resolved-value {:ignore-touched true})))
|
||||
$
|
||||
shape-attrs))]
|
||||
|
||||
(ctf/update-file-data
|
||||
file
|
||||
(fn [file-data]
|
||||
(ctpl/update-page file-data
|
||||
(:id page)
|
||||
#(ctst/set-shape % shape'))))))
|
|
@ -138,6 +138,14 @@
|
|||
:layout-item-z-index
|
||||
:layout-item-align-self})
|
||||
|
||||
(defn component-attr?
|
||||
"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."
|
||||
[attr]
|
||||
(or (get sync-attrs attr)
|
||||
(= :applied-tokens attr)))
|
||||
|
||||
(defn instance-root?
|
||||
"Check if this shape is the head of a top instance."
|
||||
[shape]
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
[app.common.types.plugins :as ctpg]
|
||||
[app.common.types.shape-tree :as ctst]
|
||||
[app.common.types.shape.layout :as ctl]
|
||||
[app.common.types.token :as ctt]
|
||||
[app.common.uuid :as uuid]))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
@ -540,14 +541,28 @@
|
|||
|
||||
;; --- SHAPE UPDATE
|
||||
|
||||
(defn- get-token-groups
|
||||
[shape new-applied-tokens]
|
||||
(let [old-applied-tokens (d/nilv (:applied-tokens shape) #{})
|
||||
changed-token-attrs (filter #(not= (get old-applied-tokens %) (get new-applied-tokens %))
|
||||
ctt/all-keys)
|
||||
changed-groups (into #{}
|
||||
(comp (map ctt/token-attr->shape-attr)
|
||||
(map #(get ctk/sync-attrs %))
|
||||
(filter some?))
|
||||
changed-token-attrs)]
|
||||
changed-groups))
|
||||
|
||||
(defn set-shape-attr
|
||||
"Assign attribute to shape with touched logic.
|
||||
|
||||
The returned shape will contain a metadata associated with it
|
||||
indicating if shape is touched or not."
|
||||
[shape attr val & {:keys [ignore-touched ignore-geometry]}]
|
||||
(let [group (get ctk/sync-attrs attr)
|
||||
shape-val (get shape attr)
|
||||
(let [group (get ctk/sync-attrs attr)
|
||||
token-groups (when (= attr :applied-tokens)
|
||||
(get-token-groups shape val))
|
||||
shape-val (get shape attr)
|
||||
|
||||
ignore?
|
||||
(or ignore-touched
|
||||
|
@ -585,9 +600,15 @@
|
|||
;; set the "touched" flag for the group the attribute belongs to.
|
||||
;; In some cases we need to ignore touched only if the attribute is
|
||||
;; geometric (position, width or transformation).
|
||||
(and in-copy? group (not ignore?) (not equal?)
|
||||
(not (and ignore-geometry is-geometry?)))
|
||||
(-> (update :touched ctk/set-touched-group group)
|
||||
(and in-copy?
|
||||
(or (and group (not equal?)) (seq token-groups))
|
||||
(not ignore?) (not (and ignore-geometry is-geometry?)))
|
||||
(-> (update :touched (fn [touched]
|
||||
(reduce #(ctk/set-touched-group %1 %2)
|
||||
touched
|
||||
(if group
|
||||
(cons group token-groups)
|
||||
token-groups))))
|
||||
(dissoc :remote-synced))
|
||||
|
||||
(nil? val)
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
(ns app.common.types.token
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.schema :as sm]
|
||||
[app.common.schema.registry :as sr]
|
||||
[clojure.data :as data]
|
||||
[clojure.set :as set]
|
||||
[malli.util :as mu]))
|
||||
|
||||
|
@ -148,6 +150,15 @@
|
|||
|
||||
(def rotation-keys (schema-keys ::rotation))
|
||||
|
||||
(def all-keys (set/union color-keys
|
||||
border-radius-keys
|
||||
stroke-width-keys
|
||||
sizing-keys
|
||||
opacity-keys
|
||||
spacing-keys
|
||||
dimensions-keys
|
||||
rotation-keys))
|
||||
|
||||
(sm/register!
|
||||
^{::sm/type ::tokens}
|
||||
[:map {:title "Applied Tokens"}])
|
||||
|
@ -161,3 +172,59 @@
|
|||
::spacing
|
||||
::rotation
|
||||
::dimensions])
|
||||
|
||||
(defn shape-attr->token-attrs
|
||||
[shape-attr]
|
||||
(cond
|
||||
(= :fills shape-attr) #{:fill}
|
||||
(= :strokes shape-attr) #{:stroke-color :stroke-width}
|
||||
(border-radius-keys shape-attr) #{shape-attr}
|
||||
(sizing-keys shape-attr) #{shape-attr}
|
||||
(opacity-keys shape-attr) #{shape-attr}
|
||||
(spacing-keys shape-attr) #{shape-attr}
|
||||
(rotation-keys shape-attr) #{shape-attr}))
|
||||
|
||||
(defn token-attr->shape-attr
|
||||
[token-attr]
|
||||
(case token-attr
|
||||
:fill :fills
|
||||
:stroke-color :strokes
|
||||
:stroke-width :strokes
|
||||
token-attr))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; TOKENS IN SHAPES
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defn- toggle-or-apply-token
|
||||
"Remove any shape attributes from token if they exists.
|
||||
Othewise apply token attributes."
|
||||
[shape token]
|
||||
(let [[shape-leftover token-leftover _matching] (data/diff (:applied-tokens shape) token)]
|
||||
(merge {} shape-leftover token-leftover)))
|
||||
|
||||
(defn- token-from-attributes [token attributes]
|
||||
(->> (map (fn [attr] [attr (:name token)]) attributes)
|
||||
(into {})))
|
||||
|
||||
(defn- apply-token-to-attributes [{:keys [shape token attributes]}]
|
||||
(let [token (token-from-attributes token attributes)]
|
||||
(toggle-or-apply-token shape token)))
|
||||
|
||||
(defn apply-token-to-shape
|
||||
[{:keys [shape token attributes] :as _props}]
|
||||
(let [applied-tokens (apply-token-to-attributes {:shape shape
|
||||
:token token
|
||||
:attributes attributes})]
|
||||
(update shape :applied-tokens #(merge % applied-tokens))))
|
||||
|
||||
(defn maybe-apply-token-to-shape
|
||||
"When the passed `:token` is non-nil apply it to the `:applied-tokens` on a shape."
|
||||
[{:keys [shape token _attributes] :as props}]
|
||||
(if token
|
||||
(apply-token-to-shape props)
|
||||
shape))
|
||||
|
||||
(defn unapply-token-id [shape attributes]
|
||||
(update shape :applied-tokens d/without-keys attributes))
|
||||
|
||||
|
|
|
@ -183,8 +183,38 @@
|
|||
|
||||
(def set-separator "/")
|
||||
|
||||
(defn join-set-path [set-path]
|
||||
(join-path set-path set-separator))
|
||||
(defn join-set-path-str [& args]
|
||||
(->> (filter some? args)
|
||||
(str/join set-separator)))
|
||||
|
||||
(defn join-set-path [path]
|
||||
(join-path path set-separator))
|
||||
|
||||
(defn split-set-str-path-prefix
|
||||
"Split set-path
|
||||
|
||||
E.g.: \"S-some-set\" -> [\"S-\" \"some-set\"]
|
||||
\"G-some-group\" -> [\"G-\" \"some-group\"]"
|
||||
[path-str]
|
||||
(some->> path-str
|
||||
(re-matches #"^([SG]-)(.*)")
|
||||
(rest)))
|
||||
|
||||
(defn add-set-path-prefix [set-name-str]
|
||||
(str set-prefix set-name-str))
|
||||
|
||||
(defn add-set-path-group-prefix [group-path-str]
|
||||
(str set-group-prefix group-path-str))
|
||||
|
||||
(defn set-full-path->set-prefixed-full-path
|
||||
"Returns token-set paths with prefixes to differentiate between sets and set-groups.
|
||||
|
||||
Sets will be prefixed with `set-prefix` (S-).
|
||||
Set groups will be prefixed with `set-group-prefix` (G-)."
|
||||
[full-path]
|
||||
(let [set-path (mapv add-set-path-group-prefix (butlast full-path))
|
||||
set-name (add-set-path-prefix (last full-path))]
|
||||
(conj set-path set-name)))
|
||||
|
||||
(defn split-set-prefix [set-path]
|
||||
(some->> set-path
|
||||
|
@ -230,6 +260,48 @@
|
|||
path-part)))
|
||||
(join-set-path)))
|
||||
|
||||
(defn get-token-set-final-name [path]
|
||||
(-> (split-token-set-path path)
|
||||
(last)))
|
||||
|
||||
(defn set-name->prefixed-full-path [name-str]
|
||||
(-> (split-token-set-path name-str)
|
||||
(set-full-path->set-prefixed-full-path)))
|
||||
|
||||
(defn get-token-set-prefixed-path [token-set]
|
||||
(let [path (get-path token-set set-separator)]
|
||||
(set-full-path->set-prefixed-full-path path)))
|
||||
|
||||
(defn get-prefixed-token-set-final-prefix [prefixed-path-str]
|
||||
(some-> (get-token-set-final-name prefixed-path-str)
|
||||
(split-set-str-path-prefix)
|
||||
(first)))
|
||||
|
||||
(defn set-name-string->prefixed-set-path-string [name-str]
|
||||
(-> (set-name->prefixed-full-path name-str)
|
||||
(join-set-path)))
|
||||
|
||||
(defn prefixed-set-path-string->set-path [path-str]
|
||||
(->> (split-token-set-path path-str)
|
||||
(map (fn [path-part]
|
||||
(or (-> (split-set-str-path-prefix path-part)
|
||||
(second))
|
||||
path-part)))))
|
||||
|
||||
(defn prefixed-set-path-string->set-name-string [path-str]
|
||||
(->> (prefixed-set-path-string->set-path path-str)
|
||||
(join-set-path)))
|
||||
|
||||
(defn prefixed-set-path-final-group?
|
||||
"Predicate if the given prefixed path string ends with a group."
|
||||
[prefixed-path-str]
|
||||
(= (get-prefixed-token-set-final-prefix prefixed-path-str) set-group-prefix))
|
||||
|
||||
(defn prefixed-set-path-final-set?
|
||||
"Predicate if the given prefixed path string ends with a set."
|
||||
[prefixed-path-str]
|
||||
(= (get-prefixed-token-set-final-prefix prefixed-path-str) set-prefix))
|
||||
|
||||
(defn tokens-tree
|
||||
"Convert tokens into a nested tree with their `:name` as the path.
|
||||
Optionally use `update-token-fn` option to transform the token."
|
||||
|
@ -263,7 +335,7 @@
|
|||
(delete-token [_ token-name] "delete a token from the list")
|
||||
(get-token [_ token-name] "return token by token-name")
|
||||
(get-tokens [_] "return an ordered sequence of all tokens in the set")
|
||||
(get-set-path [_] "returns name of set converted to the path with prefix identifiers")
|
||||
(get-set-prefixed-path-string [_] "convert set name to prefixed full path string")
|
||||
(get-tokens-tree [_] "returns a tree of tokens split & nested by their name path")
|
||||
(get-dtcg-tokens-tree [_] "returns tokens tree formated to the dtcg spec"))
|
||||
|
||||
|
@ -312,8 +384,8 @@
|
|||
(get-tokens [_]
|
||||
(vals tokens))
|
||||
|
||||
(get-set-path [_]
|
||||
(set-name->set-path-string name))
|
||||
(get-set-prefixed-path-string [_]
|
||||
(set-name-string->prefixed-set-path-string name))
|
||||
|
||||
(get-tokens-tree [_]
|
||||
(tokens-tree tokens))
|
||||
|
@ -358,9 +430,23 @@
|
|||
;; === TokenSets (collection)
|
||||
|
||||
(defprotocol ITokenSets
|
||||
"Collection of sets and set groups.
|
||||
|
||||
Naming conventions:
|
||||
Set name: the complete name as a string, without prefix \"some-group/some-subgroup/some-set\".
|
||||
Set final name or fname: the last part of the name \"some-set\".
|
||||
Set path: the groups part of the name, as a vector [\"some-group\" \"some-subgroup\"].
|
||||
Set path str: the set path as a string \"some-group/some-subgroup\".
|
||||
Set full path: the path including the fname, as a vector [\"some-group\", \"some-subgroup\", \"some-set\"].
|
||||
Set full path str: the set full path as a string \"some-group/some-subgroup/some-set\".
|
||||
|
||||
Set prefix: the two-characters prefix added to a full path item \"G-\" / \"S-\".
|
||||
Prefixed set path or ppath: a path wit added prefixes [\"G-some-group\", \"G-some-subgroup\"].
|
||||
Prefixed set full path or pfpath: a full path wit prefixes [\"G-some-group\", \"G-some-subgroup\", \"S-some-set\"].
|
||||
Prefixed set final name or pfname: a final name with prefix \"S-some-set\"."
|
||||
(add-set [_ token-set] "add a set to the library, at the end")
|
||||
(add-sets [_ token-set] "add a collection of sets to the library, at the end")
|
||||
(update-set [_ set-name f] "modify a set in the ilbrary")
|
||||
(update-set [_ set-name f] "modify a set in the library")
|
||||
(delete-set-path [_ set-path] "delete a set in the library")
|
||||
(move-set-before [_ set-name before-set-name] "move a set with `set-name` before a set with `before-set-name` in the library.
|
||||
When `before-set-name` is nil, move set to bottom")
|
||||
|
@ -369,6 +455,9 @@ When `before-set-name` is nil, move set to bottom")
|
|||
(get-in-set-tree [_ path] "get `path` in nested tree of all sets in the library")
|
||||
(get-sets [_] "get an ordered sequence of all sets in the library")
|
||||
(get-path-sets [_ path] "get an ordered sequence of sets at `path` in the library")
|
||||
(get-sets-at-prefix-path [_ prefixed-path-str] "get an ordered sequence of sets at `prefixed-path-str` in the library")
|
||||
(get-sets-at-path [_ path-str] "get an ordered sequence of sets at `path` in the library")
|
||||
(rename-set-group [_ from-path-str to-path-str] "renames set groups and all child set names from `from-path-str` to `to-path-str`")
|
||||
(get-ordered-set-names [_] "get an ordered sequence of all sets names in the library")
|
||||
(get-set [_ set-name] "get one set looking for name")
|
||||
(get-neighbor-set-name [_ set-name index-offset] "get neighboring set name offset by `index-offset`"))
|
||||
|
@ -415,12 +504,13 @@ When `before-set-name` is nil, move set to bottom")
|
|||
(def hidden-token-theme-path
|
||||
(token-theme-path hidden-token-theme-group hidden-token-theme-name))
|
||||
|
||||
|
||||
(defprotocol ITokenTheme
|
||||
(set-sets [_ set-names] "set the active token sets")
|
||||
(enable-set [_ set-name] "enable set in theme")
|
||||
(enable-sets [_ set-names] "enable sets in theme")
|
||||
(disable-set [_ set-name] "disable set in theme")
|
||||
(disable-sets [_ set-names] "disable sets in theme")
|
||||
(toggle-set [_ set-name] "toggle a set enabled / disabled in the theme")
|
||||
|
||||
(update-set-name [_ prev-set-name set-name] "update set-name from `prev-set-name` to `set-name` when it exists")
|
||||
(theme-path [_] "get `token-theme-path` from theme")
|
||||
(theme-matches-group-name [_ group name] "if a theme matches the given group & name")
|
||||
|
@ -436,13 +526,22 @@ When `before-set-name` is nil, move set to bottom")
|
|||
(dt/now)
|
||||
set-names))
|
||||
|
||||
(enable-set [this set-name]
|
||||
(set-sets this (conj sets set-name)))
|
||||
|
||||
(enable-sets [this set-names]
|
||||
(set-sets this (set/union sets set-names)))
|
||||
|
||||
(disable-set [this set-name]
|
||||
(set-sets this (disj sets set-name)))
|
||||
|
||||
(disable-sets [this set-names]
|
||||
(set-sets this (or (set/difference sets set-names) #{})))
|
||||
|
||||
(toggle-set [this set-name]
|
||||
(set-sets this (if (sets set-name)
|
||||
(disj sets set-name)
|
||||
(conj sets set-name))))
|
||||
(if (sets set-name)
|
||||
(disable-set this set-name)
|
||||
(enable-set this set-name)))
|
||||
|
||||
(update-set-name [this prev-set-name set-name]
|
||||
(if (get sets prev-set-name)
|
||||
|
@ -521,6 +620,8 @@ When `before-set-name` is nil, move set to bottom")
|
|||
(get-theme-tree [_] "get a nested tree of all themes in the library")
|
||||
(get-themes [_] "get an ordered sequence of all themes in the library")
|
||||
(get-theme [_ group name] "get one theme looking for name")
|
||||
(get-hidden-theme [_] "get the theme hidden from the user ,
|
||||
used for managing active sets without a user created theme.")
|
||||
(get-theme-groups [_] "get a sequence of group names by order")
|
||||
(get-active-theme-paths [_] "get the active theme paths")
|
||||
(get-active-themes [_] "get an ordered sequence of active themes in the library")
|
||||
|
@ -587,6 +688,11 @@ When `before-set-name` is nil, move set to bottom")
|
|||
(delete-token-from-set [_ set-name token-name] "delete a token from a set")
|
||||
(toggle-set-in-theme [_ group-name theme-name set-name] "toggle a set used / not used in a theme")
|
||||
(get-active-themes-set-names [_] "set of set names that are active in the the active themes")
|
||||
(sets-at-path-all-active? [_ prefixed-path] "compute active state for child sets at `prefixed-path`.
|
||||
Will return a value that matches this schema:
|
||||
`:none` None of the nested sets are active
|
||||
`:all` All of the nested sets are active
|
||||
`:partial` Mixed active state of nested sets")
|
||||
(get-active-themes-set-tokens [_] "set of set names that are active in the the active themes")
|
||||
(encode-dtcg [_] "Encodes library to a dtcg compatible json string")
|
||||
(decode-dtcg-json [_ parsed-json] "Decodes parsed json containing tokens and converts to library")
|
||||
|
@ -613,7 +719,7 @@ When `before-set-name` is nil, move set to bottom")
|
|||
ITokenSets
|
||||
(add-set [_ token-set]
|
||||
(dm/assert! "expected valid token set" (check-token-set! token-set))
|
||||
(let [path (get-token-set-path token-set)]
|
||||
(let [path (get-token-set-prefixed-path token-set)]
|
||||
(TokensLib. (d/oassoc-in sets path token-set)
|
||||
themes
|
||||
active-themes)))
|
||||
|
@ -625,18 +731,18 @@ When `before-set-name` is nil, move set to bottom")
|
|||
this token-sets))
|
||||
|
||||
(update-set [this set-name f]
|
||||
(let [path (split-token-set-name set-name)
|
||||
set (get-in sets path)]
|
||||
(let [prefixed-full-path (set-name->prefixed-full-path set-name)
|
||||
set (get-in sets prefixed-full-path)]
|
||||
(if set
|
||||
(let [set' (-> (make-token-set (f set))
|
||||
(assoc :modified-at (dt/now)))
|
||||
path' (get-token-set-path set')
|
||||
prefixed-full-path' (get-token-set-prefixed-path set')
|
||||
name-changed? (not= (:name set) (:name set'))]
|
||||
(check-token-set! set')
|
||||
(if name-changed?
|
||||
(TokensLib. (-> sets
|
||||
(d/oassoc-in-before path path' set')
|
||||
(d/dissoc-in path))
|
||||
(d/oassoc-in-before prefixed-full-path prefixed-full-path' set')
|
||||
(d/dissoc-in prefixed-full-path))
|
||||
(walk/postwalk
|
||||
(fn [form]
|
||||
(if (instance? TokenTheme form)
|
||||
|
@ -644,33 +750,34 @@ When `before-set-name` is nil, move set to bottom")
|
|||
form))
|
||||
themes)
|
||||
active-themes)
|
||||
(TokensLib. (d/oassoc-in sets path set')
|
||||
(TokensLib. (d/oassoc-in sets prefixed-full-path set')
|
||||
themes
|
||||
active-themes)))
|
||||
this)))
|
||||
|
||||
(delete-set-path [_ set-path]
|
||||
(let [path (split-token-set-path set-path)
|
||||
set-node (get-in sets path)
|
||||
set-group? (not (instance? TokenSet set-node))]
|
||||
(TokensLib. (d/dissoc-in sets path)
|
||||
(delete-set-path [_ prefixed-set-name]
|
||||
(let [prefixed-set-path (split-token-set-path prefixed-set-name)
|
||||
set-node (get-in sets prefixed-set-path)
|
||||
set-group? (not (instance? TokenSet set-node))
|
||||
set-name-string (prefixed-set-path-string->set-name-string prefixed-set-name)]
|
||||
(TokensLib. (d/dissoc-in sets prefixed-set-path)
|
||||
;; TODO: When deleting a set-group, also deactivate the child sets
|
||||
(if set-group?
|
||||
themes
|
||||
(walk/postwalk
|
||||
(fn [form]
|
||||
(if (instance? TokenTheme form)
|
||||
(disable-set form set-path)
|
||||
(disable-set form set-name-string)
|
||||
form))
|
||||
themes))
|
||||
active-themes)))
|
||||
|
||||
;; TODO Handle groups and nesting
|
||||
(move-set-before [this set-name before-set-name]
|
||||
(let [source-path (split-token-set-name set-name)
|
||||
(let [source-path (set-name->prefixed-full-path set-name)
|
||||
token-set (-> (get-set this set-name)
|
||||
(assoc :modified-at (dt/now)))
|
||||
target-path (split-token-set-name before-set-name)]
|
||||
target-path (set-name->prefixed-full-path before-set-name)]
|
||||
(if before-set-name
|
||||
(TokensLib. (d/oassoc-in-before sets target-path source-path token-set)
|
||||
themes
|
||||
|
@ -696,6 +803,26 @@ When `before-set-name` is nil, move set to bottom")
|
|||
(tree-seq d/ordered-map? vals)
|
||||
(filter (partial instance? TokenSet))))
|
||||
|
||||
(get-sets-at-prefix-path [_ prefixed-path-str]
|
||||
(some->> (get-in sets (split-token-set-path prefixed-path-str))
|
||||
(tree-seq d/ordered-map? vals)
|
||||
(filter (partial instance? TokenSet))))
|
||||
|
||||
(get-sets-at-path [_ path-str]
|
||||
(some->> (split-token-set-path path-str)
|
||||
(map add-set-path-group-prefix)
|
||||
(get-in sets)
|
||||
(tree-seq d/ordered-map? vals)
|
||||
(filter (partial instance? TokenSet))))
|
||||
|
||||
(rename-set-group [this from-path-str to-path-str]
|
||||
(->> (get-sets-at-path this from-path-str)
|
||||
(reduce
|
||||
(fn [lib set]
|
||||
(update-set lib (:name set) (fn [set']
|
||||
(update set' :name #(str to-path-str (str/strip-prefix % from-path-str))))))
|
||||
this)))
|
||||
|
||||
(get-ordered-set-names [this]
|
||||
(map :name (get-sets this)))
|
||||
|
||||
|
@ -703,7 +830,7 @@ When `before-set-name` is nil, move set to bottom")
|
|||
(count (get-sets this)))
|
||||
|
||||
(get-set [_ set-name]
|
||||
(let [path (split-token-set-name set-name)]
|
||||
(let [path (set-name->prefixed-full-path set-name)]
|
||||
(get-in sets path)))
|
||||
|
||||
(get-neighbor-set-name [this set-name index-offset]
|
||||
|
@ -766,6 +893,9 @@ When `before-set-name` is nil, move set to bottom")
|
|||
(get-theme [_ group name]
|
||||
(dm/get-in themes [group name]))
|
||||
|
||||
(get-hidden-theme [this]
|
||||
(get-theme this hidden-token-theme-group hidden-token-theme-name))
|
||||
|
||||
(set-active-themes [_ active-themes]
|
||||
(TokensLib. sets
|
||||
themes
|
||||
|
@ -831,6 +961,19 @@ When `before-set-name` is nil, move set to bottom")
|
|||
(mapcat :sets)
|
||||
(get-active-themes this)))
|
||||
|
||||
(sets-at-path-all-active? [this prefixed-path-str]
|
||||
(let [active-set-names (get-active-themes-set-names this)]
|
||||
(if (seq active-set-names)
|
||||
(let [path-active-set-names (->> (get-sets-at-prefix-path this prefixed-path-str)
|
||||
(map :name)
|
||||
(into #{}))
|
||||
difference (set/difference path-active-set-names active-set-names)]
|
||||
(cond
|
||||
(empty? difference) :all
|
||||
(seq (set/intersection path-active-set-names active-set-names)) :partial
|
||||
:else :none))
|
||||
:none)))
|
||||
|
||||
(get-active-themes-set-tokens [this]
|
||||
(let [sets-order (get-ordered-set-names this)
|
||||
active-themes (get-active-themes this)
|
||||
|
@ -845,15 +988,26 @@ When `before-set-name` is nil, move set to bottom")
|
|||
(d/ordered-map) active-themes)))
|
||||
|
||||
(encode-dtcg [_]
|
||||
(into {} (comp
|
||||
(filter (partial instance? TokenSet))
|
||||
(map (fn [token-set]
|
||||
[(:name token-set) (get-dtcg-tokens-tree token-set)])))
|
||||
(tree-seq d/ordered-map? vals sets)))
|
||||
(let [themes (into []
|
||||
(comp
|
||||
(filter #(and (instance? TokenTheme %)
|
||||
(not (hidden-temporary-theme? %))))
|
||||
(map (fn [token-theme]
|
||||
(->> token-theme
|
||||
(into {})
|
||||
walk/stringify-keys))))
|
||||
(tree-seq d/ordered-map? vals themes))
|
||||
sets (into {} (comp
|
||||
(filter (partial instance? TokenSet))
|
||||
(map (fn [token-set]
|
||||
[(:name token-set) (get-dtcg-tokens-tree token-set)])))
|
||||
(tree-seq d/ordered-map? vals sets))]
|
||||
(assoc sets "$themes" themes)))
|
||||
|
||||
(decode-dtcg-json [_ parsed-json]
|
||||
(let [;; tokens-studio/plugin will add these meta properties, remove them for now
|
||||
sets-data (dissoc parsed-json "$themes" "$metadata")
|
||||
themes-data (get parsed-json "$themes")
|
||||
lib (make-tokens-lib)
|
||||
lib' (reduce
|
||||
(fn [lib [set-name tokens]]
|
||||
|
@ -861,7 +1015,15 @@ When `before-set-name` is nil, move set to bottom")
|
|||
:name set-name
|
||||
:tokens (flatten-nested-tokens-json tokens ""))))
|
||||
lib sets-data)]
|
||||
lib'))
|
||||
(reduce
|
||||
(fn [lib {:strs [name group description is-source modified-at sets]}]
|
||||
(add-theme lib (TokenTheme. name
|
||||
group
|
||||
description
|
||||
is-source
|
||||
(dt/parse-instant modified-at)
|
||||
(set sets))))
|
||||
lib' themes-data)))
|
||||
|
||||
(get-all-tokens [this]
|
||||
(reduce
|
||||
|
|
|
@ -1,49 +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.common.types.tokens-list
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.time :as dt]))
|
||||
|
||||
(defn tokens-seq
|
||||
"Returns a sequence of all tokens within the file data."
|
||||
[file-data]
|
||||
(vals (:tokens file-data)))
|
||||
|
||||
(defn- touch
|
||||
"Updates the `modified-at` timestamp of a token."
|
||||
[token]
|
||||
(assoc token :modified-at (dt/now)))
|
||||
|
||||
(defn add-token
|
||||
"Adds a new token to the file data, setting its `modified-at` timestamp."
|
||||
[file-data token-set-id token]
|
||||
(-> file-data
|
||||
(update :tokens assoc (:id token) (touch token))
|
||||
(d/update-in-when [:token-sets-index token-set-id] #(->
|
||||
(update % :tokens conj (:id token))
|
||||
(touch)))))
|
||||
|
||||
(defn get-token
|
||||
"Retrieves a token by its ID from the file data."
|
||||
[file-data token-id]
|
||||
(get-in file-data [:tokens token-id]))
|
||||
|
||||
(defn set-token
|
||||
"Sets or updates a token in the file data, updating its `modified-at` timestamp."
|
||||
[file-data token]
|
||||
(d/assoc-in-when file-data [:tokens (:id token)] (touch token)))
|
||||
|
||||
(defn update-token
|
||||
"Applies a function to update a token in the file data, then touches it."
|
||||
[file-data token-id f & args]
|
||||
(d/update-in-when file-data [:tokens token-id] #(-> (apply f % args) (touch))))
|
||||
|
||||
(defn delete-token
|
||||
"Removes a token from the file data by its ID."
|
||||
[file-data token-id]
|
||||
(update file-data :tokens dissoc token-id))
|
|
@ -1,79 +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.common.types.tokens-theme-list
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.time :as dt]))
|
||||
|
||||
(defn- touch
|
||||
"Updates the `modified-at` timestamp of a token set."
|
||||
[token-set]
|
||||
(assoc token-set :modified-at (dt/now)))
|
||||
|
||||
(defn assoc-active-token-themes
|
||||
[file-data theme-ids]
|
||||
(assoc file-data :token-active-themes theme-ids))
|
||||
|
||||
(defn add-temporary-token-theme
|
||||
[file-data {:keys [id name] :as token-theme}]
|
||||
(-> file-data
|
||||
(d/dissoc-in [:token-themes-index (:token-theme-temporary-id file-data)])
|
||||
(assoc :token-theme-temporary-id id)
|
||||
(assoc :token-theme-temporary-name name)
|
||||
(update :token-themes-index assoc id token-theme)))
|
||||
|
||||
(defn delete-temporary-token-theme
|
||||
[file-data token-theme-id]
|
||||
(cond-> file-data
|
||||
(= (:token-theme-temporary-id file-data) token-theme-id) (dissoc :token-theme-temporary-id :token-theme-temporary-name)
|
||||
:always (d/dissoc-in [:token-themes-index (:token-theme-temporary-id file-data)])))
|
||||
|
||||
(defn add-token-theme
|
||||
[file-data {:keys [index id] :as token-theme}]
|
||||
(-> file-data
|
||||
(update :token-themes
|
||||
(fn [token-themes]
|
||||
(let [exists? (some (partial = id) token-themes)]
|
||||
(cond
|
||||
exists? token-themes
|
||||
(nil? index) (conj (or token-themes []) id)
|
||||
:else (d/insert-at-index token-themes index [id])))))
|
||||
(update :token-themes-index assoc id token-theme)))
|
||||
|
||||
(defn update-token-theme
|
||||
[file-data token-theme-id f & args]
|
||||
(d/update-in-when file-data [:token-themes-index token-theme-id] #(-> (apply f % args) (touch))))
|
||||
|
||||
(defn delete-token-theme
|
||||
[file-data theme-id]
|
||||
(-> file-data
|
||||
(update :token-themes (fn [ids] (d/removev #(= % theme-id) ids)))
|
||||
(update :token-themes-index dissoc theme-id)
|
||||
(update :token-active-themes disj theme-id)))
|
||||
|
||||
(defn add-token-set
|
||||
[file-data {:keys [index id] :as token-set}]
|
||||
(-> file-data
|
||||
(update :token-set-groups
|
||||
(fn [token-set-groups]
|
||||
(let [exists? (some (partial = id) token-set-groups)]
|
||||
(cond
|
||||
exists? token-set-groups
|
||||
(nil? index) (conj (or token-set-groups []) id)
|
||||
:else (d/insert-at-index token-set-groups index [id])))))
|
||||
(update :token-sets-index assoc id token-set)))
|
||||
|
||||
(defn update-token-set
|
||||
[file-data token-set-id f & args]
|
||||
(d/update-in-when file-data [:token-sets-index token-set-id] #(-> (apply f % args) (touch))))
|
||||
|
||||
(defn delete-token-set
|
||||
[file-data token-set-id]
|
||||
(-> file-data
|
||||
(update :token-set-groups (fn [xs] (into [] (remove #(= (:id %) token-set-id) xs))))
|
||||
(update :token-sets-index dissoc token-set-id)
|
||||
(update :token-themes-index (fn [xs] (update-vals xs #(update % :sets disj token-set-id))))))
|
|
@ -193,7 +193,6 @@
|
|||
(ths/add-sample-shape :free-shape))
|
||||
|
||||
page (thf/current-page file)
|
||||
main-root (ths/get-shape file :main-root)
|
||||
|
||||
;; ==== Action
|
||||
changes1 (cls/generate-relocate (pcb/empty-changes)
|
||||
|
@ -203,9 +202,6 @@
|
|||
0 ; to-index
|
||||
#{(thi/id :free-shape)}) ; ids
|
||||
|
||||
|
||||
|
||||
|
||||
updated-file (thf/apply-changes file changes1)
|
||||
|
||||
changes2 (cll/generate-sync-file-changes (pcb/empty-changes)
|
||||
|
@ -491,4 +487,4 @@
|
|||
(t/is (= (:fill-color fill') "#fabada"))
|
||||
(t/is (= (:fill-opacity fill') 1))
|
||||
(t/is (= (:touched copy2-root') nil))
|
||||
(t/is (= (:touched copy2-child') nil))))
|
||||
(t/is (= (:touched copy2-child') nil))))
|
||||
|
|
202
common/test/common_tests/logic/token_apply_test.cljc
Normal file
202
common/test/common_tests/logic/token_apply_test.cljc
Normal file
|
@ -0,0 +1,202 @@
|
|||
;; 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 common-tests.logic.token-apply-test
|
||||
(:require
|
||||
[app.common.files.changes-builder :as pcb]
|
||||
[app.common.logic.shapes :as cls]
|
||||
[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.test-helpers.tokens :as tht]
|
||||
[app.common.types.container :as ctn]
|
||||
[app.common.types.token :as cto]
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[clojure.test :as t]))
|
||||
|
||||
(t/use-fixtures :each thi/test-fixture)
|
||||
|
||||
(defn- setup-file
|
||||
[]
|
||||
(-> (thf/sample-file :file1)
|
||||
(tht/add-tokens-lib)
|
||||
(tht/update-tokens-lib #(-> %
|
||||
(ctob/add-set (ctob/make-token-set :name "test-token-set"))
|
||||
(ctob/add-theme (ctob/make-token-theme :name "test-theme"
|
||||
:sets #{"test-token-set"}))
|
||||
(ctob/set-active-themes #{"/test-theme"})
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "token-radius"
|
||||
:type :border-radius
|
||||
:value 10))
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "token-rotation"
|
||||
:type :rotation
|
||||
:value 30))
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "token-opacity"
|
||||
:type :opacity
|
||||
:value 0.7))
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "token-stroke-width"
|
||||
:type :stroke-width
|
||||
:value 2))
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "token-color"
|
||||
:type :color
|
||||
:value "#00ff00"))
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "token-dimensions"
|
||||
:type :dimensions
|
||||
:value 100))))
|
||||
(tho/add-frame :frame1)))
|
||||
|
||||
(defn- apply-all-tokens
|
||||
[file]
|
||||
(-> file
|
||||
(tht/apply-token-to-shape :frame1 "token-radius" [:r1 :r2 :r3 :r4] [:r1 :r2 :r3 :r4] 10)
|
||||
(tht/apply-token-to-shape :frame1 "token-rotation" [:rotation] [:rotation] 30)
|
||||
(tht/apply-token-to-shape :frame1 "token-opacity" [:opacity] [:opacity] 0.7)
|
||||
(tht/apply-token-to-shape :frame1 "token-stroke-width" [:stroke-width] [:stroke-width] 2)
|
||||
(tht/apply-token-to-shape :frame1 "token-color" [:stroke-color] [:stroke-color] "#00ff00")
|
||||
(tht/apply-token-to-shape :frame1 "token-color" [:fill] [:fill] "#00ff00")
|
||||
(tht/apply-token-to-shape :frame1 "token-dimensions" [:width :height] [:width :height] 100)))
|
||||
|
||||
(t/deftest apply-tokens-to-shape
|
||||
(let [;; ==== Setup
|
||||
file (setup-file)
|
||||
page (thf/current-page file)
|
||||
frame1 (ths/get-shape file :frame1)
|
||||
token-radius (tht/get-token file "test-token-set" "token-radius")
|
||||
token-rotation (tht/get-token file "test-token-set" "token-rotation")
|
||||
token-opacity (tht/get-token file "test-token-set" "token-opacity")
|
||||
token-stroke-width (tht/get-token file "test-token-set" "token-stroke-width")
|
||||
token-color (tht/get-token file "test-token-set" "token-color")
|
||||
token-dimensions (tht/get-token file "test-token-set" "token-dimensions")
|
||||
|
||||
;; ==== Action
|
||||
changes (-> (-> (pcb/empty-changes nil)
|
||||
(pcb/with-page page)
|
||||
(pcb/with-objects (:objects page)))
|
||||
(cls/generate-update-shapes [(:id frame1)]
|
||||
(fn [shape]
|
||||
(as-> shape $
|
||||
(cto/maybe-apply-token-to-shape {:token nil ; test nil case
|
||||
:shape $
|
||||
:attributes []})
|
||||
(cto/maybe-apply-token-to-shape {:token token-radius
|
||||
:shape $
|
||||
:attributes [:r1 :r2 :r3 :r4]})
|
||||
(cto/maybe-apply-token-to-shape {:token token-rotation
|
||||
:shape $
|
||||
:attributes [:rotation]})
|
||||
(cto/maybe-apply-token-to-shape {:token token-opacity
|
||||
:shape $
|
||||
:attributes [:opacity]})
|
||||
(cto/maybe-apply-token-to-shape {:token token-stroke-width
|
||||
:shape $
|
||||
:attributes [:stroke-width]})
|
||||
(cto/maybe-apply-token-to-shape {:token token-color
|
||||
:shape $
|
||||
:attributes [:stroke-color]})
|
||||
(cto/maybe-apply-token-to-shape {:token token-color
|
||||
:shape $
|
||||
:attributes [:fill]})
|
||||
(cto/maybe-apply-token-to-shape {:token token-dimensions
|
||||
:shape $
|
||||
:attributes [:width :height]})))
|
||||
(:objects page)
|
||||
{}))
|
||||
|
||||
file' (thf/apply-changes file changes)
|
||||
|
||||
;; ==== Get
|
||||
frame1' (ths/get-shape file' :frame1)
|
||||
applied-tokens' (:applied-tokens frame1')]
|
||||
|
||||
;; ==== Check
|
||||
(t/is (= (count applied-tokens') 11))
|
||||
(t/is (= (:r1 applied-tokens') "token-radius"))
|
||||
(t/is (= (:r2 applied-tokens') "token-radius"))
|
||||
(t/is (= (:r3 applied-tokens') "token-radius"))
|
||||
(t/is (= (:r4 applied-tokens') "token-radius"))
|
||||
(t/is (= (:rotation applied-tokens') "token-rotation"))
|
||||
(t/is (= (:opacity applied-tokens') "token-opacity"))
|
||||
(t/is (= (:stroke-width applied-tokens') "token-stroke-width"))
|
||||
(t/is (= (:stroke-color applied-tokens') "token-color"))
|
||||
(t/is (= (:fill applied-tokens') "token-color"))
|
||||
(t/is (= (:width applied-tokens') "token-dimensions"))
|
||||
(t/is (= (:height applied-tokens') "token-dimensions"))))
|
||||
|
||||
(t/deftest unapply-tokens-from-shape
|
||||
(let [;; ==== Setup
|
||||
file (-> (setup-file)
|
||||
(apply-all-tokens))
|
||||
page (thf/current-page file)
|
||||
frame1 (ths/get-shape file :frame1)
|
||||
|
||||
;; ==== Action
|
||||
changes (-> (-> (pcb/empty-changes nil)
|
||||
(pcb/with-page page)
|
||||
(pcb/with-objects (:objects page)))
|
||||
(cls/generate-update-shapes [(:id frame1)]
|
||||
(fn [shape]
|
||||
(-> shape
|
||||
(cto/unapply-token-id [:r1 :r2 :r3 :r4])
|
||||
(cto/unapply-token-id [:rotation])
|
||||
(cto/unapply-token-id [:opacity])
|
||||
(cto/unapply-token-id [:stroke-width])
|
||||
(cto/unapply-token-id [:stroke-color])
|
||||
(cto/unapply-token-id [:fill])
|
||||
(cto/unapply-token-id [:width :height])))
|
||||
(:objects page)
|
||||
{}))
|
||||
|
||||
file' (thf/apply-changes file changes)
|
||||
|
||||
;; ==== Get
|
||||
frame1' (ths/get-shape file' :frame1)
|
||||
applied-tokens' (:applied-tokens frame1')]
|
||||
|
||||
;; ==== Check
|
||||
(t/is (= (count applied-tokens') 0))))
|
||||
|
||||
(t/deftest unapply-tokens-automatic
|
||||
(let [;; ==== Setup
|
||||
file (-> (setup-file)
|
||||
(apply-all-tokens))
|
||||
page (thf/current-page file)
|
||||
frame1 (ths/get-shape file :frame1)
|
||||
|
||||
;; ==== Action
|
||||
changes (-> (-> (pcb/empty-changes nil)
|
||||
(pcb/with-page page)
|
||||
(pcb/with-objects (:objects page)))
|
||||
(cls/generate-update-shapes [(:id frame1)]
|
||||
(fn [shape]
|
||||
(-> shape
|
||||
(ctn/set-shape-attr :r1 0)
|
||||
(ctn/set-shape-attr :r2 0)
|
||||
(ctn/set-shape-attr :r3 0)
|
||||
(ctn/set-shape-attr :r4 0)
|
||||
(ctn/set-shape-attr :rotation 0)
|
||||
(ctn/set-shape-attr :opacity 0)
|
||||
(ctn/set-shape-attr :strokes [])
|
||||
(ctn/set-shape-attr :fills [])
|
||||
(ctn/set-shape-attr :width 0)
|
||||
(ctn/set-shape-attr :height 0)))
|
||||
(:objects page)
|
||||
{}))
|
||||
|
||||
file' (thf/apply-changes file changes)
|
||||
|
||||
;; ==== Get
|
||||
frame1' (ths/get-shape file' :frame1)
|
||||
applied-tokens' (:applied-tokens frame1')]
|
||||
|
||||
;; ==== Check
|
||||
(t/is (= (count applied-tokens') 0))))
|
117
common/test/common_tests/logic/token_test.cljc
Normal file
117
common/test/common_tests/logic/token_test.cljc
Normal file
|
@ -0,0 +1,117 @@
|
|||
(ns common-tests.logic.token-test
|
||||
(:require
|
||||
[app.common.files.changes-builder :as pcb]
|
||||
[app.common.logic.tokens :as clt]
|
||||
[app.common.test-helpers.files :as thf]
|
||||
[app.common.test-helpers.ids-map :as thi]
|
||||
[app.common.test-helpers.tokens :as tht]
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[clojure.test :as t]))
|
||||
|
||||
(t/use-fixtures :each thi/test-fixture)
|
||||
|
||||
(defn- setup-file [lib-fn]
|
||||
(-> (thf/sample-file :file1)
|
||||
(tht/add-tokens-lib)
|
||||
(tht/update-tokens-lib lib-fn)))
|
||||
|
||||
(t/deftest generate-toggle-token-set-test
|
||||
(t/testing "toggling an active set will switch to hidden theme without user sets"
|
||||
(let [file (setup-file #(-> %
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar"))
|
||||
(ctob/add-theme (ctob/make-token-theme :name "theme"
|
||||
:sets #{"foo/bar"}))
|
||||
(ctob/set-active-themes #{"/theme"})))
|
||||
changes (clt/generate-toggle-token-set (pcb/empty-changes) (tht/get-tokens-lib file) "foo/bar")
|
||||
|
||||
redo (thf/apply-changes file changes)
|
||||
redo-lib (tht/get-tokens-lib redo)
|
||||
undo (thf/apply-undo-changes redo changes)
|
||||
undo-lib (tht/get-tokens-lib undo)]
|
||||
(t/is (= #{ctob/hidden-token-theme-path} (ctob/get-active-theme-paths redo-lib)))
|
||||
(t/is (= #{} (:sets (ctob/get-hidden-theme redo-lib))))
|
||||
|
||||
;; Undo
|
||||
(t/is (nil? (ctob/get-hidden-theme undo-lib)))
|
||||
(t/is (= #{"/theme"} (ctob/get-active-theme-paths undo-lib)))))
|
||||
|
||||
(t/testing "toggling an inactive set will switch to hidden theme without user sets"
|
||||
(let [file (setup-file #(-> %
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar"))
|
||||
(ctob/add-theme (ctob/make-token-theme :name "theme"
|
||||
:sets #{"foo/bar"}))
|
||||
(ctob/set-active-themes #{"/theme"})))
|
||||
changes (clt/generate-toggle-token-set (pcb/empty-changes) (tht/get-tokens-lib file) "foo/bar")
|
||||
|
||||
redo (thf/apply-changes file changes)
|
||||
redo-lib (tht/get-tokens-lib redo)
|
||||
undo (thf/apply-undo-changes redo changes)
|
||||
undo-lib (tht/get-tokens-lib undo)]
|
||||
(t/is (= #{ctob/hidden-token-theme-path} (ctob/get-active-theme-paths redo-lib)))
|
||||
(t/is (= #{} (:sets (ctob/get-hidden-theme redo-lib))))
|
||||
|
||||
;; Undo
|
||||
(t/is (nil? (ctob/get-hidden-theme undo-lib)))
|
||||
(t/is (= #{"/theme"} (ctob/get-active-theme-paths undo-lib)))))
|
||||
|
||||
(t/testing "toggling an set with hidden theme already active will toggle set in hidden theme"
|
||||
(let [file (setup-file #(-> %
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar"))
|
||||
(ctob/add-theme (ctob/make-hidden-token-theme))
|
||||
(ctob/set-active-themes #{ctob/hidden-token-theme-path})))
|
||||
|
||||
changes (clt/generate-toggle-token-set-group (pcb/empty-changes) (tht/get-tokens-lib file) "G-foo/S-bar")
|
||||
|
||||
redo (thf/apply-changes file changes)
|
||||
redo-lib (tht/get-tokens-lib redo)
|
||||
undo (thf/apply-undo-changes redo changes)
|
||||
undo-lib (tht/get-tokens-lib undo)]
|
||||
(t/is (= (ctob/get-active-theme-paths redo-lib) (ctob/get-active-theme-paths undo-lib)))
|
||||
|
||||
(t/is (= #{"foo/bar"} (:sets (ctob/get-hidden-theme redo-lib))))
|
||||
|
||||
;; Undo
|
||||
(t/is (some? (ctob/get-hidden-theme undo-lib))))))
|
||||
|
||||
(t/deftest generate-toggle-token-set-group-test
|
||||
(t/testing "toggling set group with no active sets inside will activate all child sets"
|
||||
(let [file (setup-file #(-> %
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar"))
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar/baz"))
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar/baz/baz-child"))
|
||||
(ctob/add-theme (ctob/make-token-theme :name "theme"))
|
||||
(ctob/set-active-themes #{"/theme"})))
|
||||
changes (clt/generate-toggle-token-set-group (pcb/empty-changes) (tht/get-tokens-lib file) "G-foo/G-bar")
|
||||
|
||||
redo (thf/apply-changes file changes)
|
||||
redo-lib (tht/get-tokens-lib redo)
|
||||
undo (thf/apply-undo-changes redo changes)
|
||||
undo-lib (tht/get-tokens-lib undo)]
|
||||
(t/is (= #{ctob/hidden-token-theme-path} (ctob/get-active-theme-paths redo-lib)))
|
||||
(t/is (= #{"foo/bar/baz" "foo/bar/baz/baz-child"} (:sets (ctob/get-hidden-theme redo-lib))))
|
||||
|
||||
;; Undo
|
||||
(t/is (nil? (ctob/get-hidden-theme undo-lib)))
|
||||
(t/is (= #{"/theme"} (ctob/get-active-theme-paths undo-lib)))))
|
||||
|
||||
(t/testing "toggling set group with partially active sets inside will deactivate all child sets"
|
||||
(let [file (setup-file #(-> %
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar"))
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar/baz"))
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar/baz/baz-child"))
|
||||
(ctob/add-theme (ctob/make-token-theme :name "theme"
|
||||
:sets #{"foo/bar/baz"}))
|
||||
(ctob/set-active-themes #{"/theme"})))
|
||||
|
||||
changes (clt/generate-toggle-token-set-group (pcb/empty-changes) (tht/get-tokens-lib file) "G-foo/G-bar")
|
||||
|
||||
redo (thf/apply-changes file changes)
|
||||
redo-lib (tht/get-tokens-lib redo)
|
||||
undo (thf/apply-undo-changes redo changes)
|
||||
undo-lib (tht/get-tokens-lib undo)]
|
||||
(t/is (= #{} (:sets (ctob/get-hidden-theme redo-lib))))
|
||||
(t/is (= #{ctob/hidden-token-theme-path} (ctob/get-active-theme-paths redo-lib)))
|
||||
|
||||
;; Undo
|
||||
(t/is (nil? (ctob/get-hidden-theme undo-lib)))
|
||||
(t/is (= #{"/theme"} (ctob/get-active-theme-paths undo-lib))))))
|
|
@ -796,7 +796,14 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"$themes": [],
|
||||
"$themes": [ {
|
||||
"name": "theme-1",
|
||||
"group": "group-1",
|
||||
"description": null,
|
||||
"is-source": false,
|
||||
"modified-at": "2024-01-01T00:00:00.000+00:00",
|
||||
"sets": [ "light" ]
|
||||
} ],
|
||||
"$metadata": {
|
||||
"tokenSetOrder": ["core", "light", "dark", "theme"]
|
||||
}
|
||||
|
|
|
@ -100,7 +100,6 @@
|
|||
(->> (ctob/move-set-before tokens-lib set-name before-set-name)
|
||||
(ctob/get-ordered-set-names)
|
||||
(into [])))]
|
||||
;; TODO Nested moving doesn't work as expected
|
||||
(t/testing "regular moving"
|
||||
(t/is (= ["A" "Move" "B"] (move "Move" "B")))
|
||||
(t/is (= ["B" "A" "Move"] (move "A" "Move"))))
|
||||
|
@ -231,6 +230,24 @@
|
|||
(t/is (= (:name token-set') "updated-name"))
|
||||
(t/is (dt/is-after? (:modified-at token-set') (:modified-at token-set)))))
|
||||
|
||||
(t/deftest rename-token-set-group
|
||||
(let [tokens-lib (-> (ctob/make-tokens-lib)
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar/baz"))
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar/baz/baz-child-1"))
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar/baz/baz-child-2"))
|
||||
(ctob/add-theme (ctob/make-token-theme :name "theme" :sets #{"foo/bar/baz/baz-child-1"})))
|
||||
tokens-lib' (-> tokens-lib
|
||||
(ctob/rename-set-group "foo/bar" "foo/bar-renamed")
|
||||
(ctob/rename-set-group "foo/bar-renamed/baz" "foo/bar-renamed/baz-renamed"))
|
||||
expected-set-names (ctob/get-ordered-set-names tokens-lib')
|
||||
expected-theme-sets (-> (ctob/get-theme tokens-lib' "" "theme")
|
||||
:sets)]
|
||||
(t/is (= expected-set-names
|
||||
'("foo/bar-renamed/baz"
|
||||
"foo/bar-renamed/baz-renamed/baz-child-1"
|
||||
"foo/bar-renamed/baz-renamed/baz-child-2")))
|
||||
(t/is (= expected-theme-sets #{"foo/bar-renamed/baz-renamed/baz-child-1"}))))
|
||||
|
||||
(t/deftest delete-token-set
|
||||
(let [tokens-lib (-> (ctob/make-tokens-lib)
|
||||
(ctob/add-set (ctob/make-token-set :name "test-token-set"))
|
||||
|
@ -241,11 +258,10 @@
|
|||
(ctob/delete-set-path "S-not-existing-set"))
|
||||
|
||||
token-set' (ctob/get-set tokens-lib' "updated-name")
|
||||
;;token-theme' (ctob/get-theme tokens-lib' "" "test-token-theme")
|
||||
]
|
||||
token-theme' (ctob/get-theme tokens-lib' "" "test-token-theme")]
|
||||
|
||||
(t/is (= (ctob/set-count tokens-lib') 0))
|
||||
;; (t/is (= (:sets token-theme') #{})) TODO: fix this
|
||||
(t/is (= (:sets token-theme') #{}))
|
||||
(t/is (nil? token-set'))))
|
||||
|
||||
(t/deftest active-themes-set-names
|
||||
|
@ -401,8 +417,39 @@
|
|||
expected-tokens (ctob/get-active-themes-set-tokens tokens-lib)
|
||||
expected-token-names (mapv key expected-tokens)]
|
||||
(t/is (= '("set-a" "set-b" "inactive-set") expected-order))
|
||||
(t/is (= ["set-a-token" "set-b-token"] expected-token-names)))))
|
||||
(t/is (= ["set-a-token" "set-b-token"] expected-token-names))))
|
||||
|
||||
(t/testing "sets-at-path-active-state"
|
||||
(let [tokens-lib (-> (ctob/make-tokens-lib)
|
||||
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar/baz"))
|
||||
(ctob/add-set (ctob/make-token-set :name "foo/bar/bam"))
|
||||
|
||||
(ctob/add-theme (ctob/make-token-theme :name "none"))
|
||||
(ctob/add-theme (ctob/make-token-theme :name "partial"
|
||||
:sets #{"foo/bar/baz"}))
|
||||
(ctob/add-theme (ctob/make-token-theme :name "all"
|
||||
:sets #{"foo/bar/baz"
|
||||
"foo/bar/bam"}))
|
||||
(ctob/add-theme (ctob/make-token-theme :name "invalid"
|
||||
:sets #{"foo/missing"})))
|
||||
|
||||
expected-none (-> tokens-lib
|
||||
(ctob/set-active-themes #{"/none"})
|
||||
(ctob/sets-at-path-all-active? "G-foo"))
|
||||
expected-all (-> tokens-lib
|
||||
(ctob/set-active-themes #{"/all"})
|
||||
(ctob/sets-at-path-all-active? "G-foo"))
|
||||
expected-partial (-> tokens-lib
|
||||
(ctob/set-active-themes #{"/partial"})
|
||||
(ctob/sets-at-path-all-active? "G-foo"))
|
||||
expected-invalid-none (-> tokens-lib
|
||||
(ctob/set-active-themes #{"/invalid"})
|
||||
(ctob/sets-at-path-all-active? "G-foo"))]
|
||||
(t/is (= :none expected-none))
|
||||
(t/is (= :all expected-all))
|
||||
(t/is (= :partial expected-partial))
|
||||
(t/is (= :none expected-invalid-none)))))
|
||||
|
||||
(t/deftest token-theme-in-a-lib
|
||||
(t/testing "add-token-theme"
|
||||
|
@ -1060,8 +1107,13 @@
|
|||
get-set-token (fn [set-name token-name]
|
||||
(some-> (ctob/get-set lib set-name)
|
||||
(ctob/get-token token-name)
|
||||
(dissoc :modified-at)))]
|
||||
(dissoc :modified-at)))
|
||||
token-theme (ctob/get-theme lib "group-1" "theme-1")]
|
||||
(t/is (= '("core" "light" "dark" "theme") (ctob/get-ordered-set-names lib)))
|
||||
(t/testing "set exists in theme"
|
||||
(t/is (= (:group token-theme) "group-1"))
|
||||
(t/is (= (:name token-theme) "theme-1"))
|
||||
(t/is (= (:sets token-theme) #{"light"})))
|
||||
(t/testing "tokens exist in core set"
|
||||
(t/is (= (get-set-token "core" "colors.red.600")
|
||||
{:name "colors.red.600"
|
||||
|
@ -1082,7 +1134,8 @@
|
|||
(t/is (nil? (get-set-token "typography" "H1.Bold"))))))
|
||||
|
||||
(t/testing "encode-dtcg-json"
|
||||
(let [tokens-lib (-> (ctob/make-tokens-lib)
|
||||
(let [now (dt/now)
|
||||
tokens-lib (-> (ctob/make-tokens-lib)
|
||||
(ctob/add-set (ctob/make-token-set :name "core"
|
||||
:tokens {"colors.red.600"
|
||||
(ctob/make-token
|
||||
|
@ -1099,9 +1152,19 @@
|
|||
(ctob/make-token
|
||||
{:name "button.primary.background"
|
||||
:type :color
|
||||
:value "{accent.default}"})})))
|
||||
:value "{accent.default}"})}))
|
||||
(ctob/add-theme (ctob/make-token-theme :name "theme-1"
|
||||
:group "group-1"
|
||||
:modified-at now
|
||||
:sets #{"core"})))
|
||||
expected (ctob/encode-dtcg tokens-lib)]
|
||||
(t/is (= {"core"
|
||||
(t/is (= {"$themes" [{"description" nil
|
||||
"group" "group-1"
|
||||
"is-source" false
|
||||
"modified-at" now
|
||||
"name" "theme-1"
|
||||
"sets" #{"core"}}]
|
||||
"core"
|
||||
{"colors" {"red" {"600" {"$value" "#e53e3e"
|
||||
"$type" "color"}}}
|
||||
"spacing"
|
||||
|
@ -1142,4 +1205,3 @@
|
|||
(t/is (= @with-prev-tokens-lib @tokens-lib)))
|
||||
(t/testing "fresh tokens library is also equal"
|
||||
(= @with-empty-tokens-lib @tokens-lib)))))))
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
"rxjs": "8.0.0-alpha.14",
|
||||
"sax": "^1.4.1",
|
||||
"source-map-support": "^0.5.21",
|
||||
"style-dictionary": "4.0.0-prerelease.34",
|
||||
"style-dictionary": "4.0.0-prerelease.36",
|
||||
"tdigest": "^0.1.2",
|
||||
"tinycolor2": "npm:^1.6.0",
|
||||
"ua-parser-js": "2.0.0-rc.1",
|
||||
|
|
26
frontend/playwright/data/get-teams-tokens.json
Normal file
26
frontend/playwright/data/get-teams-tokens.json
Normal file
|
@ -0,0 +1,26 @@
|
|||
[
|
||||
{
|
||||
"~:features": {
|
||||
"~#set": [
|
||||
"design-tokens/v1",
|
||||
"layout/grid",
|
||||
"styles/v2",
|
||||
"fdata/pointer-map",
|
||||
"fdata/objects-map",
|
||||
"components/v2",
|
||||
"fdata/shape-data-type"
|
||||
]
|
||||
},
|
||||
"~:permissions": {
|
||||
"~:type": "~:membership",
|
||||
"~:is-owner": true,
|
||||
"~:is-admin": true,
|
||||
"~:can-edit": true
|
||||
},
|
||||
"~:name": "Default",
|
||||
"~:modified-at": "~m1713533116375",
|
||||
"~:id": "~uc7ce0794-0992-8105-8004-38e630f7920a",
|
||||
"~:created-at": "~m1713533116375",
|
||||
"~:is-default": true
|
||||
}
|
||||
]
|
24
frontend/playwright/data/workspace/get-team-tokens.json
Normal file
24
frontend/playwright/data/workspace/get-team-tokens.json
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"~:features": {
|
||||
"~#set": [
|
||||
"design-tokens/v1",
|
||||
"layout/grid",
|
||||
"styles/v2",
|
||||
"fdata/pointer-map",
|
||||
"fdata/objects-map",
|
||||
"components/v2",
|
||||
"fdata/shape-data-type"
|
||||
]
|
||||
},
|
||||
"~:permissions": {
|
||||
"~:type": "~:membership",
|
||||
"~:is-owner": true,
|
||||
"~:is-admin": true,
|
||||
"~:can-edit": true
|
||||
},
|
||||
"~:name": "Default",
|
||||
"~:modified-at": "~m1713533116375",
|
||||
"~:id": "~uc7ce0794-0992-8105-8004-38e630f40f6d",
|
||||
"~:created-at": "~m1713533116375",
|
||||
"~:is-default": true
|
||||
}
|
|
@ -85,6 +85,12 @@ export class WorkspacePage extends BaseWebSocketPage {
|
|||
this.togglePalettesVisibility = page.getByTestId(
|
||||
"toggle-palettes-visibility",
|
||||
);
|
||||
this.tokensUpdateCreateModal = page.getByTestId(
|
||||
"token-update-create-modal",
|
||||
);
|
||||
this.tokenThemesSetsSidebar = page.getByTestId("token-themes-sets-sidebar");
|
||||
this.tokenSetItems = page.getByTestId("tokens-set-item");
|
||||
this.tokenSetGroupItems = page.getByTestId("tokens-set-group-item");
|
||||
}
|
||||
|
||||
async goToWorkspace({
|
||||
|
|
145
frontend/playwright/ui/specs/tokens.spec.js
Normal file
145
frontend/playwright/ui/specs/tokens.spec.js
Normal file
|
@ -0,0 +1,145 @@
|
|||
import { test, expect } from "@playwright/test";
|
||||
import { WorkspacePage } from "../pages/WorkspacePage";
|
||||
import { BaseWebSocketPage } from "../pages/BaseWebSocketPage";
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await WorkspacePage.init(page);
|
||||
await BaseWebSocketPage.mockRPC(page, "get-teams", "get-teams-tokens.json");
|
||||
});
|
||||
|
||||
const setupFileWithTokens = async (page) => {
|
||||
const workspacePage = new WorkspacePage(page);
|
||||
await workspacePage.setupEmptyFile();
|
||||
await workspacePage.mockRPC(
|
||||
"get-team?id=*",
|
||||
"workspace/get-team-tokens.json",
|
||||
);
|
||||
|
||||
await workspacePage.goToWorkspace();
|
||||
|
||||
const tokensTabButton = page.getByRole("tab", { name: "Tokens" });
|
||||
await tokensTabButton.click();
|
||||
|
||||
return {
|
||||
workspacePage,
|
||||
tokensUpdateCreateModal: workspacePage.tokensUpdateCreateModal,
|
||||
tokenThemesSetsSidebar: workspacePage.tokenThemesSetsSidebar,
|
||||
tokenSetItems: workspacePage.tokenSetItems,
|
||||
tokenSetGroupItems: workspacePage.tokenSetGroupItems,
|
||||
};
|
||||
};
|
||||
|
||||
test.describe("Tokens: Tokens Tab", () => {
|
||||
test("Clicking tokens tab button opens tokens sidebar tab", async ({
|
||||
page,
|
||||
}) => {
|
||||
const { workspacePage, tokensUpdateCreateModal, tokenThemesSetsSidebar } =
|
||||
await setupFileWithTokens(page);
|
||||
|
||||
const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" });
|
||||
|
||||
await expect(tokensTabPanel).toHaveText(/TOKENS/);
|
||||
await expect(tokensTabPanel).toHaveText(/Themes/);
|
||||
});
|
||||
|
||||
test("User creates color token and auto created set show up in the sidebar", async ({
|
||||
page,
|
||||
}) => {
|
||||
const { workspacePage, tokensUpdateCreateModal, tokenThemesSetsSidebar } =
|
||||
await setupFileWithTokens(page);
|
||||
|
||||
const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" });
|
||||
await tokensTabPanel.getByTitle("Add token: Color").click();
|
||||
|
||||
// Create color token with mouse
|
||||
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
|
||||
const nameField = tokensUpdateCreateModal.getByLabel("Name");
|
||||
const valueField = tokensUpdateCreateModal.getByLabel("Value");
|
||||
|
||||
await nameField.click();
|
||||
await nameField.fill("color.primary");
|
||||
|
||||
await valueField.click();
|
||||
await valueField.fill("red");
|
||||
|
||||
const submitButton = tokensUpdateCreateModal.getByRole("button", {
|
||||
name: "Save",
|
||||
});
|
||||
await expect(submitButton).toBeEnabled();
|
||||
await submitButton.click();
|
||||
|
||||
await expect(tokensTabPanel.getByText("color.primary")).toBeEnabled();
|
||||
|
||||
// Create token referencing the previous one with keyboard
|
||||
|
||||
await tokensTabPanel.getByTitle("Add token: Color").click();
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
|
||||
await nameField.click();
|
||||
await nameField.fill("color.secondary");
|
||||
await nameField.press("Tab");
|
||||
|
||||
await valueField.click();
|
||||
await valueField.fill("{color.primary}");
|
||||
|
||||
await expect(submitButton).toBeEnabled();
|
||||
await nameField.press("Enter");
|
||||
|
||||
const referenceToken = tokensTabPanel.getByText("color.secondary");
|
||||
await expect(referenceToken).toBeEnabled();
|
||||
|
||||
// Tokens tab panel should have two tokens with the color red / #ff0000
|
||||
await expect(tokensTabPanel.getByTitle("#ff0000")).toHaveCount(2);
|
||||
|
||||
// Global set has been auto created and is active
|
||||
await expect(
|
||||
tokenThemesSetsSidebar.getByRole("button", {
|
||||
name: "Global",
|
||||
}),
|
||||
).toHaveCount(1);
|
||||
await expect(
|
||||
tokenThemesSetsSidebar.getByRole("button", {
|
||||
name: "Global",
|
||||
}),
|
||||
).toHaveAttribute("aria-checked", "true");
|
||||
});
|
||||
});
|
||||
|
||||
test.describe("Tokens: Sets Tab", () => {
|
||||
const createSet = async (sidebar, setName, finalKey = "Enter") => {
|
||||
const tokensTabButton = sidebar
|
||||
.getByRole("button", { name: "Add set" })
|
||||
.click();
|
||||
|
||||
const setInput = sidebar.locator("input:focus");
|
||||
await expect(setInput).toBeVisible();
|
||||
await setInput.fill(setName);
|
||||
await setInput.press(finalKey);
|
||||
};
|
||||
|
||||
// test("User creates sets tree structure by entering a set path", async ({
|
||||
// page,
|
||||
// }) => {
|
||||
// const {
|
||||
// workspacePage,
|
||||
// tokenThemesSetsSidebar,
|
||||
// tokenSetItems,
|
||||
// tokenSetGroupItems,
|
||||
// } = await setupFileWithTokens(page);
|
||||
//
|
||||
// const tokensTabButton = tokenThemesSetsSidebar
|
||||
// .getByRole("button", { name: "Add set" })
|
||||
// .click();
|
||||
//
|
||||
// await createSet(tokenThemesSetsSidebar, "core/colors/light");
|
||||
// await createSet(tokenThemesSetsSidebar, "core/colors/dark");
|
||||
//
|
||||
// // User cancels during editing
|
||||
// await createSet(tokenThemesSetsSidebar, "core/colors/dark", "Escape");
|
||||
//
|
||||
// await expect(tokenSetItems).toHaveCount(2);
|
||||
// await expect(tokenSetGroupItems).toHaveCount(2);
|
||||
// });
|
||||
});
|
3
frontend/resources/images/icons/broken-link.svg
Normal file
3
frontend/resources/images/icons/broken-link.svg
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M6.5 10.5h-1a2.5 2.5 0 0 1 0-5m4 0h1a2.5 2.5 0 0 1 2 4M6 8h2M3 3l10 10"/>
|
||||
</svg>
|
After Width: | Height: | Size: 235 B |
3
frontend/resources/images/icons/import-export.svg
Normal file
3
frontend/resources/images/icons/import-export.svg
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="m8.5 8.658-2-1.657m0 0-2 1.657m2-1.657V11.5m6 1.842-2 1.657m0 0-2-1.657m2 1.657V10.5m3.15.104a3.18 3.18 0 0 0-1.832-5.78h-.802A5.088 5.088 0 1 0 2.278 9.46"/>
|
||||
</svg>
|
After Width: | Height: | Size: 286 B |
8
frontend/resources/images/icons/token-status-full.svg
Normal file
8
frontend/resources/images/icons/token-status-full.svg
Normal file
|
@ -0,0 +1,8 @@
|
|||
<svg width="14" xmlns="http://www.w3.org/2000/svg" height="14">
|
||||
<g fill="none">
|
||||
<rect rx="0" ry="0" width="14" height="14"/>
|
||||
</g>
|
||||
<g>
|
||||
<path d="M7 2.443A4.56 4.56 0 0 1 11.557 7 4.56 4.56 0 0 1 7 11.557 4.56 4.56 0 0 1 2.443 7 4.56 4.56 0 0 1 7 2.443ZM7 4.25a2.751 2.751 0 0 0 0 5.5 2.751 2.751 0 0 0 0-5.5Z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 353 B |
|
@ -0,0 +1,8 @@
|
|||
<svg width="14" xmlns="http://www.w3.org/2000/svg" height="14" >
|
||||
<g fill="none">
|
||||
<rect rx="0" ry="0" width="14" height="14"/>
|
||||
</g>
|
||||
<g class="frame-children">
|
||||
<circle cx="7" cy="7" r="4"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 231 B |
8
frontend/resources/images/icons/token-status-partial.svg
Normal file
8
frontend/resources/images/icons/token-status-partial.svg
Normal file
|
@ -0,0 +1,8 @@
|
|||
<svg width="14" xmlns="http://www.w3.org/2000/svg" height="14">
|
||||
<g fill="none">
|
||||
<rect rx="0" ry="0" width="14" height="14"/>
|
||||
</g>
|
||||
<g>
|
||||
<path d="M7 4.25a2.751 2.751 0 0 0-1.711 4.903l-1.282 1.282A4.548 4.548 0 0 1 2.443 7 4.56 4.56 0 0 1 7 2.443c1.37 0 2.599.606 3.435 1.564L9.153 5.289A2.747 2.747 0 0 0 7 4.25Z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 357 B |
|
@ -152,6 +152,7 @@ $s-648: #{0.25 * 162}rem;
|
|||
$s-664: #{0.25 * 166}rem;
|
||||
$s-688: #{0.25 * 172}rem;
|
||||
$s-712: #{0.25 * 178}rem;
|
||||
$s-720: #{0.25 * 180}rem;
|
||||
$s-736: #{0.25 * 184}rem;
|
||||
$s-744: #{0.25 * 186}rem;
|
||||
$s-800: #{0.25 * 200}rem;
|
||||
|
|
|
@ -6,20 +6,18 @@
|
|||
|
||||
(ns app.main.data.tokens
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.files.changes-builder :as pcb]
|
||||
[app.common.geom.point :as gpt]
|
||||
[app.common.logic.tokens :as clt]
|
||||
[app.common.types.shape :as cts]
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[app.main.data.changes :as dch]
|
||||
[app.main.data.workspace.shapes :as dwsh]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.ui.workspace.tokens.token :as wtt]
|
||||
[app.main.ui.workspace.tokens.token-set :as wtts]
|
||||
[app.main.ui.workspace.tokens.update :as wtu]
|
||||
[beicon.v2.core :as rx]
|
||||
[clojure.data :as data]
|
||||
[cuerdas.core :as str]
|
||||
[potok.v2.core :as ptk]))
|
||||
|
||||
|
@ -51,57 +49,25 @@
|
|||
;; TOKENS Actions
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defn toggle-or-apply-token
|
||||
"Remove any shape attributes from token if they exists.
|
||||
Othewise apply token attributes."
|
||||
[shape token]
|
||||
(let [[shape-leftover token-leftover _matching] (data/diff (:applied-tokens shape) token)]
|
||||
(merge {} shape-leftover token-leftover)))
|
||||
|
||||
(defn token-from-attributes [token attributes]
|
||||
(->> (map (fn [attr] [attr (wtt/token-identifier token)]) attributes)
|
||||
(into {})))
|
||||
|
||||
(defn unapply-token-id [shape attributes]
|
||||
(update shape :applied-tokens d/without-keys attributes))
|
||||
|
||||
(defn apply-token-to-attributes [{:keys [shape token attributes]}]
|
||||
(let [token (token-from-attributes token attributes)]
|
||||
(toggle-or-apply-token shape token)))
|
||||
|
||||
(defn apply-token-to-shape
|
||||
[{:keys [shape token attributes] :as _props}]
|
||||
(let [applied-tokens (apply-token-to-attributes {:shape shape
|
||||
:token token
|
||||
:attributes attributes})]
|
||||
(update shape :applied-tokens #(merge % applied-tokens))))
|
||||
|
||||
(defn maybe-apply-token-to-shape
|
||||
"When the passed `:token` is non-nil apply it to the `:applied-tokens` on a shape."
|
||||
[{:keys [shape token _attributes] :as props}]
|
||||
(if token
|
||||
(apply-token-to-shape props)
|
||||
shape))
|
||||
|
||||
(defn get-token-data-from-token-id
|
||||
[id]
|
||||
(let [workspace-data (deref refs/workspace-data)]
|
||||
(get (:tokens workspace-data) id)))
|
||||
|
||||
(defn set-selected-token-set-id
|
||||
[id]
|
||||
(ptk/reify ::set-selected-token-set-id
|
||||
(defn set-selected-token-set-path
|
||||
[full-path]
|
||||
(ptk/reify ::set-selected-token-set-path
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(wtts/assoc-selected-token-set-id state id))))
|
||||
(wtts/assoc-selected-token-set-path state full-path))))
|
||||
|
||||
(defn set-selected-token-set-id-from-name
|
||||
(defn set-selected-token-set-path-from-name
|
||||
[token-set-name]
|
||||
(ptk/reify ::set-selected-token-set-id-from-name
|
||||
(ptk/reify ::set-selected-token-set-path-from-name
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(->> (ctob/set-name->set-path-string token-set-name)
|
||||
(wtts/assoc-selected-token-set-id state)))))
|
||||
(->> (ctob/set-name-string->prefixed-set-path-string token-set-name)
|
||||
(wtts/assoc-selected-token-set-path state)))))
|
||||
|
||||
(defn create-token-theme [token-theme]
|
||||
(let [new-token-theme token-theme]
|
||||
|
@ -165,9 +131,19 @@
|
|||
(let [changes (-> (pcb/empty-changes it)
|
||||
(pcb/add-token-set new-token-set))]
|
||||
(rx/of
|
||||
(set-selected-token-set-id-from-name (:name new-token-set))
|
||||
(set-selected-token-set-path-from-name (:name new-token-set))
|
||||
(dch/commit-changes changes)))))))
|
||||
|
||||
(defn rename-token-set-group [from-path-str to-path-str]
|
||||
(ptk/reify ::rename-token-set-group
|
||||
ptk/WatchEvent
|
||||
(watch [it _state _]
|
||||
(let [changes (-> (pcb/empty-changes it)
|
||||
(pcb/rename-token-set-group from-path-str to-path-str))]
|
||||
(rx/of
|
||||
(set-selected-token-set-path-from-name to-path-str)
|
||||
(dch/commit-changes changes))))))
|
||||
|
||||
(defn update-token-set [set-name token-set]
|
||||
(ptk/reify ::update-token-set
|
||||
ptk/WatchEvent
|
||||
|
@ -177,28 +153,25 @@
|
|||
changes (-> (pcb/empty-changes it)
|
||||
(pcb/update-token-set token-set prev-token-set))]
|
||||
(rx/of
|
||||
(set-selected-token-set-id-from-name (:name token-set))
|
||||
(set-selected-token-set-path-from-name (:name token-set))
|
||||
(dch/commit-changes changes))))))
|
||||
|
||||
(defn toggle-token-set [{:keys [token-set-name]}]
|
||||
(ptk/reify ::toggle-token-set
|
||||
ptk/WatchEvent
|
||||
(watch [it state _]
|
||||
(let [tokens-lib (get-tokens-lib state)
|
||||
prev-theme (ctob/get-theme tokens-lib ctob/hidden-token-theme-group ctob/hidden-token-theme-name)
|
||||
active-token-set-names (ctob/get-active-themes-set-names tokens-lib)
|
||||
theme (-> (or (some-> prev-theme
|
||||
(ctob/set-sets active-token-set-names))
|
||||
(ctob/make-hidden-token-theme :sets active-token-set-names))
|
||||
(ctob/toggle-set token-set-name))
|
||||
prev-active-token-themes (ctob/get-active-theme-paths tokens-lib)
|
||||
changes (-> (pcb/empty-changes it)
|
||||
(pcb/update-active-token-themes #{(ctob/token-theme-path ctob/hidden-token-theme-group ctob/hidden-token-theme-name)} prev-active-token-themes))
|
||||
changes' (if prev-theme
|
||||
(pcb/update-token-theme changes theme prev-theme)
|
||||
(pcb/add-token-theme changes theme))]
|
||||
(watch [_ state _]
|
||||
(let [changes (clt/generate-toggle-token-set (pcb/empty-changes) (get-tokens-lib state) token-set-name)]
|
||||
(rx/of
|
||||
(dch/commit-changes changes')
|
||||
(dch/commit-changes changes)
|
||||
(wtu/update-workspace-tokens))))))
|
||||
|
||||
(defn toggle-token-set-group [{:keys [prefixed-path-str]}]
|
||||
(ptk/reify ::toggle-token-set-group
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [changes (clt/generate-toggle-token-set-group (pcb/empty-changes) (get-tokens-lib state) prefixed-path-str)]
|
||||
(rx/of
|
||||
(dch/commit-changes changes)
|
||||
(wtu/update-workspace-tokens))))))
|
||||
|
||||
(defn import-tokens-lib [lib]
|
||||
|
@ -210,7 +183,7 @@
|
|||
(ctob/get-sets)
|
||||
(first)
|
||||
(:name)
|
||||
(set-selected-token-set-id-from-name))
|
||||
(set-selected-token-set-path-from-name))
|
||||
changes (-> (pcb/empty-changes it)
|
||||
(pcb/with-library-data data)
|
||||
(pcb/set-tokens-lib lib))]
|
||||
|
@ -219,14 +192,14 @@
|
|||
update-token-set-change
|
||||
(wtu/update-workspace-tokens))))))
|
||||
|
||||
(defn delete-token-set-path [token-set-path]
|
||||
(defn delete-token-set-path [prefixed-full-set-path]
|
||||
(ptk/reify ::delete-token-set-path
|
||||
ptk/WatchEvent
|
||||
(watch [it state _]
|
||||
(let [data (get state :workspace-data)
|
||||
changes (-> (pcb/empty-changes it)
|
||||
(pcb/with-library-data data)
|
||||
(pcb/delete-token-set-path token-set-path))]
|
||||
(pcb/delete-token-set-path prefixed-full-set-path))]
|
||||
(rx/of
|
||||
(dch/commit-changes changes)
|
||||
(wtu/update-workspace-tokens))))))
|
||||
|
@ -276,7 +249,7 @@
|
|||
(pcb/update-token (pcb/empty-changes) (:name token-set) token prev-token)
|
||||
(pcb/add-token (pcb/empty-changes) (:name token-set) token)))]
|
||||
(rx/of
|
||||
(set-selected-token-set-id-from-name token-set-name)
|
||||
(set-selected-token-set-path-from-name token-set-name)
|
||||
(dch/commit-changes changes))))))
|
||||
|
||||
(defn delete-token
|
||||
|
|
|
@ -82,45 +82,46 @@
|
|||
(assoc-in [:workspace-global :picked-shift?] shift?)))))
|
||||
|
||||
(defn transform-fill
|
||||
[state ids color transform]
|
||||
(let [objects (wsh/lookup-page-objects state)
|
||||
([state ids color transform] (transform-fill state ids color transform nil))
|
||||
([state ids color transform options]
|
||||
(let [objects (wsh/lookup-page-objects state)
|
||||
|
||||
is-text? #(= :text (:type (get objects %)))
|
||||
text-ids (filter is-text? ids)
|
||||
shape-ids (remove is-text? ids)
|
||||
is-text? #(= :text (:type (get objects %)))
|
||||
text-ids (filter is-text? ids)
|
||||
shape-ids (remove is-text? ids)
|
||||
|
||||
undo-id (js/Symbol)
|
||||
undo-id (js/Symbol)
|
||||
|
||||
attrs
|
||||
(cond-> {}
|
||||
(contains? color :color)
|
||||
(assoc :fill-color (:color color))
|
||||
attrs
|
||||
(cond-> {}
|
||||
(contains? color :color)
|
||||
(assoc :fill-color (:color color))
|
||||
|
||||
(contains? color :id)
|
||||
(assoc :fill-color-ref-id (:id color))
|
||||
(contains? color :id)
|
||||
(assoc :fill-color-ref-id (:id color))
|
||||
|
||||
(contains? color :file-id)
|
||||
(assoc :fill-color-ref-file (:file-id color))
|
||||
(contains? color :file-id)
|
||||
(assoc :fill-color-ref-file (:file-id color))
|
||||
|
||||
(contains? color :gradient)
|
||||
(assoc :fill-color-gradient (:gradient color))
|
||||
(contains? color :gradient)
|
||||
(assoc :fill-color-gradient (:gradient color))
|
||||
|
||||
(contains? color :opacity)
|
||||
(assoc :fill-opacity (:opacity color))
|
||||
(contains? color :opacity)
|
||||
(assoc :fill-opacity (:opacity color))
|
||||
|
||||
(contains? color :image)
|
||||
(assoc :fill-image (:image color))
|
||||
(contains? color :image)
|
||||
(assoc :fill-image (:image color))
|
||||
|
||||
:always
|
||||
(d/without-nils))
|
||||
:always
|
||||
(d/without-nils))
|
||||
|
||||
transform-attrs #(transform % attrs)]
|
||||
transform-attrs #(transform % attrs)]
|
||||
|
||||
(rx/concat
|
||||
(rx/of (dwu/start-undo-transaction undo-id))
|
||||
(rx/from (map #(dwt/update-text-with-function % transform-attrs) text-ids))
|
||||
(rx/of (dwsh/update-shapes shape-ids transform-attrs))
|
||||
(rx/of (dwu/commit-undo-transaction undo-id)))))
|
||||
(rx/concat
|
||||
(rx/of (dwu/start-undo-transaction undo-id))
|
||||
(rx/from (map #(dwt/update-text-with-function % transform-attrs options) text-ids))
|
||||
(rx/of (dwsh/update-shapes shape-ids transform-attrs options))
|
||||
(rx/of (dwu/commit-undo-transaction undo-id))))))
|
||||
|
||||
(defn swap-attrs [shape attr index new-index]
|
||||
(let [first (get-in shape [attr index])
|
||||
|
@ -146,81 +147,86 @@
|
|||
(rx/of (dwsh/update-shapes shape-ids transform-attrs)))))))
|
||||
|
||||
(defn change-fill
|
||||
[ids color position]
|
||||
(ptk/reify ::change-fill
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [change-fn (fn [shape attrs]
|
||||
(-> shape
|
||||
(cond-> (not (contains? shape :fills))
|
||||
(assoc :fills []))
|
||||
(assoc-in [:fills position] (into {} attrs))))]
|
||||
(transform-fill state ids color change-fn)))))
|
||||
([ids color position] (change-fill ids color position nil))
|
||||
([ids color position options]
|
||||
(ptk/reify ::change-fill
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [change-fn (fn [shape attrs]
|
||||
(-> shape
|
||||
(cond-> (not (contains? shape :fills))
|
||||
(assoc :fills []))
|
||||
(assoc-in [:fills position] (into {} attrs))))]
|
||||
(transform-fill state ids color change-fn options))))))
|
||||
|
||||
(defn change-fill-and-clear
|
||||
[ids color]
|
||||
(ptk/reify ::change-fill-and-clear
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [set (fn [shape attrs] (assoc shape :fills [attrs]))]
|
||||
(transform-fill state ids color set)))))
|
||||
([ids color] (change-fill-and-clear ids color nil))
|
||||
([ids color options]
|
||||
(ptk/reify ::change-fill-and-clear
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [set (fn [shape attrs] (assoc shape :fills [attrs]))]
|
||||
(transform-fill state ids color set options))))))
|
||||
|
||||
(defn add-fill
|
||||
[ids color]
|
||||
([ids color] (add-fill ids color nil))
|
||||
([ids color options]
|
||||
|
||||
(dm/assert!
|
||||
"expected a valid color struct"
|
||||
(ctc/check-color! color))
|
||||
(dm/assert!
|
||||
"expected a valid color struct"
|
||||
(ctc/check-color! color))
|
||||
|
||||
(dm/assert!
|
||||
"expected a valid coll of uuid's"
|
||||
(every? uuid? ids))
|
||||
(dm/assert!
|
||||
"expected a valid coll of uuid's"
|
||||
(every? uuid? ids))
|
||||
|
||||
(ptk/reify ::add-fill
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [add (fn [shape attrs]
|
||||
(-> shape
|
||||
(update :fills #(into [attrs] %))))]
|
||||
(transform-fill state ids color add)))))
|
||||
(ptk/reify ::add-fill
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [add (fn [shape attrs]
|
||||
(-> shape
|
||||
(update :fills #(into [attrs] %))))]
|
||||
(transform-fill state ids color add options))))))
|
||||
|
||||
(defn remove-fill
|
||||
[ids color position]
|
||||
([ids color position] (remove-fill ids color position nil))
|
||||
([ids color position options]
|
||||
|
||||
(dm/assert!
|
||||
"expected a valid color struct"
|
||||
(ctc/check-color! color))
|
||||
(dm/assert!
|
||||
"expected a valid color struct"
|
||||
(ctc/check-color! color))
|
||||
|
||||
(dm/assert!
|
||||
"expected a valid coll of uuid's"
|
||||
(every? uuid? ids))
|
||||
(dm/assert!
|
||||
"expected a valid coll of uuid's"
|
||||
(every? uuid? ids))
|
||||
|
||||
(ptk/reify ::remove-fill
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [remove-fill-by-index (fn [values index] (->> (d/enumerate values)
|
||||
(filterv (fn [[idx _]] (not= idx index)))
|
||||
(mapv second)))
|
||||
(ptk/reify ::remove-fill
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [remove-fill-by-index (fn [values index] (->> (d/enumerate values)
|
||||
(filterv (fn [[idx _]] (not= idx index)))
|
||||
(mapv second)))
|
||||
|
||||
remove (fn [shape _] (update shape :fills remove-fill-by-index position))]
|
||||
(transform-fill state ids color remove)))))
|
||||
remove (fn [shape _] (update shape :fills remove-fill-by-index position))]
|
||||
(transform-fill state ids color remove options))))))
|
||||
|
||||
(defn remove-all-fills
|
||||
[ids color]
|
||||
([ids color] (remove-all-fills ids color nil))
|
||||
([ids color options]
|
||||
|
||||
(dm/assert!
|
||||
"expected a valid color struct"
|
||||
(ctc/check-color! color))
|
||||
(dm/assert!
|
||||
"expected a valid color struct"
|
||||
(ctc/check-color! color))
|
||||
|
||||
(dm/assert!
|
||||
"expected a valid coll of uuid's"
|
||||
(every? uuid? ids))
|
||||
(dm/assert!
|
||||
"expected a valid coll of uuid's"
|
||||
(every? uuid? ids))
|
||||
|
||||
(ptk/reify ::remove-all-fills
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [remove-all (fn [shape _] (assoc shape :fills []))]
|
||||
(transform-fill state ids color remove-all)))))
|
||||
(ptk/reify ::remove-all-fills
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [remove-all (fn [shape _] (assoc shape :fills []))]
|
||||
(transform-fill state ids color remove-all options))))))
|
||||
|
||||
(defn change-hide-fill-on-export
|
||||
[ids hide-fill-on-export]
|
||||
|
@ -237,56 +243,58 @@
|
|||
(d/merge shape attrs)
|
||||
shape))))))))
|
||||
(defn change-stroke
|
||||
[ids attrs index]
|
||||
(ptk/reify ::change-stroke
|
||||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
(let [color-attrs (cond-> {}
|
||||
(contains? attrs :color)
|
||||
(assoc :stroke-color (:color attrs))
|
||||
([ids attrs index] (change-stroke ids attrs index nil))
|
||||
([ids attrs index options]
|
||||
(ptk/reify ::change-stroke
|
||||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
(let [color-attrs (cond-> {}
|
||||
(contains? attrs :color)
|
||||
(assoc :stroke-color (:color attrs))
|
||||
|
||||
(contains? attrs :id)
|
||||
(assoc :stroke-color-ref-id (:id attrs))
|
||||
(contains? attrs :id)
|
||||
(assoc :stroke-color-ref-id (:id attrs))
|
||||
|
||||
(contains? attrs :file-id)
|
||||
(assoc :stroke-color-ref-file (:file-id attrs))
|
||||
(contains? attrs :file-id)
|
||||
(assoc :stroke-color-ref-file (:file-id attrs))
|
||||
|
||||
(contains? attrs :gradient)
|
||||
(assoc :stroke-color-gradient (:gradient attrs))
|
||||
(contains? attrs :gradient)
|
||||
(assoc :stroke-color-gradient (:gradient attrs))
|
||||
|
||||
(contains? attrs :opacity)
|
||||
(assoc :stroke-opacity (:opacity attrs))
|
||||
(contains? attrs :opacity)
|
||||
(assoc :stroke-opacity (:opacity attrs))
|
||||
|
||||
(contains? attrs :image)
|
||||
(assoc :stroke-image (:image attrs)))
|
||||
(contains? attrs :image)
|
||||
(assoc :stroke-image (:image attrs)))
|
||||
|
||||
attrs (->
|
||||
(merge attrs color-attrs)
|
||||
(dissoc :image)
|
||||
(dissoc :gradient))]
|
||||
attrs (->
|
||||
(merge attrs color-attrs)
|
||||
(dissoc :image)
|
||||
(dissoc :gradient))]
|
||||
|
||||
(rx/of (dwsh/update-shapes
|
||||
ids
|
||||
(fn [shape]
|
||||
(let [new-attrs (merge (get-in shape [:strokes index]) attrs)
|
||||
new-attrs (cond-> new-attrs
|
||||
(not (contains? new-attrs :stroke-width))
|
||||
(assoc :stroke-width 1)
|
||||
(rx/of (dwsh/update-shapes
|
||||
ids
|
||||
(fn [shape]
|
||||
(let [new-attrs (merge (get-in shape [:strokes index]) attrs)
|
||||
new-attrs (cond-> new-attrs
|
||||
(not (contains? new-attrs :stroke-width))
|
||||
(assoc :stroke-width 1)
|
||||
|
||||
(not (contains? new-attrs :stroke-style))
|
||||
(assoc :stroke-style :solid)
|
||||
(not (contains? new-attrs :stroke-style))
|
||||
(assoc :stroke-style :solid)
|
||||
|
||||
(not (contains? new-attrs :stroke-alignment))
|
||||
(assoc :stroke-alignment :center)
|
||||
(not (contains? new-attrs :stroke-alignment))
|
||||
(assoc :stroke-alignment :inner)
|
||||
|
||||
:always
|
||||
(d/without-nils))]
|
||||
(cond-> shape
|
||||
(not (contains? shape :strokes))
|
||||
(assoc :strokes [])
|
||||
:always
|
||||
(d/without-nils))]
|
||||
(cond-> shape
|
||||
(not (contains? shape :strokes))
|
||||
(assoc :strokes [])
|
||||
|
||||
:always
|
||||
(assoc-in [:strokes index] new-attrs))))))))))
|
||||
:always
|
||||
(assoc-in [:strokes index] new-attrs))))
|
||||
options)))))))
|
||||
|
||||
(defn change-shadow
|
||||
[ids attrs index]
|
||||
|
|
|
@ -824,7 +824,6 @@
|
|||
(rx/map #(reset-component %) (rx/from ids))
|
||||
(rx/of (dwu/commit-undo-transaction undo-id)))))))
|
||||
|
||||
|
||||
(defn update-component
|
||||
"Modify the component linked to the shape with the given id, in the
|
||||
current page, so that all attributes of its shapes are equal to the
|
||||
|
|
|
@ -465,8 +465,10 @@
|
|||
([]
|
||||
(apply-modifiers nil))
|
||||
|
||||
([{:keys [modifiers undo-transation? stack-undo? ignore-constraints ignore-snap-pixel undo-group]
|
||||
:or {undo-transation? true stack-undo? false ignore-constraints false ignore-snap-pixel false}}]
|
||||
([{:keys [modifiers undo-transation? stack-undo? ignore-constraints
|
||||
ignore-snap-pixel ignore-touched undo-group]
|
||||
:or {undo-transation? true stack-undo? false ignore-constraints false
|
||||
ignore-snap-pixel false ignore-touched false}}]
|
||||
(ptk/reify ::apply-modifiers
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
|
@ -515,6 +517,7 @@
|
|||
{:reg-objects? true
|
||||
:stack-undo? stack-undo?
|
||||
:ignore-tree ignore-tree
|
||||
:ignore-touched ignore-touched
|
||||
:undo-group undo-group
|
||||
;; Attributes that can change in the transform. This way we don't have to check
|
||||
;; all the attributes
|
||||
|
|
|
@ -262,15 +262,16 @@
|
|||
(rx/of (with-meta event (meta it)))))))))
|
||||
|
||||
(defn update-layout
|
||||
[ids changes]
|
||||
(ptk/reify ::update-layout
|
||||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
(let [undo-id (js/Symbol)]
|
||||
(rx/of (dwu/start-undo-transaction undo-id)
|
||||
(dwsh/update-shapes ids (d/patch-object changes))
|
||||
(ptk/data-event :layout/update {:ids ids})
|
||||
(dwu/commit-undo-transaction undo-id))))))
|
||||
([ids changes] (update-layout ids changes nil))
|
||||
([ids changes options]
|
||||
(ptk/reify ::update-layout
|
||||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
(let [undo-id (js/Symbol)]
|
||||
(rx/of (dwu/start-undo-transaction undo-id)
|
||||
(dwsh/update-shapes ids (d/patch-object changes) options)
|
||||
(ptk/data-event :layout/update {:ids ids})
|
||||
(dwu/commit-undo-transaction undo-id)))))))
|
||||
|
||||
(defn add-layout-track
|
||||
([ids type value]
|
||||
|
@ -518,27 +519,28 @@
|
|||
(assoc :layout-item-v-sizing :fix))))
|
||||
|
||||
(defn update-layout-child
|
||||
[ids changes]
|
||||
(ptk/reify ::update-layout-child
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [objects (wsh/lookup-page-objects state)
|
||||
children-ids (->> ids (mapcat #(cfh/get-children-ids objects %)))
|
||||
parent-ids (->> ids (map #(cfh/get-parent-id objects %)))
|
||||
undo-id (js/Symbol)]
|
||||
(rx/of (dwu/start-undo-transaction undo-id)
|
||||
(dwsh/update-shapes ids (d/patch-object changes))
|
||||
(dwsh/update-shapes children-ids (partial fix-child-sizing objects changes))
|
||||
(dwsh/update-shapes
|
||||
parent-ids
|
||||
(fn [parent objects]
|
||||
(-> parent
|
||||
(fix-parent-sizing objects (set ids) changes)
|
||||
(cond-> (ctl/grid-layout? parent)
|
||||
(ctl/assign-cells objects))))
|
||||
{:with-objects? true})
|
||||
(ptk/data-event :layout/update {:ids ids})
|
||||
(dwu/commit-undo-transaction undo-id))))))
|
||||
([ids changes] (update-layout-child ids changes nil))
|
||||
([ids changes options]
|
||||
(ptk/reify ::update-layout-child
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [objects (wsh/lookup-page-objects state)
|
||||
children-ids (->> ids (mapcat #(cfh/get-children-ids objects %)))
|
||||
parent-ids (->> ids (map #(cfh/get-parent-id objects %)))
|
||||
undo-id (js/Symbol)]
|
||||
(rx/of (dwu/start-undo-transaction undo-id)
|
||||
(dwsh/update-shapes ids (d/patch-object changes) options)
|
||||
(dwsh/update-shapes children-ids (partial fix-child-sizing objects changes) options)
|
||||
(dwsh/update-shapes
|
||||
parent-ids
|
||||
(fn [parent objects]
|
||||
(-> parent
|
||||
(fix-parent-sizing objects (set ids) changes)
|
||||
(cond-> (ctl/grid-layout? parent)
|
||||
(ctl/assign-cells objects))))
|
||||
(merge options {:with-objects? true}))
|
||||
(ptk/data-event :layout/update {:ids ids})
|
||||
(dwu/commit-undo-transaction undo-id)))))))
|
||||
|
||||
(defn update-grid-cells
|
||||
[layout-id ids props]
|
||||
|
|
|
@ -434,49 +434,50 @@
|
|||
(txt/transform-nodes (some-fn txt/is-text-node? txt/is-paragraph-node?) migrate-node content))
|
||||
|
||||
(defn update-text-with-function
|
||||
[id update-node-fn]
|
||||
(ptk/reify ::update-text-with-function
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(d/update-in-when state [:workspace-editor-state id] ted/update-editor-current-inline-styles-fn (comp update-node-fn migrate-node)))
|
||||
([id update-node-fn] (update-text-with-function id update-node-fn nil))
|
||||
([id update-node-fn options]
|
||||
(ptk/reify ::update-text-with-function
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(d/update-in-when state [:workspace-editor-state id] ted/update-editor-current-inline-styles-fn (comp update-node-fn migrate-node)))
|
||||
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(when (or
|
||||
(and (features/active-feature? state "text-editor/v2") (nil? (:workspace-editor state)))
|
||||
(and (not (features/active-feature? state "text-editor/v2")) (nil? (get-in state [:workspace-editor-state id]))))
|
||||
(let [objects (wsh/lookup-page-objects state)
|
||||
shape (get objects id)
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(when (or
|
||||
(and (features/active-feature? state "text-editor/v2") (nil? (:workspace-editor state)))
|
||||
(and (not (features/active-feature? state "text-editor/v2")) (nil? (get-in state [:workspace-editor-state id]))))
|
||||
(let [objects (wsh/lookup-page-objects state)
|
||||
shape (get objects id)
|
||||
|
||||
update-node? (some-fn txt/is-text-node? txt/is-paragraph-node?)
|
||||
update-node? (some-fn txt/is-text-node? txt/is-paragraph-node?)
|
||||
|
||||
shape-ids
|
||||
(cond
|
||||
(cfh/text-shape? shape) [id]
|
||||
(cfh/group-shape? shape) (cfh/get-children-ids objects id))
|
||||
shape-ids
|
||||
(cond
|
||||
(cfh/text-shape? shape) [id]
|
||||
(cfh/group-shape? shape) (cfh/get-children-ids objects id))
|
||||
|
||||
update-content
|
||||
(fn [content]
|
||||
(->> content
|
||||
(migrate-content)
|
||||
(txt/transform-nodes update-node? update-node-fn)))
|
||||
update-content
|
||||
(fn [content]
|
||||
(->> content
|
||||
(migrate-content)
|
||||
(txt/transform-nodes update-node? update-node-fn)))
|
||||
|
||||
update-shape
|
||||
(fn [shape]
|
||||
(-> shape
|
||||
(dissoc :fills)
|
||||
(d/update-when :content update-content)))]
|
||||
(rx/of (dwsh/update-shapes shape-ids update-shape)))))
|
||||
update-shape
|
||||
(fn [shape]
|
||||
(-> shape
|
||||
(dissoc :fills)
|
||||
(d/update-when :content update-content)))]
|
||||
(rx/of (dwsh/update-shapes shape-ids update-shape options)))))
|
||||
|
||||
ptk/EffectEvent
|
||||
(effect [_ state _]
|
||||
(when (features/active-feature? state "text-editor/v2")
|
||||
(let [instance (:workspace-editor state)
|
||||
styles (some-> (editor.v2/getCurrentStyle instance)
|
||||
(styles/get-styles-from-style-declaration)
|
||||
((comp update-node-fn migrate-node))
|
||||
(styles/attrs->styles))]
|
||||
(editor.v2/applyStylesToSelection instance styles))))))
|
||||
ptk/EffectEvent
|
||||
(effect [_ state _]
|
||||
(when (features/active-feature? state "text-editor/v2")
|
||||
(let [instance (:workspace-editor state)
|
||||
styles (some-> (editor.v2/getCurrentStyle instance)
|
||||
(styles/get-styles-from-style-declaration)
|
||||
((comp update-node-fn migrate-node))
|
||||
(styles/attrs->styles))]
|
||||
(editor.v2/applyStylesToSelection instance styles)))))))
|
||||
|
||||
;; --- RESIZE UTILS
|
||||
|
||||
|
|
|
@ -301,30 +301,31 @@
|
|||
(defn update-dimensions
|
||||
"Change size of shapes, from the sideber options form.
|
||||
Will ignore pixel snap used in the options side panel"
|
||||
[ids attr value]
|
||||
(dm/assert! (number? value))
|
||||
(dm/assert!
|
||||
"expected valid coll of uuids"
|
||||
(every? uuid? ids))
|
||||
(dm/assert!
|
||||
"expected valid attr"
|
||||
(contains? #{:width :height} attr))
|
||||
(ptk/reify ::update-dimensions
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(let [objects (wsh/lookup-page-objects state)
|
||||
get-modifier
|
||||
(fn [shape] (ctm/change-dimensions-modifiers shape attr value))
|
||||
([ids attr value] (update-dimensions ids attr value nil))
|
||||
([ids attr value options]
|
||||
(dm/assert! (number? value))
|
||||
(dm/assert!
|
||||
"expected valid coll of uuids"
|
||||
(every? uuid? ids))
|
||||
(dm/assert!
|
||||
"expected valid attr"
|
||||
(contains? #{:width :height} attr))
|
||||
(ptk/reify ::update-dimensions
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(let [objects (wsh/lookup-page-objects state)
|
||||
get-modifier
|
||||
(fn [shape] (ctm/change-dimensions-modifiers shape attr value))
|
||||
|
||||
modif-tree
|
||||
(-> (dwm/build-modif-tree ids objects get-modifier)
|
||||
(gm/set-objects-modifiers objects))]
|
||||
modif-tree
|
||||
(-> (dwm/build-modif-tree ids objects get-modifier)
|
||||
(gm/set-objects-modifiers objects))]
|
||||
|
||||
(assoc state :workspace-modifiers modif-tree)))
|
||||
(assoc state :workspace-modifiers modif-tree)))
|
||||
|
||||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
(rx/of (dwm/apply-modifiers)))))
|
||||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
(rx/of (dwm/apply-modifiers options))))))
|
||||
|
||||
(defn change-orientation
|
||||
"Change orientation of shapes, from the sidebar options form.
|
||||
|
@ -402,7 +403,7 @@
|
|||
"Rotate shapes a fixed angle, from a keyboard action."
|
||||
([ids rotation]
|
||||
(increase-rotation ids rotation nil))
|
||||
([ids rotation params]
|
||||
([ids rotation params & options]
|
||||
(ptk/reify ::increase-rotation
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
|
@ -411,7 +412,7 @@
|
|||
shapes (->> ids (map #(get objects %)))]
|
||||
(rx/concat
|
||||
(rx/of (dwm/set-delta-rotation-modifiers rotation shapes params))
|
||||
(rx/of (dwm/apply-modifiers))))))))
|
||||
(rx/of (dwm/apply-modifiers options))))))))
|
||||
|
||||
|
||||
;; -- Move ----------------------------------------------------------
|
||||
|
|
|
@ -453,8 +453,8 @@
|
|||
(def workspace-token-themes-no-hidden
|
||||
(l/derived #(remove ctob/hidden-temporary-theme? %) workspace-token-themes))
|
||||
|
||||
(def workspace-selected-token-set-id
|
||||
(l/derived wtts/get-selected-token-set-id st/state))
|
||||
(def workspace-selected-token-set-path
|
||||
(l/derived wtts/get-selected-token-set-path st/state))
|
||||
|
||||
(def workspace-token-set-group-selected?
|
||||
(l/derived wtts/token-group-selected? st/state))
|
||||
|
@ -468,6 +468,14 @@
|
|||
(def workspace-active-theme-paths
|
||||
(l/derived (d/nilf ctob/get-active-theme-paths) tokens-lib))
|
||||
|
||||
(defn token-sets-at-path-all-active
|
||||
[prefixed-path]
|
||||
(l/derived
|
||||
(fn [lib]
|
||||
(when lib
|
||||
(ctob/sets-at-path-all-active? lib prefixed-path)))
|
||||
tokens-lib))
|
||||
|
||||
(def workspace-active-theme-paths-no-hidden
|
||||
(l/derived #(disj % ctob/hidden-token-theme-path) workspace-active-theme-paths))
|
||||
|
||||
|
|
|
@ -86,6 +86,11 @@
|
|||
(mf/with-effect [default-value]
|
||||
(swap! state* assoc :current-value default-value))
|
||||
|
||||
(mf/with-effect [is-open?]
|
||||
(when (and (not= 0 (mf/ref-val dropdown-direction-change*)) (= false is-open?))
|
||||
(reset! dropdown-direction* "down")
|
||||
(mf/set-ref-val! dropdown-direction-change* 0)))
|
||||
|
||||
(mf/with-effect [is-open? dropdown-element*]
|
||||
(let [dropdown-element (mf/ref-val dropdown-element*)]
|
||||
(when (and (= 0 (mf/ref-val dropdown-direction-change*)) dropdown-element)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
[app.main.ui.ds.foundations.typography :refer [typography-list]]
|
||||
[app.main.ui.ds.foundations.typography.heading :refer [heading*]]
|
||||
[app.main.ui.ds.foundations.typography.text :refer [text*]]
|
||||
[app.main.ui.ds.foundations.utilities.token.token-status :refer [token-status-icon* token-status-list]]
|
||||
[app.main.ui.ds.layout.tab-switcher :refer [tab-switcher*]]
|
||||
[app.main.ui.ds.notifications.toast :refer [toast*]]
|
||||
[app.main.ui.ds.product.empty-placeholder :refer [empty-placeholder*]]
|
||||
|
@ -43,9 +44,11 @@
|
|||
:Text text*
|
||||
:TabSwitcher tab-switcher*
|
||||
:Toast toast*
|
||||
:TokenStatusIcon token-status-icon*
|
||||
:Swatch swatch*
|
||||
;; meta / misc
|
||||
:meta #js {:icons (clj->js (sort icon-list))
|
||||
:tokenStatus (clj->js (sort token-status-list))
|
||||
:svgs (clj->js (sort raw-svg-list))
|
||||
:typography (clj->js typography-list)}
|
||||
:storybook #js {:StoryGrid sb/story-grid*
|
||||
|
|
|
@ -17,20 +17,24 @@
|
|||
[:class {:optional true} :string]
|
||||
[:icon {:optional true}
|
||||
[:and :string [:fn #(contains? icon-list %)]]]
|
||||
[:on-ref {:optional true} fn?]
|
||||
[:variant {:optional true}
|
||||
[:maybe [:enum "primary" "secondary" "ghost" "destructive"]]]])
|
||||
|
||||
(mf/defc button*
|
||||
{::mf/props :obj
|
||||
::mf/schema schema:button}
|
||||
[{:keys [variant icon children class] :rest props}]
|
||||
[{:keys [variant icon children class on-ref] :rest props}]
|
||||
(let [variant (or variant "primary")
|
||||
class (dm/str class " " (stl/css-case :button true
|
||||
:button-primary (= variant "primary")
|
||||
:button-secondary (= variant "secondary")
|
||||
:button-ghost (= variant "ghost")
|
||||
:button-destructive (= variant "destructive")))
|
||||
props (mf/spread-props props {:class class})]
|
||||
props (mf/spread-props props {:class class
|
||||
:ref (fn [node]
|
||||
(when on-ref
|
||||
(on-ref node)))})]
|
||||
[:> "button" props
|
||||
(when icon [:> icon* {:icon-id icon :size "m"}])
|
||||
[:span {:class (stl/css :label-wrapper)} children]]))
|
|
@ -22,6 +22,7 @@ $orange-950: #440806;
|
|||
|
||||
$red-200: #ffcada;
|
||||
$red-400: #c80857;
|
||||
$red-500: #ff3277;
|
||||
$red-950: #500124;
|
||||
|
||||
$pink-400: #ff6fe0;
|
||||
|
@ -33,6 +34,16 @@ $purple-700: #6911d4;
|
|||
$purple-600-10: #8c33eb1a;
|
||||
$purple-700-60: #6911d499;
|
||||
|
||||
$aqua-200: #ddf7ff;
|
||||
$aqua-400: #77e1f3;
|
||||
$aqua-600: #59acbb;
|
||||
$aqua-800: #1d4464;
|
||||
|
||||
$violet-300: #a7a9ff;
|
||||
$violet-600: #6c6dad;
|
||||
$violet-700: #484c74;
|
||||
$violet-800: #272941;
|
||||
|
||||
$blue-200: #bae3fd;
|
||||
$blue-500: #0e9be9;
|
||||
$blue-950: #082c49;
|
||||
|
@ -72,6 +83,7 @@ $grayish-red: #bfbfbf;
|
|||
--color-background-warning: #{$orange-200};
|
||||
--color-accent-error: #{$red-400};
|
||||
--color-background-error: #{$red-200};
|
||||
--color-foreground-error: #{$red-500};
|
||||
--color-accent-info: #{$blue-500};
|
||||
--color-background-info: #{$blue-200};
|
||||
|
||||
|
@ -87,6 +99,11 @@ $grayish-red: #bfbfbf;
|
|||
--color-overlay-default: #{$white-60};
|
||||
--color-overlay-onboarding: #{$white-90};
|
||||
--color-canvas: #{$grayish-red};
|
||||
|
||||
--color-token-background: #{$aqua-200};
|
||||
--color-token-border: #{$aqua-400};
|
||||
--color-token-accent: #{$aqua-600};
|
||||
--color-token-foreground: #{$aqua-800};
|
||||
}
|
||||
|
||||
:global(.default) {
|
||||
|
@ -104,6 +121,7 @@ $grayish-red: #bfbfbf;
|
|||
--color-background-warning: #{$orange-950};
|
||||
--color-accent-error: #{$red-400};
|
||||
--color-background-error: #{$red-950};
|
||||
--color-foreground-error: #{$red-500};
|
||||
--color-accent-info: #{$blue-500};
|
||||
--color-background-info: #{$blue-950};
|
||||
|
||||
|
@ -119,4 +137,9 @@ $grayish-red: #bfbfbf;
|
|||
--color-overlay-default: #{$gray-950-60};
|
||||
--color-overlay-onboarding: #{$gray-950-90};
|
||||
--color-canvas: #{$grayish-red};
|
||||
|
||||
--color-token-background: #{$violet-800};
|
||||
--color-token-border: #{$violet-700};
|
||||
--color-token-accent: #{$violet-600};
|
||||
--color-token-foreground: #{$violet-300};
|
||||
}
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
[:class {:optional true} :string]
|
||||
[:icon {:optional true}
|
||||
[:and :string [:fn #(contains? icon-list %)]]]
|
||||
[:type {:optional true} :string]
|
||||
[:ref {:optional true} some?]])
|
||||
[:type {:optional true} :string]])
|
||||
|
||||
(mf/defc input*
|
||||
{::mf/props :obj
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
(def ^:icon-id boolean-flatten "boolean-flatten")
|
||||
(def ^:icon-id boolean-intersection "boolean-intersection")
|
||||
(def ^:icon-id boolean-union "boolean-union")
|
||||
(def ^:icon-id broken-link "broken-link")
|
||||
(def ^:icon-id bug "bug")
|
||||
(def ^:icon-id character-a "character-a")
|
||||
(def ^:icon-id character-b "character-b")
|
||||
|
@ -165,6 +166,7 @@
|
|||
(def ^:icon-id icon "icon")
|
||||
(def ^:icon-id img "img")
|
||||
(def ^:icon-id info "info")
|
||||
(def ^:icon-id import-export "import-export")
|
||||
(def ^:icon-id interaction "interaction")
|
||||
(def ^:icon-id join-nodes "join-nodes")
|
||||
(def ^:icon-id justify-content-column-around "justify-content-column-around")
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
(ns app.main.ui.ds.foundations.utilities.token.token-status
|
||||
(:require-macros
|
||||
[app.common.data.macros :as dm]
|
||||
[app.main.style :as stl])
|
||||
(:require
|
||||
[app.main.ui.ds.foundations.assets.icon :refer [collect-icons]]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(def ^:icon-id token-status-partial "token-status-partial")
|
||||
(def ^:icon-id token-status-full "token-status-full")
|
||||
(def ^:icon-id token-status-non-applied "token-status-non-applied")
|
||||
|
||||
(def token-status-list "A collection of all status" (collect-icons))
|
||||
|
||||
(def ^:private schema:token-status-icon
|
||||
[:map
|
||||
[:class {:optional true} :string]
|
||||
[:id [:and :string [:fn #(contains? token-status-list %)]]]])
|
||||
|
||||
(mf/defc token-status-icon*
|
||||
{::mf/props :obj
|
||||
::mf/schema schema:token-status-icon}
|
||||
[{:keys [id class] :rest props}]
|
||||
(let [class (dm/str (or class "") " " (stl/css :token-icon))
|
||||
props (mf/spread-props props {:class class :width "14px" :height "14px"})
|
||||
offset 0]
|
||||
[:> "svg" props
|
||||
[:use {:href (dm/str "#icon-" id) :width "14px" :height "14px" :x offset :y offset}]]))
|
|
@ -0,0 +1,31 @@
|
|||
import { Canvas, Meta } from '@storybook/blocks';
|
||||
import * as TokenStatusIconStories from "./token_status.stories"
|
||||
|
||||
<Meta of={TokenStatusIconStories} />
|
||||
|
||||
# Token status icons
|
||||
|
||||
## Technical notes
|
||||
|
||||
There are some SVG that are not regular icons, and that are only
|
||||
meant to be used on token components.
|
||||
|
||||
They represent the applied status of a token over a shape.
|
||||
|
||||
The assets are located in the `frontend/resources/images/icons` folder.
|
||||
|
||||
### Using asset IDs
|
||||
|
||||
For convenience, icons IDs are available in the component namespace.
|
||||
|
||||
```clj
|
||||
(ns app.main.ui.foo
|
||||
(:require
|
||||
[app.main.ui.ds.foundations.utilities.token.token-status :refer [token-status-icon*] :as ts]))
|
||||
```
|
||||
|
||||
```clj
|
||||
[:> token-status-icon*
|
||||
{:id ts/token-status-partial
|
||||
:class (stl/css :token-pill-icon)}]
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
// 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-icon {
|
||||
fill: currentColor;
|
||||
stroke: none;
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
import * as React from "react";
|
||||
import Components from "@target/components";
|
||||
|
||||
const { TokenStatusIcon } = Components;
|
||||
const { tokenStatus } = Components.meta;
|
||||
|
||||
export default {
|
||||
title: "Foundations/Utilities/TokenStatus",
|
||||
component: TokenStatusIcon,
|
||||
argTypes: {
|
||||
id: {
|
||||
options: tokenStatus,
|
||||
control: { type: "select" },
|
||||
},
|
||||
},
|
||||
render: ({ ...args }) => <TokenStatusIcon {...args} />,
|
||||
};
|
||||
|
||||
export const Default = {
|
||||
args: {
|
||||
id: "token-status-full",
|
||||
},
|
||||
};
|
|
@ -7,70 +7,77 @@
|
|||
|
||||
(ns app.main.ui.ds.utilities.swatch
|
||||
(:require-macros
|
||||
|
||||
[app.main.style :as stl])
|
||||
|
||||
(:require
|
||||
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.json :as json]
|
||||
[app.common.schema :as sm]
|
||||
[app.common.types.color :as ct]
|
||||
[app.config :as cfg]
|
||||
[app.util.color :as uc]
|
||||
[app.util.i18n :refer [tr]]
|
||||
[cuerdas.core :as str]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(def ^:private schema:swatch
|
||||
[:map
|
||||
[:background :string]
|
||||
[:map {:title "SchemaSwatch"}
|
||||
[:background {:optional true} ct/schema:color]
|
||||
[:class {:optional true} :string]
|
||||
[:format {:optional true} [:enum "square" "rounded"]]
|
||||
[:size {:optional true} [:enum "small" "medium"]]
|
||||
[:active {:optional true} :boolean]
|
||||
[:on-click {:optional true} fn?]])
|
||||
|
||||
(def hex-regex #"^#(?:[0-9a-fA-F]{3}){1,2}$")
|
||||
(def rgb-regex #"^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$")
|
||||
(def hsl-regex #"^hsl\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$")
|
||||
(def hsla-regex #"^hsla\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%,\s*(0|1|0?\.\d+)\)$")
|
||||
(def rgba-regex #"^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(0|1|0?\.\d+)\)$")
|
||||
(defn- color-title
|
||||
[color-item]
|
||||
(let [name (:name color-item)
|
||||
path (:path color-item)
|
||||
path-and-name (if path (str path " / " name) name)
|
||||
gradient (:gradient color-item)
|
||||
image (:image color-item)
|
||||
color (:color color-item)]
|
||||
|
||||
(defn- gradient? [background]
|
||||
(or
|
||||
(str/starts-with? background "linear-gradient")
|
||||
(str/starts-with? background "radial-gradient")))
|
||||
(if (some? name)
|
||||
(cond
|
||||
(some? color)
|
||||
(str/ffmt "% (%)" path-and-name color)
|
||||
|
||||
(defn- color-solid? [background]
|
||||
(boolean
|
||||
(or (re-matches hex-regex background)
|
||||
(or (re-matches hsl-regex background)
|
||||
(re-matches rgb-regex background)))))
|
||||
(some? gradient)
|
||||
(str/ffmt "% (%)" path-and-name (uc/gradient-type->string (:type gradient)))
|
||||
|
||||
(defn- color-opacity? [background]
|
||||
(boolean
|
||||
(or (re-matches hsla-regex background)
|
||||
(re-matches rgba-regex background))))
|
||||
(some? image)
|
||||
(str/ffmt "% (%)" path-and-name (tr "media.image"))
|
||||
|
||||
(defn- extract-color-and-opacity [background]
|
||||
(cond
|
||||
(re-matches rgba-regex background)
|
||||
(let [[_ r g b a] (re-matches rgba-regex background)]
|
||||
{:color (dm/str "rgb(" r ", " g ", " b ")")
|
||||
:opacity (js/parseFloat a)})
|
||||
:else
|
||||
path-and-name)
|
||||
|
||||
(re-matches hsla-regex background)
|
||||
(let [[_ h s l a] (re-matches hsla-regex background)]
|
||||
{:color (dm/str "hsl(" h ", " s "%, " l "%)")
|
||||
:opacity (js/parseFloat a)})
|
||||
(cond
|
||||
(some? color)
|
||||
color
|
||||
|
||||
:else
|
||||
{:color background
|
||||
:opacity 1.0}))
|
||||
(some? gradient)
|
||||
(uc/gradient-type->string (:type gradient))
|
||||
|
||||
(some? image)
|
||||
(tr "media.image")))))
|
||||
|
||||
(mf/defc swatch*
|
||||
{::mf/props :obj
|
||||
::mf/schema schema:swatch}
|
||||
[{:keys [background on-click format size active class]
|
||||
::mf/schema (sm/schema schema:swatch)}
|
||||
[{:keys [background on-click size active class]
|
||||
:rest props}]
|
||||
(let [element-type (if on-click "button" "div")
|
||||
button-type (if on-click "button" nil)
|
||||
format (or format "square")
|
||||
(let [background (if (object? background) (json/->clj background) background)
|
||||
read-only? (nil? on-click)
|
||||
id? (some? (:id background))
|
||||
element-type (if read-only? "div" "button")
|
||||
button-type (if (not read-only?) "button" nil)
|
||||
size (or size "small")
|
||||
active (or active false)
|
||||
{:keys [color opacity]} (extract-color-and-opacity background)
|
||||
gradient (:gradient background)
|
||||
image (:image background)
|
||||
format (if id? "rounded" "square")
|
||||
class (dm/str class " " (stl/css-case
|
||||
:swatch true
|
||||
:small (= size "small")
|
||||
|
@ -79,25 +86,26 @@
|
|||
:active (= active true)
|
||||
:interactive (= element-type "button")
|
||||
:rounded (= format "rounded")))
|
||||
props (mf/spread-props props {:class class :on-click on-click :type button-type})]
|
||||
props (mf/spread-props props {:class class
|
||||
:on-click on-click
|
||||
:type button-type
|
||||
:title (color-title background)})]
|
||||
|
||||
[:> element-type props
|
||||
(cond
|
||||
(color-solid? background)
|
||||
[:span {:class (stl/css :swatch-solid)
|
||||
:style {:background background}}]
|
||||
|
||||
(color-opacity? background)
|
||||
[:span {:class (stl/css :swatch-opacity)}
|
||||
[:span {:class (stl/css :swatch-solid-side)
|
||||
:style {:background color}}]
|
||||
[:span {:class (stl/css :swatch-opacity-side)
|
||||
:style {:background color :opacity opacity}}]]
|
||||
|
||||
(gradient? background)
|
||||
(some? gradient)
|
||||
[:span {:class (stl/css :swatch-gradient)
|
||||
:style {:background-image (str background ", repeating-conic-gradient(lightgray 0% 25%, white 0% 50%)")}}]
|
||||
:style {:background-image (str gradient ", repeating-conic-gradient(lightgray 0% 25%, white 0% 50%)")}}]
|
||||
|
||||
(some? image)
|
||||
(let [uri (cfg/resolve-file-media image)]
|
||||
[:span {:class (stl/css :swatch-image)
|
||||
:style {:background-image (str/ffmt "url(%)" uri)}}])
|
||||
|
||||
:else
|
||||
[:span {:class (stl/css :swatch-image)
|
||||
:style {:background-image (str "url('" background "'), repeating-conic-gradient(lightgray 0% 25%, white 0% 50%)")}}])]))
|
||||
[:span {:class (stl/css :swatch-opacity)}
|
||||
[:span {:class (stl/css :swatch-solid-side)
|
||||
:style {:background (uc/color->background (assoc background :opacity 1))}}]
|
||||
[:span {:class (stl/css :swatch-opacity-side)
|
||||
:style {:background (uc/color->background background)}}]])]))
|
||||
|
|
|
@ -7,56 +7,47 @@ import * as SwatchStories from "./swatch.stories";
|
|||
|
||||
Swatches are elements that display a color, gradient or image. They can sometimes trigger an action.
|
||||
|
||||
## Background Property
|
||||
|
||||
A swatch component can receive several props. The `background` prop is the most important and must be an object. Depending on the value of the background property we will get different variants of the component.
|
||||
|
||||
## Variants
|
||||
|
||||
**Color** (`"color"`), displays a solid color. It can take a hexadecimal, an rgb or an rgba.
|
||||
If the background prop has a hex `color` value it will display a full swatch with a solid color
|
||||
|
||||
<Canvas of={SwatchStories.Default} />
|
||||
|
||||
**WithOpacity** (`"color"`), displays a solid color on one side and the same color with its opacity applied on the other side. It can take a hexadecimal, an rgb or an rgba.
|
||||
If the background prop has a hex `color` value and an opacity value it will display a full swatch with a solid color on one side and the same color with the opacity applied on the other side. (default opacity: 1)
|
||||
|
||||
<Canvas of={SwatchStories.WithOpacity} />
|
||||
|
||||
**Gradient** (`"gradient"`), displays a gradient. A gradient should be a `linear-gradient` or a `conic-gradient`.
|
||||
|
||||
<Canvas of={SwatchStories.LinearGradient} />
|
||||
|
||||
**Image** (`"image"`) the swatch could display any image.
|
||||
|
||||
<Canvas of={SwatchStories.Image} />
|
||||
|
||||
**Active** (`"active"`) displays the swatch as active while an interface related action is happening.
|
||||
|
||||
<Canvas of={SwatchStories.Active} />
|
||||
|
||||
**Size** (`"size"`) shows a bigger or smaller swatch. Accepts `small` and `medium` (_default_) sizes.
|
||||
This component can take a size property to set the size of the swatch. In this case we can set it to `small` (default size: `medium`)
|
||||
|
||||
<Canvas of={SwatchStories.Small} />
|
||||
|
||||
**Format** (`"format"`) displays a square or rounded swatch. Accepts `square` (_default_) and `rounded` sizes.
|
||||
With the `active` property, we can display the element as being active
|
||||
|
||||
<Canvas of={SwatchStories.Rounded} />
|
||||
<Canvas of={SwatchStories.Active} />
|
||||
|
||||
The element can also be interactive, and execute an external function. Typically, it launches the color picker. To make it an interactive button, it accepts an onClick function.
|
||||
|
||||
<Canvas of={SwatchStories.Clickable} />
|
||||
|
||||
> Due to technical issues regarding the transformation between Clojurescript and Javascript, we are unable to display:
|
||||
|
||||
- Swatches with gradients
|
||||
- Library Swatches
|
||||
- Swatches with images
|
||||
|
||||
## Technical Notes
|
||||
|
||||
### Background
|
||||
|
||||
The `swatch*` component accepts a `background` prop, which must be:
|
||||
|
||||
- An hexadecimal (e.g. `#996633`)
|
||||
- An RGB (e.g. `rgb(125, 125, 0)`)
|
||||
- An RGBA (e.g. `rgba(125, 125, 0, 0.3)`)
|
||||
- A linear gradient (e.g. `linear-gradient(to right, blue, pink)`)
|
||||
- A conic gradient (e.g. `conic-gradient(red, orange, yellow, green, blue)`)
|
||||
- An image (e.g. `url(https://placecats.com/100/100)`)
|
||||
|
||||
### onClick
|
||||
|
||||
> Note: If the swatch is interactive, an `aria-label` is required. More on the `Accessibility` section.
|
||||
> Note: If the swatch is interactive, an `aria-label` is required. See the `Accessibility` section for more information.
|
||||
|
||||
The swatch button accepts an onClick prop that expect a function on the parent context.
|
||||
The swatch button accepts an onClick prop that expects a function on the parent context.
|
||||
It should be useful for launching other tools as a color picker.
|
||||
It runs when the user clics on the swatch, or presses enter or space while focusing it.
|
||||
It is executed when the user clicks on the swatch, or presses Enter or Spacebar while focused.
|
||||
|
||||
### Accessibility
|
||||
|
||||
|
|
|
@ -15,11 +15,7 @@ export default {
|
|||
component: Swatch,
|
||||
argTypes: {
|
||||
background: {
|
||||
control: { type: "text" },
|
||||
},
|
||||
format: {
|
||||
control: "select",
|
||||
options: ["square", "rounded"],
|
||||
control: "object",
|
||||
},
|
||||
size: {
|
||||
control: "select",
|
||||
|
@ -30,8 +26,7 @@ export default {
|
|||
},
|
||||
},
|
||||
args: {
|
||||
background: "#663399",
|
||||
format: "square",
|
||||
background: { color: "#7efff5" },
|
||||
size: "medium",
|
||||
active: false,
|
||||
},
|
||||
|
@ -42,28 +37,52 @@ export const Default = {};
|
|||
|
||||
export const WithOpacity = {
|
||||
args: {
|
||||
background: "rgba(255, 0, 0, 0.5)",
|
||||
background: {
|
||||
color: "#7efff5",
|
||||
opacity: 0.5,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const LinearGradient = {
|
||||
args: {
|
||||
background: "linear-gradient(to right, transparent, mistyrose)",
|
||||
},
|
||||
};
|
||||
// These stories are disabled because the gradient and the UUID variants cannot be translated from cljs into JS
|
||||
// When the repo is updated to use the new version of rumext, these stories should be re-enabled and tested
|
||||
//
|
||||
// export const LinearGradient = {
|
||||
// args: {
|
||||
// background: {
|
||||
// gradient: {
|
||||
// type: "linear",
|
||||
// startX: 0,
|
||||
// startY: 0,
|
||||
// endX: 1,
|
||||
// endY: 0,
|
||||
// width: 1,
|
||||
// stops: [
|
||||
// {
|
||||
// color: "#fabada",
|
||||
// opacity: 1,
|
||||
// offset: 0,
|
||||
// },
|
||||
// {
|
||||
// color: "#cc0000",
|
||||
// opacity: 0.5,
|
||||
// offset: 1,
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
|
||||
export const Image = {
|
||||
args: {
|
||||
background: "images/form/never-used.png",
|
||||
size: "medium",
|
||||
},
|
||||
};
|
||||
|
||||
export const Rounded = {
|
||||
args: {
|
||||
format: "rounded",
|
||||
},
|
||||
};
|
||||
// export const Rounded = {
|
||||
// args: {
|
||||
// background: {
|
||||
// id: crypto.randomUUID(),
|
||||
// color: "#7efff5",
|
||||
// opacity: 0.5,
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
|
||||
export const Small = {
|
||||
args: {
|
||||
|
@ -74,7 +93,6 @@ export const Small = {
|
|||
export const Active = {
|
||||
args: {
|
||||
active: true,
|
||||
background: "#CC00CC",
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
[app.main.ui.components.context-menu-a11y :refer [context-menu*]]
|
||||
[app.main.ui.components.title-bar :refer [title-bar]]
|
||||
[app.main.ui.context :as ctx]
|
||||
[app.main.ui.icons :as i]
|
||||
[app.main.ui.ds.foundations.assets.icon :refer [icon*]]
|
||||
[app.util.array :as array]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.dom.dnd :as dnd]
|
||||
|
@ -119,18 +119,17 @@
|
|||
:left (:left state)
|
||||
:options options}])
|
||||
|
||||
(mf/defc section-icon
|
||||
{::mf/wrap-props false}
|
||||
[{:keys [section]}]
|
||||
(defn section-icon
|
||||
[section]
|
||||
(case section
|
||||
:colors i/drop-icon
|
||||
:components i/component
|
||||
:typographies i/text-palette
|
||||
i/add))
|
||||
:colors "drop"
|
||||
:components "component"
|
||||
:typographies "text-palette"
|
||||
"add"))
|
||||
|
||||
(mf/defc asset-section
|
||||
{::mf/wrap-props false}
|
||||
[{:keys [children file-id title section assets-count icon open?]}]
|
||||
[{:keys [children file-id title section assets-count icon open? on-click]}]
|
||||
(let [children (-> (array/normalize-to-array children)
|
||||
(array/without-nils))
|
||||
|
||||
|
@ -151,7 +150,7 @@
|
|||
(mf/html
|
||||
[:span {:class (stl/css :title-name)}
|
||||
[:span {:class (stl/css :section-icon)}
|
||||
[:& (or icon section-icon) {:section section}]]
|
||||
[:> icon* {:id (or icon (section-icon section)) :size "s"}]]
|
||||
[:span {:class (stl/css :section-name)}
|
||||
title]
|
||||
|
||||
|
@ -160,17 +159,20 @@
|
|||
|
||||
[:div {:class (stl/css-case :asset-section true
|
||||
:opened (and (< 0 assets-count)
|
||||
open?))}
|
||||
open?))
|
||||
:on-click on-click}
|
||||
[:& title-bar
|
||||
{:collapsable (< 0 assets-count)
|
||||
:collapsed (not open?)
|
||||
:all-clickable true
|
||||
:on-collapsed on-collapsed
|
||||
:add-icon-gap (= 0 assets-count)
|
||||
:class (stl/css-case :title-spacing open?)
|
||||
:title title}
|
||||
buttons]
|
||||
(when ^boolean open? content)]))
|
||||
(when ^boolean (and (< 0 assets-count)
|
||||
open?)
|
||||
[:div {:class (stl/css-case :title-spacing open?)}
|
||||
content])]))
|
||||
|
||||
(mf/defc asset-section-block
|
||||
{::mf/wrap-props false}
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
}
|
||||
|
||||
.title-spacing {
|
||||
margin-bottom: $s-4;
|
||||
padding-block-start: $s-4;
|
||||
}
|
||||
|
||||
.asset-section.opened {
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
[app.main.ui.components.numeric-input :refer [numeric-input*]]
|
||||
[app.main.ui.ds.buttons.icon-button :refer [icon-button*]]
|
||||
[app.main.ui.ds.foundations.assets.icon :refer [icon*]]
|
||||
[app.main.ui.hooks :as hooks]
|
||||
[app.util.i18n :as i18n :refer [tr]]
|
||||
[beicon.v2.core :as rx]
|
||||
[potok.v2.core :as ptk]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(defn all-equal?
|
||||
|
@ -58,7 +61,19 @@
|
|||
on-radius-r1-change #(on-radius-4-change % :r1)
|
||||
on-radius-r2-change #(on-radius-4-change % :r2)
|
||||
on-radius-r3-change #(on-radius-4-change % :r3)
|
||||
on-radius-r4-change #(on-radius-4-change % :r4)]
|
||||
on-radius-r4-change #(on-radius-4-change % :r4)
|
||||
|
||||
expand-stream
|
||||
(mf/with-memo []
|
||||
(->> st/stream
|
||||
(rx/filter (ptk/type? :expand-border-radius))))]
|
||||
|
||||
(hooks/use-stream
|
||||
expand-stream
|
||||
#(reset! radius-expanded* true))
|
||||
|
||||
(mf/with-effect [ids]
|
||||
(reset! radius-expanded* false))
|
||||
|
||||
[:div {:class (stl/css :radius)}
|
||||
(if (not radius-expanded)
|
||||
|
@ -117,6 +132,6 @@
|
|||
:variant "ghost"
|
||||
:on-click toggle-radius-mode
|
||||
:aria-label (if radius-expanded
|
||||
(tr "workspace.options.radius.all-corners")
|
||||
(tr "workspace.options.radius.single-corners"))
|
||||
:icon "corner-radius"}]]))
|
||||
(tr "workspace.options.radius.hide-all-corners")
|
||||
(tr "workspace.options.radius.show-single-corners"))
|
||||
:icon "corner-radius"}]]))
|
||||
|
|
|
@ -282,7 +282,6 @@
|
|||
(st/emit! (udw/trigger-bounding-box-cloaking ids)
|
||||
(udw/increase-rotation ids value)))))
|
||||
|
||||
|
||||
on-width-change #(on-size-change % :width)
|
||||
on-height-change #(on-size-change % :height)
|
||||
on-pos-x-change #(on-position-change % :x)
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
[app.main.data.workspace.state-helpers :as wsh]
|
||||
[app.main.data.workspace.transforms :as dwt]
|
||||
[app.main.data.workspace.undo :as dwu]
|
||||
[app.main.store :as st]
|
||||
[app.main.ui.workspace.tokens.style-dictionary :as sd]
|
||||
[app.main.ui.workspace.tokens.tinycolor :as tinycolor]
|
||||
[app.main.ui.workspace.tokens.token :as wtt]
|
||||
|
@ -95,11 +96,25 @@
|
|||
(when (ctsr/can-get-border-radius? shape)
|
||||
(ctsr/set-radius-to-all-corners shape value)))
|
||||
{:reg-objects? true
|
||||
:ignore-touched true
|
||||
:attrs ctt/border-radius-keys}))
|
||||
|
||||
(defn update-shape-radius-single-corner [value shape-ids attributes]
|
||||
;; NOTE: This key should be namespaced on data tokens, but these events are not there.
|
||||
(st/emit! (ptk/data-event :expand-border-radius))
|
||||
(dwsh/update-shapes shape-ids
|
||||
(fn [shape]
|
||||
(when (ctsr/can-get-border-radius? shape)
|
||||
(ctsr/set-radius-to-single-corner shape (first attributes) value)))
|
||||
{:reg-objects? true
|
||||
:ignore-touched true
|
||||
:attrs ctt/border-radius-keys}))
|
||||
|
||||
(defn update-opacity [value shape-ids]
|
||||
(when (<= 0 value 1)
|
||||
(dwsh/update-shapes shape-ids #(assoc % :opacity value))))
|
||||
(dwsh/update-shapes shape-ids
|
||||
#(assoc % :opacity value)
|
||||
{:ignore-touched true})))
|
||||
|
||||
(defn update-rotation [value shape-ids]
|
||||
(ptk/reify ::update-shape-rotation
|
||||
|
@ -107,15 +122,7 @@
|
|||
(watch [_ _ _]
|
||||
(rx/of
|
||||
(udw/trigger-bounding-box-cloaking shape-ids)
|
||||
(udw/increase-rotation shape-ids value)))))
|
||||
|
||||
(defn update-shape-radius-single-corner [value shape-ids attributes]
|
||||
(dwsh/update-shapes shape-ids
|
||||
(fn [shape]
|
||||
(when (ctsr/can-get-border-radius? shape)
|
||||
(ctsr/set-radius-to-single-corner shape (first attributes) value)))
|
||||
{:reg-objects? true
|
||||
:attrs ctt/border-radius-keys}))
|
||||
(udw/increase-rotation shape-ids value nil :ignore-touched true)))))
|
||||
|
||||
(defn update-stroke-width
|
||||
[value shape-ids]
|
||||
|
@ -124,14 +131,15 @@
|
|||
(when (seq (:strokes shape))
|
||||
(assoc-in shape [:strokes 0 :stroke-width] value)))
|
||||
{:reg-objects? true
|
||||
:ignore-touched true
|
||||
:attrs [:strokes]}))
|
||||
|
||||
(defn update-color [f value shape-ids]
|
||||
(let [color (some->> value
|
||||
(tinycolor/valid-color)
|
||||
(tinycolor/->hex)
|
||||
(str "#"))]
|
||||
(f shape-ids {:color color} 0)))
|
||||
(when-let [color (some->> value
|
||||
(tinycolor/valid-color)
|
||||
(tinycolor/->hex)
|
||||
(str "#"))]
|
||||
(f shape-ids {:color color} 0 {:ignore-touched true})))
|
||||
|
||||
(defn update-fill
|
||||
[value shape-ids]
|
||||
|
@ -141,13 +149,21 @@
|
|||
[value shape-ids]
|
||||
(update-color wdc/change-stroke value shape-ids))
|
||||
|
||||
(defn update-fill-stroke [value shape-ids attributes]
|
||||
(ptk/reify ::update-fill-stroke
|
||||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
(rx/of
|
||||
(when (:fill attributes) (update-fill value shape-ids))
|
||||
(when (:stroke-color attributes) (update-stroke-color value shape-ids))))))
|
||||
|
||||
(defn update-shape-dimensions [value shape-ids attributes]
|
||||
(ptk/reify ::update-shape-dimensions
|
||||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
(rx/of
|
||||
(when (:width attributes) (dwt/update-dimensions shape-ids :width value))
|
||||
(when (:height attributes) (dwt/update-dimensions shape-ids :height value))))))
|
||||
(when (:width attributes) (dwt/update-dimensions shape-ids :width value {:ignore-touched true}))
|
||||
(when (:height attributes) (dwt/update-dimensions shape-ids :height value {:ignore-touched true}))))))
|
||||
|
||||
(defn- attributes->layout-gap [attributes value]
|
||||
(let [layout-gap (-> (set/intersection attributes #{:column-gap :row-gap})
|
||||
|
@ -155,7 +171,9 @@
|
|||
{:layout-gap layout-gap}))
|
||||
|
||||
(defn update-layout-padding [value shape-ids attrs]
|
||||
(dwsl/update-layout shape-ids {:layout-padding (zipmap attrs (repeat value))}))
|
||||
(dwsl/update-layout shape-ids
|
||||
{:layout-padding (zipmap attrs (repeat value))}
|
||||
{:ignore-touched true}))
|
||||
|
||||
(defn update-layout-spacing [value shape-ids attributes]
|
||||
(ptk/reify ::update-layout-spacing
|
||||
|
@ -167,7 +185,9 @@
|
|||
(map :id)))
|
||||
layout-attributes (attributes->layout-gap attributes value)]
|
||||
(rx/of
|
||||
(dwsl/update-layout layout-shape-ids layout-attributes))))))
|
||||
(dwsl/update-layout layout-shape-ids
|
||||
layout-attributes
|
||||
{:ignore-touched true}))))))
|
||||
|
||||
(defn update-shape-position [value shape-ids attributes]
|
||||
(ptk/reify ::update-shape-position
|
||||
|
@ -185,4 +205,4 @@
|
|||
:layout-item-max-w value
|
||||
:layout-item-max-h value}
|
||||
(select-keys attributes))]
|
||||
(dwsl/update-layout-child shape-ids props)))))
|
||||
(dwsl/update-layout-child shape-ids props {:ignore-touched true})))))
|
||||
|
|
|
@ -6,6 +6,22 @@
|
|||
|
||||
@import "refactor/common-refactor.scss";
|
||||
|
||||
.input {
|
||||
@extend .input-element;
|
||||
}
|
||||
|
||||
.labeled-input {
|
||||
@extend .input-element;
|
||||
.label {
|
||||
width: auto;
|
||||
text-wrap: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.labeled-input-error {
|
||||
border: 1px solid var(--status-color-error-500) !important;
|
||||
}
|
||||
|
||||
.button {
|
||||
@extend .button-primary;
|
||||
}
|
||||
|
|
|
@ -8,17 +8,19 @@
|
|||
(: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.tokens :as dt]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.store :as st]
|
||||
[app.main.ui.components.dropdown :refer [dropdown]]
|
||||
[app.main.ui.icons :as i]
|
||||
[app.main.ui.ds.foundations.assets.icon :refer [icon*]]
|
||||
[app.main.ui.workspace.tokens.changes :as wtch]
|
||||
[app.main.ui.workspace.tokens.token :as wtt]
|
||||
[app.main.ui.workspace.tokens.token-types :as wtty]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.i18n :refer [tr]]
|
||||
[app.util.timers :as timers]
|
||||
[okulary.core :as l]
|
||||
[rumext.v2 :as mf]))
|
||||
|
@ -58,7 +60,7 @@
|
|||
all-action (let [props {:attributes attributes
|
||||
:token token
|
||||
:shape-ids shape-ids}]
|
||||
{:title "All"
|
||||
{:title (tr "labels.all")
|
||||
:selected? all-selected?
|
||||
:action #(if all-selected?
|
||||
(st/emit! (wtch/unapply-token props))
|
||||
|
@ -96,7 +98,7 @@
|
|||
vertical-padding-selected? (and
|
||||
(not all-selected?)
|
||||
(every? selected-pred vertical-attributes))
|
||||
padding-items [{:title "All"
|
||||
padding-items [{:title (tr "labels.all")
|
||||
:selected? all-selected?
|
||||
:action (fn []
|
||||
(let [props {:attributes all-padding-attrs
|
||||
|
@ -195,22 +197,20 @@
|
|||
:stroke-width stroke-width
|
||||
:dimensions (fn [context-data]
|
||||
(concat
|
||||
[{:title "Spacing" :submenu :spacing}
|
||||
{:title "Sizing" :submenu :sizing}
|
||||
[{:title "Sizing" :submenu :sizing}
|
||||
{:title "Spacing" :submenu :spacing}
|
||||
:separator
|
||||
{:title "Border Radius" :submenu :border-radius}]
|
||||
[:separator]
|
||||
(stroke-width context-data)
|
||||
[:separator]
|
||||
(generic-attribute-actions #{:x} "X" (assoc context-data :on-update-shape wtch/update-shape-position))
|
||||
(generic-attribute-actions #{:y} "Y" (assoc context-data :on-update-shape wtch/update-shape-position))))}))
|
||||
|
||||
(defn default-actions [{:keys [token selected-token-set-id]}]
|
||||
(defn default-actions [{:keys [token selected-token-set-path]}]
|
||||
(let [{:keys [modal]} (wtty/get-token-properties token)]
|
||||
[{:title "Delete Token"
|
||||
:action #(st/emit! (dt/delete-token (ctob/set-path->set-name selected-token-set-id) (:name token)))}
|
||||
{:title "Duplicate Token"
|
||||
:action #(st/emit! (dt/duplicate-token (:name token)))}
|
||||
{:title "Edit Token"
|
||||
[{:title (tr "workspace.token.edit")
|
||||
:no-selectable true
|
||||
:action (fn [event]
|
||||
(let [{:keys [key fields]} modal]
|
||||
(st/emit! dt/hide-token-context-menu)
|
||||
|
@ -220,8 +220,16 @@
|
|||
:position :right
|
||||
:fields fields
|
||||
:action "edit"
|
||||
:selected-token-set-id selected-token-set-id
|
||||
:token token})))}]))
|
||||
:selected-token-set-path selected-token-set-path
|
||||
:token token})))}
|
||||
{:title (tr "workspace.token.duplicate")
|
||||
:no-selectable true
|
||||
:action #(st/emit! (dt/duplicate-token (:name token)))}
|
||||
{:title (tr "workspace.token.delete")
|
||||
:no-selectable true
|
||||
:action #(st/emit! (-> selected-token-set-path
|
||||
ctob/prefixed-set-path-string->set-name-string
|
||||
(dt/delete-token (:name token))))}]))
|
||||
|
||||
(defn selection-actions [{:keys [type token] :as context-data}]
|
||||
(let [with-actions (get shape-attribute-actions-map (or type (:type token)))
|
||||
|
@ -231,6 +239,12 @@
|
|||
(when (seq attribute-actions) [:separator])
|
||||
(default-actions context-data))))
|
||||
|
||||
(defn submenu-actions-selection-actions [{:keys [type token] :as context-data}]
|
||||
(let [with-actions (get shape-attribute-actions-map (or type (:type token)))
|
||||
attribute-actions (if with-actions (with-actions context-data) [])]
|
||||
(concat
|
||||
attribute-actions)))
|
||||
|
||||
;; Components ------------------------------------------------------------------
|
||||
|
||||
(def tokens-menu-ref
|
||||
|
@ -243,98 +257,146 @@
|
|||
|
||||
(mf/defc menu-entry
|
||||
{::mf/props :obj}
|
||||
[{:keys [title value on-click selected? children submenu-offset]}]
|
||||
[{:keys [title value on-click selected? children submenu-offset submenu-direction no-selectable]}]
|
||||
(let [submenu-ref (mf/use-ref nil)
|
||||
hovering? (mf/use-ref false)
|
||||
on-pointer-enter
|
||||
(mf/use-callback
|
||||
(mf/use-fn
|
||||
(fn []
|
||||
(mf/set-ref-val! hovering? true)
|
||||
(when-let [submenu-node (mf/ref-val submenu-ref)]
|
||||
(dom/set-css-property! submenu-node "display" "block"))))
|
||||
|
||||
on-pointer-leave
|
||||
(mf/use-callback
|
||||
(mf/use-fn
|
||||
(fn []
|
||||
(mf/set-ref-val! hovering? false)
|
||||
(when-let [submenu-node (mf/ref-val submenu-ref)]
|
||||
(timers/schedule 50 #(when-not (mf/ref-val hovering?)
|
||||
(dom/set-css-property! submenu-node "display" "none"))))))
|
||||
|
||||
set-dom-node
|
||||
(mf/use-callback
|
||||
(mf/use-fn
|
||||
(fn [dom]
|
||||
(let [submenu-node (mf/ref-val submenu-ref)]
|
||||
(when (and (some? dom) (some? submenu-node))
|
||||
(dom/set-css-property! submenu-node "top" (str (.-offsetTop dom) "px"))))))]
|
||||
[:li
|
||||
{:class (stl/css :context-menu-item)
|
||||
:ref set-dom-node
|
||||
:data-value value
|
||||
:on-click on-click
|
||||
:on-pointer-enter on-pointer-enter
|
||||
:on-pointer-leave on-pointer-leave}
|
||||
(when (and (some? dom) (some? submenu-node) (= submenu-direction "up"))
|
||||
(dom/set-css-property! submenu-node "top" "unset"))
|
||||
(when (and (some? dom) (some? submenu-node) (= submenu-direction "down"))
|
||||
(dom/set-css-property! submenu-node "top" (dm/str (.-offsetTop dom) "px"))))))]
|
||||
|
||||
(mf/use-effect
|
||||
(mf/deps submenu-direction)
|
||||
(fn []
|
||||
(let [submenu-node (mf/ref-val submenu-ref)]
|
||||
(when (= submenu-direction "up")
|
||||
(dom/set-css-property! submenu-node "top" "unset")))))
|
||||
|
||||
[:li {:class (stl/css :context-menu-item)
|
||||
:ref set-dom-node
|
||||
:data-value value
|
||||
:on-click on-click
|
||||
:on-pointer-enter on-pointer-enter
|
||||
:on-pointer-leave on-pointer-leave}
|
||||
(when selected?
|
||||
[:span {:class (stl/css :icon-wrapper)}
|
||||
[:span {:class (stl/css :selected-icon)} i/tick]])
|
||||
[:span {:class (stl/css :title)} title]
|
||||
[:> icon* {:id "tick" :size "s" :class (stl/css :icon-wrapper)}])
|
||||
[:span {:class (stl/css-case :item-text true
|
||||
:item-with-icon-space (and
|
||||
(not selected?)
|
||||
(not no-selectable)))}
|
||||
title]
|
||||
(when children
|
||||
[:*
|
||||
[:span {:class (stl/css :submenu-icon)} i/arrow]
|
||||
[:> icon* {:id "arrow" :size "s"}]
|
||||
[:ul {:class (stl/css :token-context-submenu)
|
||||
:data-direction submenu-direction
|
||||
:ref submenu-ref
|
||||
;; Under review: This distances are arbitrary,
|
||||
;; https://tree.taiga.io/project/penpot/task/9627
|
||||
:style {:display "none"
|
||||
:top 0
|
||||
:left (str submenu-offset "px")}
|
||||
:--dist (if (= submenu-direction "down")
|
||||
"-80px"
|
||||
"80px")
|
||||
:left (dm/str submenu-offset "px")}
|
||||
:on-context-menu prevent-default}
|
||||
children]])]))
|
||||
|
||||
(mf/defc menu-tree
|
||||
[{:keys [selected-shapes] :as context-data}]
|
||||
[{:keys [selected-shapes submenu-offset submenu-direction type] :as context-data}]
|
||||
(let [entries (if (seq selected-shapes)
|
||||
(selection-actions context-data)
|
||||
(if (some? type)
|
||||
(submenu-actions-selection-actions context-data)
|
||||
(selection-actions context-data))
|
||||
(default-actions context-data))]
|
||||
(for [[index {:keys [title action selected? submenu] :as entry}] (d/enumerate entries)]
|
||||
[:* {:key (str title " " index)}
|
||||
(for [[index {:keys [title action selected? submenu no-selectable] :as entry}] (d/enumerate entries)]
|
||||
[:* {:key (dm/str title " " index)}
|
||||
(cond
|
||||
(= :separator entry) [:li {:class (stl/css :separator)}]
|
||||
submenu [:& menu-entry {:title title
|
||||
:submenu-offset (:submenu-offset context-data)}
|
||||
:no-selectable true
|
||||
:submenu-direction submenu-direction
|
||||
:submenu-offset submenu-offset}
|
||||
[:& menu-tree (assoc context-data :type submenu)]]
|
||||
:else [:& menu-entry
|
||||
{:title title
|
||||
:on-click action
|
||||
:no-selectable no-selectable
|
||||
:selected? selected?}])])))
|
||||
|
||||
(mf/defc token-context-menu-tree
|
||||
[{:keys [width] :as mdata}]
|
||||
[{:keys [width direction] :as mdata}]
|
||||
(let [objects (mf/deref refs/workspace-page-objects)
|
||||
selected (mf/deref refs/selected-shapes)
|
||||
selected-shapes (into [] (keep (d/getf objects)) selected)
|
||||
token-name (:token-name mdata)
|
||||
token (mf/deref (refs/workspace-selected-token-set-token token-name))
|
||||
selected-token-set-id (mf/deref refs/workspace-selected-token-set-id)]
|
||||
selected-token-set-path (mf/deref refs/workspace-selected-token-set-path)]
|
||||
[:ul {:class (stl/css :context-list)}
|
||||
[:& menu-tree {:submenu-offset width
|
||||
:submenu-direction direction
|
||||
:token token
|
||||
:selected-token-set-id selected-token-set-id
|
||||
:selected-token-set-path selected-token-set-path
|
||||
:selected-shapes selected-shapes}]]))
|
||||
|
||||
(mf/defc token-context-menu
|
||||
[]
|
||||
(let [mdata (mf/deref tokens-menu-ref)
|
||||
top (+ (get-in mdata [:position :y]) 5)
|
||||
left (+ (get-in mdata [:position :x]) 5)
|
||||
width (mf/use-state 0)
|
||||
dropdown-ref (mf/use-ref)]
|
||||
(let [mdata (mf/deref tokens-menu-ref)
|
||||
is-open? (boolean mdata)
|
||||
width (mf/use-state 0)
|
||||
dropdown-ref (mf/use-ref)
|
||||
dropdown-direction* (mf/use-state "down")
|
||||
dropdown-direction (deref dropdown-direction*)
|
||||
dropdown-direction-change* (mf/use-ref 0)
|
||||
top (+ (get-in mdata [:position :y]) 5)
|
||||
left (+ (get-in mdata [:position :x]) 5)]
|
||||
|
||||
(mf/use-effect
|
||||
(mf/deps mdata)
|
||||
(mf/deps is-open?)
|
||||
(fn []
|
||||
(when-let [node (mf/ref-val dropdown-ref)]
|
||||
(reset! width (.-offsetWidth node)))))
|
||||
[:& dropdown {:show (boolean mdata)
|
||||
|
||||
(mf/with-effect [is-open?]
|
||||
(when (and (not= 0 (mf/ref-val dropdown-direction-change*)) (= false is-open?))
|
||||
(reset! dropdown-direction* "down")
|
||||
(mf/set-ref-val! dropdown-direction-change* 0)))
|
||||
|
||||
(mf/with-effect [is-open? dropdown-ref]
|
||||
(let [dropdown-element (mf/ref-val dropdown-ref)]
|
||||
(when (and (= 0 (mf/ref-val dropdown-direction-change*)) dropdown-element)
|
||||
(let [is-outside? (dom/is-element-outside? dropdown-element)]
|
||||
(reset! dropdown-direction* (if is-outside? "up" "down"))
|
||||
(mf/set-ref-val! dropdown-direction-change* (inc (mf/ref-val dropdown-direction-change*)))))))
|
||||
|
||||
[:& dropdown {:show is-open?
|
||||
:on-close #(st/emit! dt/hide-token-context-menu)}
|
||||
[:div {:class (stl/css :token-context-menu)
|
||||
:ref dropdown-ref
|
||||
:style {:top top :left left}
|
||||
:data-direction dropdown-direction
|
||||
:style {:--bottom (if (= dropdown-direction "up")
|
||||
"40px"
|
||||
"unset")
|
||||
:--top (dm/str top "px")
|
||||
:left (dm/str left "px")}
|
||||
:on-context-menu prevent-default}
|
||||
(when mdata
|
||||
[:& token-context-menu-tree (assoc mdata :offset @width)])]]))
|
||||
[:& token-context-menu-tree (assoc mdata :width @width :direction dropdown-direction)])]]))
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
//
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "../../ds/typography.scss" as *;
|
||||
@import "refactor/common-refactor.scss";
|
||||
|
||||
.token-context-menu {
|
||||
|
@ -11,6 +12,14 @@
|
|||
z-index: $z-index-4;
|
||||
}
|
||||
|
||||
.token-context-menu[data-direction="up"] {
|
||||
bottom: var(--bottom);
|
||||
}
|
||||
|
||||
.token-context-menu[data-direction="down"] {
|
||||
top: var(--top);
|
||||
}
|
||||
|
||||
.context-list,
|
||||
.token-context-submenu {
|
||||
@include menuShadow;
|
||||
|
@ -18,15 +27,18 @@
|
|||
width: $s-240;
|
||||
padding: $s-4;
|
||||
border-radius: $br-8;
|
||||
border: $s-2 solid var(--panel-border-color);
|
||||
background-color: var(--menu-background-color);
|
||||
border: $s-2 solid var(--color-background-quaternary);
|
||||
background-color: var(--color-background-tertiary);
|
||||
max-height: 100vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
li {
|
||||
@include bodySmallTypography;
|
||||
color: var(--menu-foreground-color);
|
||||
}
|
||||
.token-context-submenu[data-direction="up"] {
|
||||
bottom: var(--dist);
|
||||
}
|
||||
|
||||
.token-context-submenu[data-direction="down"] {
|
||||
top: var(--dist);
|
||||
}
|
||||
|
||||
.token-context-submenu {
|
||||
|
@ -36,68 +48,46 @@
|
|||
}
|
||||
|
||||
.separator {
|
||||
@include bodySmallTypography;
|
||||
margin: $s-6;
|
||||
border-block-start: $s-1 solid var(--panel-border-color);
|
||||
}
|
||||
|
||||
.context-menu-item {
|
||||
--context-menu-item-bg-color: none;
|
||||
--context-menu-item-fg-color: var(--color-foreground-primary);
|
||||
--context-menu-item-border-color: none;
|
||||
@include use-typography("body-small");
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: $s-28;
|
||||
width: 100%;
|
||||
padding: $s-6;
|
||||
padding: $s-8;
|
||||
border-radius: $br-8;
|
||||
color: var(--context-menu-item-fg-color);
|
||||
background-color: var(--context-menu-item-bg-color);
|
||||
border: $s-1 solid var(--context-menu-item-border-color);
|
||||
cursor: pointer;
|
||||
|
||||
.title {
|
||||
flex-grow: 1;
|
||||
@include bodySmallTypography;
|
||||
color: var(--menu-foreground-color);
|
||||
margin-left: calc(($s-32 + $s-28) / 2);
|
||||
}
|
||||
|
||||
.icon-wrapper {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
.icon-wrapper + .title {
|
||||
margin-left: $s-6;
|
||||
}
|
||||
|
||||
.selected-icon {
|
||||
svg {
|
||||
@extend .button-icon-small;
|
||||
stroke: var(--menu-foreground-color);
|
||||
}
|
||||
}
|
||||
|
||||
.submenu-icon {
|
||||
margin-left: $s-2;
|
||||
svg {
|
||||
@extend .button-icon-small;
|
||||
stroke: var(--menu-foreground-color);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--menu-background-color-hover);
|
||||
.title {
|
||||
color: var(--menu-foreground-color-hover);
|
||||
}
|
||||
.shortcut {
|
||||
color: var(--menu-shortcut-foreground-color-hover);
|
||||
}
|
||||
--context-menu-item-bg-color: var(--color-background-quaternary);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border: 1px solid var(--menu-border-color-focus);
|
||||
background-color: var(--menu-background-color-focus);
|
||||
--context-menu-item-bg-color: var(--menu-background-color-focus);
|
||||
--context-menu-item-border-color: var(--color-background-tertiary);
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
pointer-events: none;
|
||||
opacity: 0.6;
|
||||
&[aria-selected="true"] {
|
||||
--context-menu-item-bg-color: var(--color-background-quaternary);
|
||||
}
|
||||
}
|
||||
|
||||
.item-text {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.item-with-icon-space {
|
||||
padding-left: $s-20;
|
||||
}
|
||||
.icon-wrapper {
|
||||
margin-right: $s-4;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
(:require
|
||||
[app.common.colors :as c]
|
||||
[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.tokens :as dt]
|
||||
|
@ -191,10 +190,10 @@ Token names should only contain letters and digits separated by . characters.")}
|
|||
empty-message? (or (nil? result-or-errors)
|
||||
(wte/has-error-code? :error/empty-input errors))
|
||||
message (cond
|
||||
empty-message? (dm/str (tr "workspace.token.resolved-value") "-")
|
||||
empty-message? (tr "workspace.token.resolved-value" "-")
|
||||
errors (->> (wte/humanize-errors errors)
|
||||
(str/join "\n"))
|
||||
:else (dm/str (tr "workspace.token.resolved-value") result-or-errors))]
|
||||
:else (tr "workspace.token.resolved-value" result-or-errors))]
|
||||
[:> text* {:as "p"
|
||||
:typography "body-small"
|
||||
:class (stl/css-case :resolved-value true
|
||||
|
@ -204,7 +203,7 @@ Token names should only contain letters and digits separated by . characters.")}
|
|||
|
||||
(mf/defc form
|
||||
{::mf/wrap-props false}
|
||||
[{:keys [token token-type action selected-token-set-id]}]
|
||||
[{:keys [token token-type action selected-token-set-path]}]
|
||||
(let [token (or token {:type token-type})
|
||||
token-properties (wtty/get-token-properties token)
|
||||
color? (wtt/color-token? token)
|
||||
|
@ -221,6 +220,12 @@ Token names should only contain letters and digits separated by . characters.")}
|
|||
(-> (ctob/tokens-tree selected-set-tokens)
|
||||
;; Allow setting editing token to it's own path
|
||||
(d/dissoc-in token-path))))
|
||||
cancel-ref (mf/use-ref nil)
|
||||
|
||||
on-cancel-ref
|
||||
(mf/use-fn
|
||||
(fn [node]
|
||||
(mf/set-ref-val! cancel-ref node)))
|
||||
|
||||
;; Name
|
||||
touched-name? (mf/use-state false)
|
||||
|
@ -234,6 +239,17 @@ Token names should only contain letters and digits separated by . characters.")}
|
|||
:tokens-tree selected-set-tokens-tree})]
|
||||
(m/explain schema (finalize-name value)))))
|
||||
|
||||
on-blur-name
|
||||
(mf/use-fn
|
||||
(mf/deps cancel-ref)
|
||||
(fn [e]
|
||||
(let [node (dom/get-related-target e)
|
||||
on-cancel-btn (= node (mf/ref-val cancel-ref))]
|
||||
(when-not on-cancel-btn
|
||||
(let [value (dom/get-target-val e)
|
||||
errors (validate-name value)]
|
||||
(reset! name-errors errors))))))
|
||||
|
||||
on-update-name-debounced
|
||||
(mf/use-fn
|
||||
(uf/debounce (fn [e]
|
||||
|
@ -283,6 +299,11 @@ Token names should only contain letters and digits separated by . characters.")}
|
|||
(set! (.-value (mf/ref-val value-input-ref)) hex-value)
|
||||
(on-update-value-debounced hex-value)))
|
||||
|
||||
on-display-colorpicker (mf/use-fn
|
||||
(mf/deps color-ramp-open?)
|
||||
(fn []
|
||||
(swap! color-ramp-open? not)))
|
||||
|
||||
value-error? (seq (:errors @token-resolve-result))
|
||||
valid-value-field? (and
|
||||
(not value-error?)
|
||||
|
@ -315,6 +336,7 @@ Token names should only contain letters and digits separated by . characters.")}
|
|||
(mf/deps validate-name validate-descripion token resolved-tokens)
|
||||
(fn [e]
|
||||
(dom/prevent-default e)
|
||||
(mf/set-ref-val! cancel-ref nil)
|
||||
;; We have to re-validate the current form values before submitting
|
||||
;; because the validation is asynchronous/debounced
|
||||
;; and the user might have edited a valid form to make it invalid,
|
||||
|
@ -343,20 +365,21 @@ Token names should only contain letters and digits separated by . characters.")}
|
|||
(modal/hide!))))))))
|
||||
on-delete-token
|
||||
(mf/use-fn
|
||||
(mf/deps selected-token-set-id)
|
||||
(mf/deps selected-token-set-path)
|
||||
(fn [e]
|
||||
(dom/prevent-default e)
|
||||
(modal/hide!)
|
||||
(st/emit! (dt/delete-token (ctob/set-path->set-name selected-token-set-id) (:name token)))))
|
||||
(st/emit! (dt/delete-token (ctob/prefixed-set-path-string->set-name-string selected-token-set-path) (:name token)))))
|
||||
|
||||
on-cancel
|
||||
(mf/use-fn
|
||||
(fn [e]
|
||||
(mf/set-ref-val! cancel-ref nil)
|
||||
(dom/prevent-default e)
|
||||
(modal/hide!)))]
|
||||
|
||||
[:form {:class (stl/css :form-wrapper)
|
||||
:on-submit on-submit}
|
||||
[:form {:class (stl/css :form-wrapper)
|
||||
:on-submit on-submit}
|
||||
[:div {:class (stl/css :token-rows)}
|
||||
[:> heading* {:level 2 :typography "headline-medium" :class (stl/css :form-modal-title)}
|
||||
(if (= action "edit")
|
||||
|
@ -372,7 +395,7 @@ Token names should only contain letters and digits separated by . characters.")}
|
|||
:auto-focus true
|
||||
:label (tr "workspace.token.token-name")
|
||||
:default-value @name-ref
|
||||
:on-blur on-update-name
|
||||
:on-blur on-blur-name
|
||||
:on-change on-update-name}])
|
||||
|
||||
(for [error (->> (:errors @name-errors)
|
||||
|
@ -395,7 +418,7 @@ Token names should only contain letters and digits separated by . characters.")}
|
|||
:on-blur on-update-value}
|
||||
(when color?
|
||||
[:> input-token-color-bullet*
|
||||
{:color @color :on-click #(swap! color-ramp-open? not)}])]
|
||||
{:color @color :on-click on-display-colorpicker}])]
|
||||
(when @color-ramp-open?
|
||||
[:& ramp {:color (some-> (or @token-resolve-result (:value token))
|
||||
(tinycolor/valid-color))
|
||||
|
@ -427,6 +450,8 @@ Token names should only contain letters and digits separated by . characters.")}
|
|||
(tr "labels.delete")])
|
||||
[:> button* {:on-click on-cancel
|
||||
:type "button"
|
||||
:on-ref on-cancel-ref
|
||||
:id "token-modal-cancel"
|
||||
:variant "secondary"}
|
||||
(tr "labels.cancel")]
|
||||
[:> button* {:type "submit"
|
||||
|
|
|
@ -42,13 +42,14 @@
|
|||
|
||||
(mf/defc token-update-create-modal
|
||||
{::mf/wrap-props false}
|
||||
[{:keys [x y position token token-type action selected-token-set-id] :as _args}]
|
||||
[{:keys [x y position token token-type action selected-token-set-path] :as _args}]
|
||||
(let [wrapper-style (use-viewport-position-style x y position)
|
||||
close-modal (mf/use-fn
|
||||
(fn []
|
||||
(modal/hide!)))]
|
||||
[:div {:class (stl/css :token-modal-wrapper)
|
||||
:style wrapper-style}
|
||||
:style wrapper-style
|
||||
:data-testid "token-update-create-modal"}
|
||||
[:> icon-button* {:on-click close-modal
|
||||
:class (stl/css :close-btn)
|
||||
:icon i/close
|
||||
|
@ -56,7 +57,7 @@
|
|||
:aria-label (tr "labels.close")}]
|
||||
[:& form {:token token
|
||||
:action action
|
||||
:selected-token-set-id selected-token-set-id
|
||||
:selected-token-set-path selected-token-set-path
|
||||
:token-type token-type}]]))
|
||||
|
||||
;; Modals ----------------------------------------------------------------------
|
||||
|
|
|
@ -173,8 +173,6 @@
|
|||
(set! (.-value (mf/ref-val group-input-ref)) value)
|
||||
(on-update-group value))
|
||||
:on-close on-close-dropdown}])
|
||||
;; TODO: This span should be remove when labeled-input is updated
|
||||
[:span {:class (stl/css :labeled-input-label)} "Theme group"]
|
||||
[:& labeled-input {:label "Group"
|
||||
:input-props {:ref group-input-ref
|
||||
:default-value (:group theme)
|
||||
|
@ -188,8 +186,6 @@
|
|||
(on-toggle-dropdown))}
|
||||
[:> icon* {:icon-id "arrow-down"}]]))}]]
|
||||
[:div {:class (stl/css :group-input-wrapper)}
|
||||
;; TODO: This span should be remove when labeled-input is updated
|
||||
[:span {:class (stl/css :labeled-input-label)} "Theme"]
|
||||
[:& labeled-input {:label "Theme"
|
||||
:input-props {:default-value (:name theme)
|
||||
:on-change (comp on-update-name dom/get-target-val)}}]]]))
|
||||
|
@ -254,36 +250,41 @@
|
|||
[{:keys [state set-state]}]
|
||||
(let [{:keys [theme-path]} @state
|
||||
[_ theme-group theme-name] theme-path
|
||||
ordered-token-sets (mf/deref refs/workspace-ordered-token-sets)
|
||||
token-sets (mf/deref refs/workspace-token-sets-tree)
|
||||
theme (mf/deref (refs/workspace-token-theme theme-group theme-name))
|
||||
theme-state (mf/use-state theme)
|
||||
lib (-> (ctob/make-tokens-lib)
|
||||
(ctob/add-theme @theme-state)
|
||||
(ctob/add-sets ordered-token-sets)
|
||||
(ctob/activate-theme (:group @theme-state) (:name @theme-state)))
|
||||
|
||||
;; Form / Modal handlers
|
||||
on-back #(set-state (constantly {:type :themes-overview}))
|
||||
on-submit #(st/emit! (wdt/update-token-theme [(:group theme) (:name theme)] %))
|
||||
{:keys [dropdown-open? _on-open-dropdown on-close-dropdown on-toggle-dropdown]} (wtco/use-dropdown-open-state)
|
||||
theme-state (mf/use-state theme)
|
||||
disabled? (-> (:name @theme-state)
|
||||
(str/trim)
|
||||
(str/empty?))
|
||||
token-set-active? (mf/use-callback
|
||||
(mf/deps theme-state)
|
||||
(fn [set-name]
|
||||
(get-in @theme-state [:sets set-name])))
|
||||
on-toggle-token-set (mf/use-callback
|
||||
(mf/deps theme-state)
|
||||
(fn [set-name]
|
||||
(swap! theme-state #(ctob/toggle-set % set-name))))
|
||||
on-change-field (fn [field value]
|
||||
(swap! theme-state #(assoc % field value)))
|
||||
on-save-form (mf/use-callback
|
||||
(mf/deps theme-state on-submit)
|
||||
(fn [e]
|
||||
(dom/prevent-default e)
|
||||
(let [theme (-> @theme-state
|
||||
(update :name str/trim)
|
||||
(update :group str/trim)
|
||||
(update :description str/trim))]
|
||||
(when-not (str/empty? (:name theme))
|
||||
(on-submit theme)))
|
||||
(on-back)))
|
||||
|
||||
on-change-field
|
||||
(mf/use-fn
|
||||
(fn [field value]
|
||||
(swap! theme-state #(assoc % field value))))
|
||||
|
||||
on-save-form
|
||||
(mf/use-callback
|
||||
(mf/deps theme-state on-submit)
|
||||
(fn [e]
|
||||
(dom/prevent-default e)
|
||||
(let [theme (-> @theme-state
|
||||
(update :name str/trim)
|
||||
(update :group str/trim)
|
||||
(update :description str/trim))]
|
||||
(when-not (str/empty? (:name theme))
|
||||
(on-submit theme)))
|
||||
(on-back)))
|
||||
|
||||
close-modal
|
||||
(mf/use-fn
|
||||
(fn [e]
|
||||
|
@ -295,13 +296,39 @@
|
|||
(mf/deps theme on-back)
|
||||
(fn []
|
||||
(st/emit! (wdt/delete-token-theme (:group theme) (:name theme)))
|
||||
(on-back)))]
|
||||
(on-back)))
|
||||
|
||||
;; Sets tree handlers
|
||||
token-set-group-active?
|
||||
(mf/use-callback
|
||||
(mf/deps theme-state)
|
||||
(fn [prefixed-path]
|
||||
(ctob/sets-at-path-all-active? lib prefixed-path)))
|
||||
|
||||
token-set-active?
|
||||
(mf/use-callback
|
||||
(mf/deps theme-state)
|
||||
(fn [set-name]
|
||||
(get-in @theme-state [:sets set-name])))
|
||||
|
||||
on-toggle-token-set
|
||||
(mf/use-callback
|
||||
(mf/deps theme-state)
|
||||
(fn [set-name]
|
||||
(swap! theme-state #(ctob/toggle-set % set-name))))
|
||||
|
||||
on-click-token-set
|
||||
(mf/use-callback
|
||||
(mf/deps on-toggle-token-set)
|
||||
(fn [prefixed-set-path-str]
|
||||
(let [set-name (ctob/prefixed-set-path-string->set-name-string prefixed-set-path-str)]
|
||||
(on-toggle-token-set set-name))))]
|
||||
|
||||
[:div {:class (stl/css :themes-modal-wrapper)}
|
||||
[:> heading* {:level 2 :typography "headline-medium" :class (stl/css :themes-modal-title)}
|
||||
(tr "workspace.token.edit-theme-title")]
|
||||
|
||||
[:form {:on-submit on-save-form}
|
||||
[:form {:on-submit on-save-form :class (stl/css :edit-theme-form)}
|
||||
[:div {:class (stl/css :edit-theme-wrapper)}
|
||||
[:button {:on-click on-back
|
||||
:class (stl/css :back-btn)
|
||||
|
@ -322,7 +349,8 @@
|
|||
{:token-sets token-sets
|
||||
:token-set-selected? (constantly false)
|
||||
:token-set-active? token-set-active?
|
||||
:on-select on-toggle-token-set
|
||||
:token-set-group-active? token-set-group-active?
|
||||
:on-select on-click-token-set
|
||||
:on-toggle-token-set on-toggle-token-set
|
||||
:origin "theme-modal"
|
||||
:context sets-context/static-context}]]
|
||||
|
|
|
@ -12,10 +12,12 @@
|
|||
|
||||
.modal-dialog {
|
||||
@extend .modal-container-base;
|
||||
display: grid;
|
||||
grid-template-rows: auto 1fr auto;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
max-width: $s-468;
|
||||
max-width: $s-512;
|
||||
max-height: $s-720;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
|
@ -32,6 +34,12 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: $s-24;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.edit-theme-form {
|
||||
display: flex;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.themes-modal-title {
|
||||
|
@ -101,6 +109,8 @@
|
|||
|
||||
.theme-group-label {
|
||||
color: var(--color-foreground-secondary);
|
||||
margin: 0 0 $s-12 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.group-title {
|
||||
|
@ -114,12 +124,14 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: $s-6;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.theme-group-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: $s-8;
|
||||
overflow-y: auto;
|
||||
gap: $s-32;
|
||||
}
|
||||
|
||||
.theme-row {
|
||||
|
@ -146,7 +158,6 @@
|
|||
}
|
||||
|
||||
.sets-count-button {
|
||||
text-transform: lowercase;
|
||||
padding: $s-6;
|
||||
padding-left: $s-12;
|
||||
}
|
||||
|
@ -166,7 +177,7 @@
|
|||
.sets-list-wrapper {
|
||||
border: 1px solid color-mix(in hsl, var(--color-foreground-secondary) 30%, transparent);
|
||||
border-radius: $s-8;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.sets-count-empty-button {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
(ns app.main.ui.workspace.tokens.sets
|
||||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[app.main.data.tokens :as wdt]
|
||||
[app.main.refs :as refs]
|
||||
|
@ -24,12 +25,24 @@
|
|||
(defn on-toggle-token-set-click [token-set-name]
|
||||
(st/emit! (wdt/toggle-token-set {:token-set-name token-set-name})))
|
||||
|
||||
(defn on-toggle-token-set-group-click [prefixed-path-str]
|
||||
(st/emit! (wdt/toggle-token-set-group {:prefixed-path-str prefixed-path-str})))
|
||||
|
||||
(defn on-select-token-set-click [tree-path]
|
||||
(st/emit! (wdt/set-selected-token-set-id tree-path)))
|
||||
(st/emit! (wdt/set-selected-token-set-path tree-path)))
|
||||
|
||||
(defn on-update-token-set [set-name token-set]
|
||||
(st/emit! (wdt/update-token-set set-name token-set)))
|
||||
|
||||
(defn on-update-token-set-group [from-prefixed-path-str to-path-str]
|
||||
(st/emit!
|
||||
(wdt/rename-token-set-group
|
||||
(ctob/prefixed-set-path-string->set-name-string from-prefixed-path-str)
|
||||
(-> (ctob/prefixed-set-path-string->set-path from-prefixed-path-str)
|
||||
(butlast)
|
||||
(ctob/join-set-path)
|
||||
(ctob/join-set-path-str to-path-str)))))
|
||||
|
||||
(defn on-create-token-set [_ token-set]
|
||||
(st/emit! (wdt/create-token-set token-set)))
|
||||
|
||||
|
@ -59,17 +72,28 @@
|
|||
:auto-focus true
|
||||
:default-value default-value}]))
|
||||
|
||||
(mf/defc sets-tree-set-group
|
||||
[{:keys [label tree-depth tree-path selected? collapsed? on-select editing? on-edit on-edit-reset on-edit-submit]}]
|
||||
(let [editing?' (editing? tree-path)
|
||||
on-click
|
||||
(mf/use-fn
|
||||
(mf/deps editing? tree-path)
|
||||
(fn [event]
|
||||
(dom/stop-propagation event)
|
||||
(when-not (editing? tree-path)
|
||||
(on-select tree-path))))
|
||||
(mf/defc checkbox
|
||||
[{:keys [checked aria-label on-click]}]
|
||||
(let [all? (true? checked)
|
||||
mixed? (= checked "mixed")
|
||||
checked? (or all? mixed?)]
|
||||
[:div {:role "checkbox"
|
||||
:aria-checked (dm/str checked)
|
||||
:tab-index 0
|
||||
:class (stl/css-case :checkbox-style true
|
||||
:checkbox-checked-style checked?)
|
||||
:on-click on-click}
|
||||
(when checked?
|
||||
[:> icon*
|
||||
{:aria-label aria-label
|
||||
:class (stl/css :check-icon)
|
||||
:size "s"
|
||||
:id (if mixed? ic/remove ic/tick)}])]))
|
||||
|
||||
(mf/defc sets-tree-set-group
|
||||
[{:keys [label tree-depth tree-path active? selected? collapsed? editing? on-toggle on-edit on-edit-reset on-edit-submit]}]
|
||||
(let [editing?' (editing? tree-path)
|
||||
active?' (active? tree-path)
|
||||
on-context-menu
|
||||
(mf/use-fn
|
||||
(mf/deps editing? tree-path)
|
||||
|
@ -80,37 +104,60 @@
|
|||
(st/emit!
|
||||
(wdt/show-token-set-context-menu
|
||||
{:position (dom/get-client-position event)
|
||||
:tree-path tree-path})))))]
|
||||
[:div {;; :ref dref
|
||||
:role "button"
|
||||
:prefixed-set-path tree-path})))))
|
||||
on-collapse-click
|
||||
(mf/use-fn
|
||||
(fn [event]
|
||||
(dom/stop-propagation event)
|
||||
(swap! collapsed? not)))
|
||||
on-double-click
|
||||
(mf/use-fn
|
||||
(mf/deps tree-path)
|
||||
#(on-edit tree-path))
|
||||
on-checkbox-click
|
||||
(mf/use-fn
|
||||
(mf/deps on-toggle tree-path)
|
||||
#(on-toggle tree-path))
|
||||
on-edit-submit'
|
||||
(mf/use-fn
|
||||
(mf/deps tree-path on-edit-submit)
|
||||
#(on-edit-submit tree-path %))]
|
||||
[:div {:role "button"
|
||||
:data-testid "tokens-set-group-item"
|
||||
:style {"--tree-depth" tree-depth}
|
||||
:class (stl/css-case :set-item-container true
|
||||
:set-item-group true
|
||||
:selected-set selected?)
|
||||
:on-click on-click
|
||||
:on-context-menu on-context-menu
|
||||
:on-double-click #(on-edit tree-path)}
|
||||
:on-context-menu on-context-menu}
|
||||
[:> icon-button*
|
||||
{:on-click (fn [event]
|
||||
(.stopPropagation event)
|
||||
(swap! collapsed? not))
|
||||
{:class (stl/css :set-item-group-collapse-button)
|
||||
:on-click on-collapse-click
|
||||
:aria-label (tr "labels.collapse")
|
||||
:icon (if @collapsed? "arrow-right" "arrow-down")
|
||||
:variant "action"}]
|
||||
[:> icon* {:icon-id "group"
|
||||
:class (stl/css :icon)}]
|
||||
(if editing?'
|
||||
[:& editing-label
|
||||
{:default-value label
|
||||
:on-cancel on-edit-reset
|
||||
:on-create on-edit-reset
|
||||
:on-submit #(on-edit-submit)}]
|
||||
[:div {:class (stl/css :set-name)} label])]))
|
||||
:on-submit on-edit-submit'}]
|
||||
[:*
|
||||
[:div {:class (stl/css :set-name)
|
||||
:on-double-click on-double-click}
|
||||
label]
|
||||
[:& checkbox
|
||||
{:on-click on-checkbox-click
|
||||
:checked (case active?'
|
||||
:all true
|
||||
:partial "mixed"
|
||||
:none false)
|
||||
:arial-label (tr "workspace.token.select-set")}]])]))
|
||||
|
||||
(mf/defc sets-tree-set
|
||||
[{:keys [set label tree-depth tree-path selected? on-select active? on-toggle editing? on-edit on-edit-reset on-edit-submit]}]
|
||||
(let [set-name (.-name set)
|
||||
editing?' (editing? tree-path)
|
||||
active?' (active? set-name)
|
||||
active?' (some? (active? set-name))
|
||||
on-click
|
||||
(mf/use-fn
|
||||
(mf/deps editing?' tree-path)
|
||||
|
@ -118,7 +165,6 @@
|
|||
(dom/stop-propagation event)
|
||||
(when-not editing?'
|
||||
(on-select tree-path))))
|
||||
|
||||
on-context-menu
|
||||
(mf/use-fn
|
||||
(mf/deps editing?' tree-path)
|
||||
|
@ -129,44 +175,66 @@
|
|||
(st/emit!
|
||||
(wdt/show-token-set-context-menu
|
||||
{:position (dom/get-client-position event)
|
||||
:tree-path tree-path})))))]
|
||||
[:div {;; :ref dref
|
||||
:role "button"
|
||||
:prefixed-set-path tree-path})))))
|
||||
on-double-click (mf/use-fn
|
||||
(mf/deps tree-path)
|
||||
#(on-edit tree-path))
|
||||
on-checkbox-click (mf/use-fn
|
||||
(mf/deps set-name)
|
||||
(fn [event]
|
||||
(dom/stop-propagation event)
|
||||
(on-toggle set-name)))
|
||||
on-edit-submit' (mf/use-fn
|
||||
(mf/deps set on-edit-submit)
|
||||
#(on-edit-submit set-name (ctob/update-name set %)))]
|
||||
[:div {:role "button"
|
||||
:data-testid "tokens-set-item"
|
||||
:style {"--tree-depth" tree-depth}
|
||||
:class (stl/css-case :set-item-container true
|
||||
:selected-set selected?)
|
||||
:on-click on-click
|
||||
:on-double-click #(on-edit tree-path)
|
||||
:on-context-menu on-context-menu}
|
||||
[:> icon* {:icon-id "document"
|
||||
:class (stl/css-case :icon true
|
||||
:root-icon (not tree-depth))}]
|
||||
:on-context-menu on-context-menu
|
||||
:aria-checked active?'}
|
||||
[:> icon*
|
||||
{:icon-id "document"
|
||||
:class (stl/css-case :icon true
|
||||
:root-icon (not tree-depth))}]
|
||||
(if editing?'
|
||||
[:& editing-label
|
||||
{:default-value label
|
||||
:on-cancel on-edit-reset
|
||||
:on-create on-edit-reset
|
||||
:on-submit #(on-edit-submit set-name (ctob/update-name set %))}]
|
||||
:on-submit on-edit-submit'}]
|
||||
[:*
|
||||
[:div {:class (stl/css :set-name)} label]
|
||||
[:button {:on-click (fn [event]
|
||||
(dom/stop-propagation event)
|
||||
(on-toggle set-name))
|
||||
:class (stl/css-case :checkbox-style true
|
||||
:checkbox-checked-style active?')}
|
||||
(when active?'
|
||||
[:> icon* {:aria-label (tr "workspace.token.select-set")
|
||||
:class (stl/css :check-icon)
|
||||
:size "s"
|
||||
:icon-id ic/tick}])]])]))
|
||||
[:div {:class (stl/css :set-name)
|
||||
:on-double-click on-double-click}
|
||||
label]
|
||||
[:& checkbox
|
||||
{:on-click on-checkbox-click
|
||||
:arial-label (tr "workspace.token.select-set")
|
||||
:checked active?'}]])]))
|
||||
|
||||
(mf/defc sets-tree
|
||||
[{:keys [set-path set-node tree-depth tree-path on-select selected? on-toggle active? editing? on-edit on-edit-reset on-edit-submit]
|
||||
[{:keys [active?
|
||||
group-active?
|
||||
editing?
|
||||
on-edit
|
||||
on-edit-reset
|
||||
on-edit-submit-set
|
||||
on-edit-submit-group
|
||||
on-select
|
||||
on-toggle-set
|
||||
on-toggle-set-group
|
||||
selected?
|
||||
set-node
|
||||
set-path
|
||||
tree-depth
|
||||
tree-path]
|
||||
:or {tree-depth 0}
|
||||
:as props}]
|
||||
(let [[set-prefix set-path'] (some-> set-path (ctob/split-set-prefix))
|
||||
(let [[set-path-prefix set-fname] (some-> set-path (ctob/split-set-str-path-prefix))
|
||||
set? (instance? ctob/TokenSet set-node)
|
||||
set-group? (= ctob/set-group-prefix set-prefix)
|
||||
set-group? (= ctob/set-group-prefix set-path-prefix)
|
||||
root? (= tree-depth 0)
|
||||
collapsed? (mf/use-state false)
|
||||
children? (and
|
||||
|
@ -181,29 +249,31 @@
|
|||
:active? active?
|
||||
:selected? (selected? tree-path)
|
||||
:on-select on-select
|
||||
:label set-path'
|
||||
:label set-fname
|
||||
:tree-path (or tree-path set-path)
|
||||
:tree-depth tree-depth
|
||||
:editing? editing?
|
||||
:on-toggle on-toggle
|
||||
:on-toggle on-toggle-set
|
||||
:on-edit on-edit
|
||||
:on-edit-reset on-edit-reset
|
||||
:on-edit-submit on-edit-submit}]
|
||||
:on-edit-submit on-edit-submit-set}]
|
||||
set-group?
|
||||
[:& sets-tree-set-group
|
||||
{:selected? (selected? tree-path)
|
||||
:active? group-active?
|
||||
:on-select on-select
|
||||
:label set-path'
|
||||
:label set-fname
|
||||
:collapsed? collapsed?
|
||||
:tree-path (or tree-path set-path)
|
||||
:tree-depth tree-depth
|
||||
:editing? editing?
|
||||
:on-toggle on-toggle-set-group
|
||||
:on-edit on-edit
|
||||
:on-edit-reset on-edit-reset
|
||||
:on-edit-submit on-edit-submit}])
|
||||
:on-edit-submit on-edit-submit-group}])
|
||||
(when children?
|
||||
(for [[set-path set-node] set-node
|
||||
:let [tree-path' (str (when tree-path (str tree-path "/")) set-path)]]
|
||||
:let [tree-path' (ctob/join-set-path-str tree-path set-path)]]
|
||||
[:& sets-tree
|
||||
{:key tree-path'
|
||||
:set-path set-path
|
||||
|
@ -212,29 +282,34 @@
|
|||
:tree-path tree-path'
|
||||
:on-select on-select
|
||||
:selected? selected?
|
||||
:on-toggle on-toggle
|
||||
:on-toggle-set on-toggle-set
|
||||
:on-toggle-set-group on-toggle-set-group
|
||||
:active? active?
|
||||
:group-active? group-active?
|
||||
:editing? editing?
|
||||
:on-edit on-edit
|
||||
:on-edit-reset on-edit-reset
|
||||
:on-edit-submit on-edit-submit}]))]))
|
||||
:on-edit-submit-set on-edit-submit-set
|
||||
:on-edit-submit-group on-update-token-set-group}]))]))
|
||||
|
||||
(mf/defc controlled-sets-list
|
||||
[{:keys [token-sets
|
||||
on-update-token-set
|
||||
on-update-token-set-group
|
||||
token-set-selected?
|
||||
token-set-active?
|
||||
token-set-group-active?
|
||||
on-create-token-set
|
||||
on-toggle-token-set
|
||||
on-toggle-token-set-group
|
||||
origin
|
||||
on-select
|
||||
context]
|
||||
:as _props}]
|
||||
(let [{:keys [editing? new? on-edit on-reset] :as ctx} (or context (sets-context/use-context))]
|
||||
[:ul {:class (stl/css :sets-list)}
|
||||
(if (and
|
||||
(= origin "theme-modal")
|
||||
(empty? token-sets))
|
||||
[:fieldset {:class (stl/css :sets-list)}
|
||||
(if (and (= origin "theme-modal")
|
||||
(empty? token-sets))
|
||||
[:> text* {:as "span" :typography "body-small" :class (stl/css :empty-state-message-sets)}
|
||||
(tr "workspace.token.no-sets-create")]
|
||||
(if (and (= origin "theme-modal")
|
||||
|
@ -247,11 +322,14 @@
|
|||
:selected? token-set-selected?
|
||||
:on-select on-select
|
||||
:active? token-set-active?
|
||||
:on-toggle on-toggle-token-set
|
||||
:group-active? token-set-group-active?
|
||||
:on-toggle-set on-toggle-token-set
|
||||
:on-toggle-set-group on-toggle-token-set-group
|
||||
:editing? editing?
|
||||
:on-edit on-edit
|
||||
:on-edit-reset on-reset
|
||||
:on-edit-submit on-update-token-set}]
|
||||
:on-edit-submit-set on-update-token-set
|
||||
:on-edit-submit-group on-update-token-set-group}]
|
||||
(when new?
|
||||
[:& sets-tree-set
|
||||
{:set (ctob/make-token-set :name "")
|
||||
|
@ -267,22 +345,28 @@
|
|||
(mf/defc sets-list
|
||||
[{:keys []}]
|
||||
(let [token-sets (mf/deref refs/workspace-token-sets-tree)
|
||||
selected-token-set-id (mf/deref refs/workspace-selected-token-set-id)
|
||||
selected-token-set-path (mf/deref refs/workspace-selected-token-set-path)
|
||||
token-set-selected? (mf/use-fn
|
||||
(mf/deps token-sets selected-token-set-id)
|
||||
(mf/deps token-sets selected-token-set-path)
|
||||
(fn [tree-path]
|
||||
(= tree-path selected-token-set-id)))
|
||||
(= tree-path selected-token-set-path)))
|
||||
active-token-set-names (mf/deref refs/workspace-active-set-names)
|
||||
token-set-active? (mf/use-fn
|
||||
(mf/deps active-token-set-names)
|
||||
(fn [set-name]
|
||||
(get active-token-set-names set-name)))]
|
||||
(get active-token-set-names set-name)))
|
||||
token-set-group-active? (mf/use-fn
|
||||
(fn [prefixed-path]
|
||||
@(refs/token-sets-at-path-all-active prefixed-path)))]
|
||||
[:& controlled-sets-list
|
||||
{:token-sets token-sets
|
||||
:token-set-selected? token-set-selected?
|
||||
:token-set-active? token-set-active?
|
||||
:token-set-group-active? token-set-group-active?
|
||||
:on-select on-select-token-set-click
|
||||
:origin "set-panel"
|
||||
:on-toggle-token-set on-toggle-token-set-click
|
||||
:on-toggle-token-set-group on-toggle-token-set-group-click
|
||||
:on-update-token-set on-update-token-set
|
||||
:on-update-token-set-group on-update-token-set-group
|
||||
:on-create-token-set on-create-token-set}]))
|
||||
|
|
|
@ -34,6 +34,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
.set-item-group {
|
||||
cursor: unset;
|
||||
}
|
||||
|
||||
.set-item-group-collapse-button {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.set-name {
|
||||
@include textEllipsis;
|
||||
flex-grow: 1;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
(ns app.main.ui.workspace.tokens.sets-context-menu
|
||||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[app.main.data.tokens :as wdt]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.store :as st]
|
||||
|
@ -35,11 +36,13 @@
|
|||
[:span {:class (stl/css :title)} title]])
|
||||
|
||||
(mf/defc menu
|
||||
[{:keys [tree-path]}]
|
||||
[{:keys [prefixed-set-path]}]
|
||||
(let [{:keys [on-edit]} (sets-context/use-context)
|
||||
edit-name (mf/use-fn #(on-edit tree-path))
|
||||
delete-set (mf/use-fn #(st/emit! (wdt/delete-token-set-path tree-path)))]
|
||||
edit-name (mf/use-fn #(on-edit prefixed-set-path))
|
||||
delete-set (mf/use-fn #(st/emit! (wdt/delete-token-set-path prefixed-set-path)))]
|
||||
[:ul {:class (stl/css :context-list)}
|
||||
(when (ctob/prefixed-set-path-final-group? prefixed-set-path)
|
||||
[:& menu-entry {:title "Add set to this group" :on-click js/console.log}])
|
||||
[:& menu-entry {:title (tr "labels.rename") :on-click edit-name}]
|
||||
[:& menu-entry {:title (tr "labels.delete") :on-click delete-set}]]))
|
||||
|
||||
|
@ -61,4 +64,4 @@
|
|||
:ref dropdown-ref
|
||||
:style {:top top :left left}
|
||||
:on-context-menu prevent-default}
|
||||
[:& menu {:tree-path (:tree-path mdata)}]]]))
|
||||
[:& menu {:prefixed-set-path (:prefixed-set-path mdata)}]]]))
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
[app.main.data.tokens :as dt]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.store :as st]
|
||||
[app.main.ui.components.color-bullet :refer [color-bullet]]
|
||||
[app.main.ui.components.dropdown-menu :refer [dropdown-menu dropdown-menu-item*]]
|
||||
[app.main.ui.components.title-bar :refer [title-bar]]
|
||||
[app.main.ui.ds.buttons.button :refer [button*]]
|
||||
|
@ -22,7 +21,6 @@
|
|||
[app.main.ui.ds.foundations.typography.text :refer [text*]]
|
||||
[app.main.ui.hooks :as h]
|
||||
[app.main.ui.hooks.resize :refer [use-resize-hook]]
|
||||
[app.main.ui.icons :as i]
|
||||
[app.main.ui.workspace.sidebar.assets.common :as cmm]
|
||||
[app.main.ui.workspace.tokens.changes :as wtch]
|
||||
[app.main.ui.workspace.tokens.context-menu :refer [token-context-menu]]
|
||||
|
@ -33,12 +31,12 @@
|
|||
[app.main.ui.workspace.tokens.style-dictionary :as sd]
|
||||
[app.main.ui.workspace.tokens.theme-select :refer [theme-select]]
|
||||
[app.main.ui.workspace.tokens.token :as wtt]
|
||||
[app.main.ui.workspace.tokens.token-pill :refer [token-pill]]
|
||||
[app.main.ui.workspace.tokens.token-types :as wtty]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.i18n :refer [tr]]
|
||||
[app.util.webapi :as wapi]
|
||||
[beicon.v2.core :as rx]
|
||||
[cuerdas.core :as str]
|
||||
[okulary.core :as l]
|
||||
[rumext.v2 :as mf]
|
||||
[shadow.resource]))
|
||||
|
@ -46,54 +44,31 @@
|
|||
(def lens:token-type-open-status
|
||||
(l/derived (l/in [:workspace-tokens :open-status]) st/state))
|
||||
|
||||
(def ^:private download-icon
|
||||
(i/icon-xref :download (stl/css :download-icon)))
|
||||
|
||||
;; Components ------------------------------------------------------------------
|
||||
|
||||
(mf/defc token-pill
|
||||
{::mf/wrap-props false}
|
||||
[{:keys [on-click token theme-token highlighted? on-context-menu]}]
|
||||
(let [{:keys [name value resolved-value errors]} token
|
||||
errors? (and (seq errors) (seq (:errors theme-token)))]
|
||||
[:button
|
||||
{:class (stl/css-case :token-pill true
|
||||
:token-pill-highlighted highlighted?
|
||||
:token-pill-invalid errors?)
|
||||
:title (cond
|
||||
errors? (sd/humanize-errors token)
|
||||
:else (->> [(str "Token: " name)
|
||||
(str (tr "workspace.token.original-value") value)
|
||||
(str (tr "workspace.token.resolved-value") resolved-value)]
|
||||
(str/join "\n")))
|
||||
:on-click on-click
|
||||
:on-context-menu on-context-menu
|
||||
:disabled errors?}
|
||||
(when-let [color (if (seq (ctob/find-token-value-references (:value token)))
|
||||
(wtt/resolved-value-hex theme-token)
|
||||
(wtt/resolved-value-hex token))]
|
||||
[:& color-bullet {:color color
|
||||
:mini true}])
|
||||
name]))
|
||||
|
||||
(mf/defc token-section-icon
|
||||
{::mf/wrap-props false}
|
||||
[{:keys [type]}]
|
||||
(case type
|
||||
:border-radius i/corner-radius
|
||||
:numeric [:span {:class (stl/css :section-text-icon)} "123"]
|
||||
:color i/drop-icon
|
||||
:boolean i/boolean-difference
|
||||
:opacity [:span {:class (stl/css :section-text-icon)} "%"]
|
||||
:rotation i/rotation
|
||||
:spacing i/padding-extended
|
||||
:string i/text-mixed
|
||||
:stroke-width i/stroke-size
|
||||
:typography i/text
|
||||
;; TODO: Add diagonal icon here when it's available
|
||||
:dimensions [:div {:style {:rotate "45deg"}} i/constraint-horizontal]
|
||||
:sizing [:div {:style {:rotate "45deg"}} i/constraint-horizontal]
|
||||
i/add))
|
||||
:border-radius "corner-radius"
|
||||
:color "drop"
|
||||
:boolean "boolean-difference"
|
||||
:opacity "percentage"
|
||||
:rotation "rotation"
|
||||
:spacing "padding-extended"
|
||||
:string "text-mixed"
|
||||
:stroke-width "stroke-size"
|
||||
:typography "text"
|
||||
:dimensions "expand"
|
||||
:sizing "expand"
|
||||
"add"))
|
||||
|
||||
(defn attribute-actions [token selected-shapes attributes]
|
||||
(let [ids-by-attributes (wtt/shapes-ids-by-applied-attributes token selected-shapes attributes)
|
||||
shape-ids (into #{} (map :id selected-shapes))]
|
||||
{:all-selected? (wtt/shapes-applied-all? ids-by-attributes shape-ids attributes)
|
||||
:shape-ids shape-ids
|
||||
:selected-pred #(seq (% ids-by-attributes))}))
|
||||
|
||||
(mf/defc token-component
|
||||
[{:keys [type tokens selected-shapes token-type-props active-theme-tokens]}]
|
||||
|
@ -105,9 +80,10 @@
|
|||
(fn [event token]
|
||||
(dom/prevent-default event)
|
||||
(dom/stop-propagation event)
|
||||
(st/emit! (dt/show-token-context-menu {:type :token
|
||||
:position (dom/get-client-position event)
|
||||
:token-name (:name token)}))))
|
||||
(st/emit! (dt/show-token-context-menu
|
||||
{:type :token
|
||||
:position (dom/get-client-position event)
|
||||
:token-name (:name token)}))))
|
||||
|
||||
on-toggle-open-click (mf/use-fn
|
||||
(mf/deps open? tokens)
|
||||
|
@ -137,28 +113,37 @@
|
|||
:token-type-props token-type-props})))))
|
||||
tokens-count (count tokens)]
|
||||
[:div {:on-click on-toggle-open-click}
|
||||
[:& cmm/asset-section {:icon (mf/fnc icon-wrapper []
|
||||
[:div {:class (stl/css :section-icon)}
|
||||
[:& token-section-icon {:type type}]])
|
||||
[:& cmm/asset-section {:icon (token-section-icon type)
|
||||
:title title
|
||||
:assets-count tokens-count
|
||||
:open? open?}
|
||||
[:& cmm/asset-section-block {:role :title-button}
|
||||
[:button {:class (stl/css :action-button)
|
||||
:on-click on-popover-open-click}
|
||||
i/add]]
|
||||
[:> icon-button* {:on-click on-popover-open-click
|
||||
:variant "ghost"
|
||||
:icon "add"
|
||||
:aria-label (str "Add token: " title)}]]
|
||||
(when open?
|
||||
[:& cmm/asset-section-block {:role :content}
|
||||
[:div {:class (stl/css :token-pills-wrapper)}
|
||||
(for [token (sort-by :name tokens)]
|
||||
(let [theme-token (get active-theme-tokens (wtt/token-identifier token))]
|
||||
(let [theme-token (get active-theme-tokens (wtt/token-identifier token))
|
||||
multiple-selection (< 1 (count selected-shapes))
|
||||
full-applied (:all-selected? (attribute-actions token selected-shapes (or all-attributes attributes)))
|
||||
applied (wtt/shapes-token-applied? token selected-shapes (or all-attributes attributes))
|
||||
on-token-click (fn [e]
|
||||
(on-token-pill-click e token))
|
||||
on-context-menu (fn [e] (on-context-menu e token))]
|
||||
[:& token-pill
|
||||
{:key (:name token)
|
||||
:token token
|
||||
:theme-token theme-token
|
||||
:highlighted? (wtt/shapes-token-applied? token selected-shapes (or all-attributes attributes))
|
||||
:on-click #(on-token-pill-click % token)
|
||||
:on-context-menu #(on-context-menu % token)}]))]])]]))
|
||||
:half-applied (or (and applied multiple-selection)
|
||||
(and applied (not full-applied)))
|
||||
:full-applied (if multiple-selection
|
||||
false
|
||||
applied)
|
||||
:on-click on-token-click
|
||||
:on-context-menu on-context-menu}]))]])]]))
|
||||
|
||||
(defn sorted-token-groups
|
||||
"Separate token-types into groups of `:empty` or `:filled` depending if tokens exist for that type.
|
||||
|
@ -235,16 +220,13 @@
|
|||
on-open (mf/use-fn #(reset! open? true))]
|
||||
[:& sets-context/provider {}
|
||||
[:& sets-context-menu]
|
||||
[:article {:class (stl/css :sets-section-wrapper)
|
||||
[:article {:data-testid "token-themes-sets-sidebar"
|
||||
:class (stl/css :sets-section-wrapper)
|
||||
:style {"--resize-height" (str resize-height "px")}}
|
||||
[:div {:class (stl/css :sets-sidebar)}
|
||||
[:& themes-header]
|
||||
[:div {:class (stl/css :sidebar-header)}
|
||||
[:& title-bar {:collapsable true
|
||||
:collapsed (not @open?)
|
||||
:all-clickable true
|
||||
:title (tr "labels.sets")
|
||||
:on-collapsed #(swap! open? not)}
|
||||
[:& title-bar {:title (tr "labels.sets")}
|
||||
[:& add-set-button {:on-open on-open
|
||||
:style "header"}]]]
|
||||
[:& theme-sets-list {:on-open on-open}]]]]))
|
||||
|
@ -259,30 +241,24 @@
|
|||
active-theme-tokens (sd/use-active-theme-sets-tokens)
|
||||
|
||||
tokens (sd/use-resolved-workspace-tokens)
|
||||
token-groups (mf/with-memo [tokens]
|
||||
(sorted-token-groups tokens))]
|
||||
|
||||
selected-token-set-tokens (mf/deref refs/workspace-selected-token-set-tokens)
|
||||
|
||||
token-groups (mf/with-memo [tokens selected-token-set-tokens]
|
||||
(-> (select-keys tokens (keys selected-token-set-tokens))
|
||||
(sorted-token-groups)))]
|
||||
[:*
|
||||
[:& token-context-menu]
|
||||
[:& title-bar {:all-clickable true
|
||||
:title "TOKENS"}]
|
||||
[:div.assets-bar
|
||||
(for [{:keys [token-key token-type-props tokens]} (concat (:filled token-groups)
|
||||
(:empty token-groups))]
|
||||
[:& token-component {:key token-key
|
||||
:type token-key
|
||||
:selected-shapes selected-shapes
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:tokens tokens
|
||||
:token-type-props token-type-props}])]]))
|
||||
|
||||
(mf/defc json-import-button []
|
||||
(let []
|
||||
[:div
|
||||
|
||||
[:button {:class (stl/css :download-json-button)
|
||||
:on-click #(.click (js/document.getElementById "file-input"))}
|
||||
download-icon
|
||||
"Import JSON"]]))
|
||||
(for [{:keys [token-key token-type-props tokens]} (concat (:filled token-groups)
|
||||
(:empty token-groups))]
|
||||
[:& token-component {:key token-key
|
||||
:type token-key
|
||||
:selected-shapes selected-shapes
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:tokens tokens
|
||||
:token-type-props token-type-props}])]))
|
||||
|
||||
(mf/defc import-export-button
|
||||
{::mf/wrap-props false}
|
||||
|
@ -303,6 +279,10 @@
|
|||
(reset! show-menu* false)))
|
||||
|
||||
input-ref (mf/use-ref)
|
||||
on-option-click
|
||||
(mf/use-fn
|
||||
#(.click (mf/ref-val input-ref)))
|
||||
|
||||
on-import
|
||||
(fn [event]
|
||||
(let [file (-> event .-target .-files (aget 0))]
|
||||
|
@ -318,12 +298,13 @@
|
|||
:timeout 9000})))))
|
||||
(set! (.-value (mf/ref-val input-ref)) "")))
|
||||
on-export (fn []
|
||||
(let [tokens-blob (some-> (deref refs/tokens-lib)
|
||||
(let [tokens-json (some-> (deref refs/tokens-lib)
|
||||
(ctob/encode-dtcg)
|
||||
(clj->js)
|
||||
(js/JSON.stringify nil 2)
|
||||
(wapi/create-blob "application/json"))]
|
||||
(dom/trigger-download "tokens.json" tokens-blob)))]
|
||||
(js/JSON.stringify nil 2))]
|
||||
(->> (wapi/create-blob (or tokens-json "{}") "application/json")
|
||||
(dom/trigger-download "tokens.json"))))]
|
||||
|
||||
[:div {:class (stl/css :import-export-button-wrapper)}
|
||||
[:input {:type "file"
|
||||
:ref input-ref
|
||||
|
@ -331,20 +312,20 @@
|
|||
:id "file-input"
|
||||
:accept ".json"
|
||||
:on-change on-import}]
|
||||
[:button {:class (stl/css :import-export-button)
|
||||
:on-click open-menu}
|
||||
download-icon
|
||||
"Tokens"]
|
||||
[:> button* {:on-click open-menu
|
||||
:icon "import-export"
|
||||
:variant "secondary"}
|
||||
(tr "workspace.token.tools")]
|
||||
[:& dropdown-menu {:show show-menu?
|
||||
:on-close close-menu
|
||||
:list-class (stl/css :import-export-menu)}
|
||||
[:> dropdown-menu-item* {:class (stl/css :import-export-menu-item)
|
||||
:on-click #(.click (mf/ref-val input-ref))}
|
||||
"Import"]
|
||||
:on-click on-option-click}
|
||||
(tr "labels.import")]
|
||||
|
||||
[:> dropdown-menu-item* {:class (stl/css :import-export-menu-item)
|
||||
:on-click on-export}
|
||||
"Export"]]]))
|
||||
(tr "labels.export")]]]))
|
||||
|
||||
(mf/defc tokens-sidebar-tab
|
||||
{::mf/wrap [mf/memo]
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
}
|
||||
|
||||
.themes-header {
|
||||
@include use-typography("headline-small");
|
||||
display: block;
|
||||
@include headlineSmallTypography;
|
||||
margin-bottom: $s-8;
|
||||
padding-left: $s-8;
|
||||
color: var(--title-foreground-color);
|
||||
|
@ -80,25 +80,6 @@
|
|||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.token-pill {
|
||||
@extend .button-secondary;
|
||||
gap: $s-8;
|
||||
padding: $s-4 $s-8;
|
||||
border-radius: $br-6;
|
||||
font-size: $fs-14;
|
||||
|
||||
&.token-pill-highlighted {
|
||||
color: var(--button-primary-foreground-color-rest);
|
||||
background: var(--button-primary-background-color-rest);
|
||||
}
|
||||
|
||||
&.token-pill-invalid {
|
||||
background-color: var(--button-secondary-background-color-rest);
|
||||
color: var(--status-color-error-500);
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.section-text-icon {
|
||||
font-size: $fs-12;
|
||||
width: 16px;
|
||||
|
@ -119,8 +100,7 @@
|
|||
flex-direction: row;
|
||||
align-items: end;
|
||||
justify-content: end;
|
||||
padding: $s-16;
|
||||
margin-top: $s-8;
|
||||
padding: $s-8;
|
||||
background-color: var(--color-background-primary);
|
||||
box-shadow: var(--el-shadow-dark);
|
||||
}
|
||||
|
@ -129,16 +109,13 @@
|
|||
@extend .button-secondary;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
padding: $s-6 $s-8;
|
||||
text-transform: uppercase;
|
||||
gap: $s-8;
|
||||
background-color: var(--color-background-primary);
|
||||
|
||||
.download-icon {
|
||||
@extend .button-icon;
|
||||
stroke: var(--icon-foreground);
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
box-shadow: var(--el-shadow-dark);
|
||||
}
|
||||
|
||||
.import-export-menu {
|
||||
|
@ -153,23 +130,8 @@
|
|||
.import-export-menu-item {
|
||||
@extend .menu-item-base;
|
||||
cursor: pointer;
|
||||
.open-arrow {
|
||||
@include flexCenter;
|
||||
svg {
|
||||
@extend .button-icon;
|
||||
stroke: var(--icon-foreground);
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
color: var(--menu-foreground-color-hover);
|
||||
.open-arrow {
|
||||
svg {
|
||||
stroke: var(--menu-foreground-color-hover);
|
||||
}
|
||||
}
|
||||
.shortcut-key {
|
||||
color: var(--menu-shortcut-foreground-color-hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -252,8 +252,10 @@
|
|||
@tokens-state))
|
||||
|
||||
(defn use-resolved-workspace-tokens []
|
||||
(-> (mf/deref refs/workspace-selected-token-set-tokens)
|
||||
(use-resolved-tokens)))
|
||||
(let [active-theme-tokens (mf/deref refs/workspace-active-theme-sets-tokens)
|
||||
selected-token-set-tokens (mf/deref refs/workspace-selected-token-set-tokens)
|
||||
prefer-selected-token-set-tokens (merge active-theme-tokens selected-token-set-tokens)]
|
||||
(use-resolved-tokens prefer-selected-token-set-tokens)))
|
||||
|
||||
(defn use-active-theme-sets-tokens []
|
||||
(-> (mf/deref refs/workspace-active-theme-sets-tokens)
|
||||
|
|
|
@ -47,12 +47,12 @@
|
|||
(= (token-identifier token) id)))
|
||||
|
||||
(defn token-applied?
|
||||
"Test if `token` is applied to a `shape` with at least one of the one of the given `token-attributes`."
|
||||
"Test if `token` is applied to a `shape` with at least one of the given `token-attributes`."
|
||||
[token shape token-attributes]
|
||||
(some #(token-attribute-applied? token shape %) token-attributes))
|
||||
|
||||
(defn shapes-token-applied?
|
||||
"Test if `token` is applied to to any of `shapes` with at least one of the one of the given `token-attributes`."
|
||||
"Test if `token` is applied to to any of `shapes` with at least one of the given `token-attributes`."
|
||||
[token shapes token-attributes]
|
||||
(some #(token-applied? token % token-attributes) shapes))
|
||||
|
||||
|
|
59
frontend/src/app/main/ui/workspace/tokens/token_pill.cljs
Normal file
59
frontend/src/app/main/ui/workspace/tokens/token_pill.cljs
Normal file
|
@ -0,0 +1,59 @@
|
|||
(ns app.main.ui.workspace.tokens.token-pill
|
||||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[app.main.ui.components.color-bullet :refer [color-bullet]]
|
||||
[app.main.ui.ds.foundations.assets.icon :refer [icon*]]
|
||||
[app.main.ui.ds.foundations.utilities.token.token-status :refer [token-status-icon*]]
|
||||
[app.main.ui.workspace.tokens.style-dictionary :as sd]
|
||||
[app.main.ui.workspace.tokens.token :as wtt]
|
||||
[app.util.i18n :refer [tr]]
|
||||
[cuerdas.core :as str]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(mf/defc token-pill
|
||||
{::mf/wrap-props false}
|
||||
[{:keys [on-click token theme-token full-applied on-context-menu half-applied]}]
|
||||
(let [{:keys [name value resolved-value errors]} token
|
||||
errors? (or (nil? theme-token) (and (seq errors) (seq (:errors theme-token))))
|
||||
|
||||
color (when (seq (ctob/find-token-value-references value))
|
||||
(wtt/resolved-value-hex theme-token))
|
||||
|
||||
color (or color (wtt/resolved-value-hex token))
|
||||
|
||||
token-status-id (cond
|
||||
half-applied
|
||||
"token-status-partial"
|
||||
full-applied
|
||||
"token-status-full"
|
||||
:else
|
||||
"token-status-non-applied")]
|
||||
[:button {:class (stl/css-case :token-pill true
|
||||
:token-pill-applied (or half-applied full-applied)
|
||||
:token-pill-invalid errors?
|
||||
:token-pill-invalid-applied (and full-applied errors?))
|
||||
:type "button"
|
||||
:title (cond
|
||||
errors? (sd/humanize-errors token)
|
||||
:else (->> [(str "Token: " name)
|
||||
(tr "workspace.token.original-value" value)
|
||||
(tr "workspace.token.resolved-value" resolved-value)]
|
||||
(str/join "\n")))
|
||||
:on-click on-click
|
||||
:on-context-menu on-context-menu
|
||||
:disabled errors?}
|
||||
(cond
|
||||
color
|
||||
[:& color-bullet {:color color
|
||||
:mini true}]
|
||||
errors?
|
||||
[:> icon*
|
||||
{:id "broken-link"
|
||||
:class (stl/css :token-pill-icon)}]
|
||||
|
||||
:else
|
||||
[:> token-status-icon*
|
||||
{:id token-status-id
|
||||
:class (stl/css :token-pill-icon)}])
|
||||
name]))
|
106
frontend/src/app/main/ui/workspace/tokens/token_pill.scss
Normal file
106
frontend/src/app/main/ui/workspace/tokens/token_pill.scss
Normal file
|
@ -0,0 +1,106 @@
|
|||
// 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/typography.scss" as *;
|
||||
@import "refactor/common-refactor.scss";
|
||||
@import "./common.scss";
|
||||
|
||||
.token-pill {
|
||||
--token-pill-background: var(--color-background-tertiary);
|
||||
--token-pill-foreground: var(--color-foreground-secondary);
|
||||
--token-pill-border: var(--color-background-tertiary);
|
||||
--token-pill-outline: none;
|
||||
--token-pill-accent: var(--color-background-quaternary);
|
||||
|
||||
@include use-typography("code-font");
|
||||
border: none;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
align-items: center;
|
||||
gap: $s-6;
|
||||
border: $s-1 solid var(--token-pill-border);
|
||||
outline: $s-2 solid var(--token-pill-outline);
|
||||
height: $s-24;
|
||||
border-radius: $br-8;
|
||||
padding: $s-2 $s-8 $s-2 $s-4;
|
||||
color: var(--token-pill-foreground);
|
||||
background: var(--token-pill-background);
|
||||
|
||||
&:hover {
|
||||
--token-pill-background: var(--color-token-background);
|
||||
--token-pill-foreground: var(--color-foreground-primary);
|
||||
--token-pill-border: var(--color-token-background);
|
||||
--token-pill-outline: none;
|
||||
--token-pill-accent: var(--color-background-quaternary);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
--token-pill-outline: var(--color-background-primary);
|
||||
--token-pill-border: var(--color-accent-primary);
|
||||
outline-offset: -3px;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
--token-pill-background: var(--color-background-primary);
|
||||
--token-pill-foreground: var(--color-foreground-secondary);
|
||||
--token-pill-border: var(--color-background-tertiary);
|
||||
--token-pill-outline: none;
|
||||
--token-pill-accent: var(--color-background-tertiary);
|
||||
}
|
||||
}
|
||||
|
||||
.token-pill-applied {
|
||||
--token-pill-background: var(--color-token-background);
|
||||
--token-pill-foreground: var(--color-token-foreground);
|
||||
--token-pill-border: var(--color-token-border);
|
||||
--token-pill-accent: var(--color-token-accent);
|
||||
|
||||
&:hover {
|
||||
--token-pill-background: var(--color-token-background);
|
||||
--token-pill-foreground: var(--color-foreground-primary);
|
||||
--token-pill-border: var(--color-token-foreground);
|
||||
--token-pill-accent: var(--color-token-accent);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
--token-pill-background: var(--color-token-background);
|
||||
--token-pill-foreground: var(--color-token-foreground);
|
||||
--token-pill-outline: var(--color-accent-primary);
|
||||
--token-pill-border: var(--color-token-background);
|
||||
--token-pill-accent: var(--color-token-accent);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
--token-pill-background: var(--color-background-primary);
|
||||
--token-pill-foreground: var(--color-token-foreground);
|
||||
--token-pill-border: var(--color-token-accent);
|
||||
--token-pill-outline: none;
|
||||
--token-pill-accent: var(--color-token-accent);
|
||||
}
|
||||
}
|
||||
|
||||
.token-pill-invalid,
|
||||
.token-pill-invalid-applied {
|
||||
--token-pill-background: var(--color-background-tertiary);
|
||||
--token-pill-foreground: var(--color-foreground-error);
|
||||
--token-pill-border: var(--color-background-tertiary);
|
||||
--token-pill-accent: var(--color-foreground-error);
|
||||
|
||||
&:hover,
|
||||
&:focus-visible,
|
||||
&:disabled {
|
||||
--token-pill-background: var(--color-background-tertiary);
|
||||
--token-pill-foreground: var(--color-foreground-error);
|
||||
--token-pill-border: var(--color-background-tertiary);
|
||||
--token-pill-accent: var(--color-foreground-error);
|
||||
}
|
||||
}
|
||||
|
||||
.token-pill-icon {
|
||||
color: var(--token-pill-accent);
|
||||
}
|
|
@ -36,15 +36,15 @@
|
|||
|
||||
;; === Set selection
|
||||
|
||||
(defn get-selected-token-set-id [state]
|
||||
(or (get-in state [:workspace-local :selected-token-set-id])
|
||||
(defn get-selected-token-set-path [state]
|
||||
(or (get-in state [:workspace-local :selected-token-set-path])
|
||||
(some-> (get-workspace-tokens-lib state)
|
||||
(ctob/get-sets)
|
||||
(first)
|
||||
(ctob/get-set-path))))
|
||||
(ctob/get-set-prefixed-path-string))))
|
||||
|
||||
(defn get-selected-token-set-node [state]
|
||||
(when-let [path (some-> (get-selected-token-set-id state)
|
||||
(when-let [path (some-> (get-selected-token-set-path state)
|
||||
(ctob/split-token-set-path))]
|
||||
(some-> (get-workspace-tokens-lib state)
|
||||
(ctob/get-in-set-tree path))))
|
||||
|
@ -66,5 +66,5 @@
|
|||
(defn token-group-selected? [state]
|
||||
(some? (get-selected-token-set-group state)))
|
||||
|
||||
(defn assoc-selected-token-set-id [state id]
|
||||
(assoc-in state [:workspace-local :selected-token-set-id] id))
|
||||
(defn assoc-selected-token-set-path [state id]
|
||||
(assoc-in state [:workspace-local :selected-token-set-path] id))
|
||||
|
|
|
@ -23,8 +23,9 @@
|
|||
|
||||
:color
|
||||
{:title "Color"
|
||||
:attributes ctt/color-keys
|
||||
:on-update-shape wtch/update-fill
|
||||
:attributes #{:fill}
|
||||
:all-attributes ctt/color-keys
|
||||
:on-update-shape wtch/update-fill-stroke
|
||||
:modal {:key :tokens/color
|
||||
:fields [{:label "Color" :key :color}]}}
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
(:require
|
||||
[app.common.types.token :as ctt]
|
||||
[app.main.data.workspace.shape-layout :as dwsl]
|
||||
[app.main.data.workspace.state-helpers :as wsh]
|
||||
[app.main.data.workspace.undo :as dwu]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.ui.workspace.tokens.changes :as wtch]
|
||||
[app.main.ui.workspace.tokens.style-dictionary :as wtsd]
|
||||
[app.main.ui.workspace.tokens.token-set :as wtts]
|
||||
|
@ -17,10 +17,8 @@
|
|||
(def filter-existing-values? false)
|
||||
|
||||
(def attributes->shape-update
|
||||
{#{:r1 :r2 :r3 :r4} wtch/update-shape-radius-single-corner
|
||||
#_(fn [v ids _] (wtch/update-shape-radius-all v ids))
|
||||
#{:fill} wtch/update-fill
|
||||
#{:stroke-color} wtch/update-stroke-color
|
||||
{#{:r1 :r2 :r3 :r4} wtch/update-shape-radius-all
|
||||
ctt/color-keys wtch/update-fill-stroke
|
||||
ctt/stroke-width-keys wtch/update-stroke-width
|
||||
ctt/sizing-keys wtch/update-shape-dimensions
|
||||
ctt/opacity-keys wtch/update-opacity
|
||||
|
@ -108,8 +106,8 @@
|
|||
update-infos)))
|
||||
shapes-update-info))
|
||||
|
||||
(defn update-tokens [resolved-tokens]
|
||||
(->> @refs/workspace-page-objects
|
||||
(defn update-tokens [state resolved-tokens]
|
||||
(->> (wsh/lookup-page-objects state)
|
||||
(collect-shapes-update-info resolved-tokens)
|
||||
(actionize-shapes-update-info)))
|
||||
|
||||
|
@ -127,5 +125,5 @@
|
|||
(let [undo-id (js/Symbol)]
|
||||
(rx/concat
|
||||
(rx/of (dwu/start-undo-transaction undo-id))
|
||||
(update-tokens sd-tokens)
|
||||
(update-tokens state sd-tokens)
|
||||
(rx/of (dwu/commit-undo-transaction undo-id))))))))))
|
||||
|
|
|
@ -135,6 +135,12 @@
|
|||
(when (some? event)
|
||||
(.-target event)))
|
||||
|
||||
(defn get-related-target
|
||||
"Extract the related target from a blur or focus event instance."
|
||||
[^js event]
|
||||
(when (some? event)
|
||||
(.-relatedTarget event)))
|
||||
|
||||
(defn select-target
|
||||
"Extract the target from event instance and select it"
|
||||
[^js event]
|
||||
|
|
|
@ -168,7 +168,6 @@
|
|||
(.removeEventListener js/self "message" on-message))
|
||||
|
||||
(defn ^:dev/after-load start []
|
||||
[]
|
||||
(set! process-message-sub (subscribe-buffer-messages))
|
||||
(.addEventListener js/self "message" on-message))
|
||||
|
||||
|
|
|
@ -79,4 +79,4 @@
|
|||
;; ==== Check
|
||||
(println stroke')
|
||||
(t/is (some? shape1'))
|
||||
(t/is (= (:stroke-alignment stroke') :center))))))))
|
||||
(t/is (= (:stroke-alignment stroke') :inner))))))))
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
(fn [cause]
|
||||
(js/console.log "[error]:" cause))
|
||||
(fn [_]
|
||||
(js/console.log "[complete]"))))
|
||||
#_(js/console.debug "[complete]"))))
|
||||
|
||||
(doseq [event events]
|
||||
(ptk/emit! store event))
|
||||
|
|
426
frontend/test/frontend_tests/logic/components_and_tokens.cljs
Normal file
426
frontend/test/frontend_tests/logic/components_and_tokens.cljs
Normal file
|
@ -0,0 +1,426 @@
|
|||
;; 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 frontend-tests.logic.components-and-tokens
|
||||
(:require
|
||||
[app.common.geom.point :as geom]
|
||||
[app.common.math :as mth]
|
||||
[app.common.test-helpers.components :as cthc]
|
||||
[app.common.test-helpers.compositions :as ctho]
|
||||
[app.common.test-helpers.files :as cthf]
|
||||
[app.common.test-helpers.ids-map :as cthi]
|
||||
[app.common.test-helpers.shapes :as cths]
|
||||
[app.common.test-helpers.tokens :as ctht]
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[app.main.data.tokens :as dt]
|
||||
[app.main.data.workspace.libraries :as dwl]
|
||||
[app.main.data.workspace.selection :as dws]
|
||||
[app.main.data.workspace.state-helpers :as wsh]
|
||||
[app.main.ui.workspace.tokens.changes :as wtch]
|
||||
[app.main.ui.workspace.tokens.update :as wtu]
|
||||
[cljs.test :as t :include-macros true]
|
||||
[frontend-tests.helpers.pages :as thp]
|
||||
[frontend-tests.helpers.state :as ths]
|
||||
[frontend-tests.tokens.helpers.state :as tohs]
|
||||
[frontend-tests.tokens.helpers.tokens :as toht]))
|
||||
|
||||
(t/use-fixtures :each
|
||||
{:before thp/reset-idmap!})
|
||||
|
||||
(defn- setup-base-file
|
||||
[]
|
||||
(-> (cthf/sample-file :file1)
|
||||
(ctht/add-tokens-lib)
|
||||
(ctht/update-tokens-lib #(-> %
|
||||
(ctob/add-set (ctob/make-token-set :name "test-token-set"))
|
||||
(ctob/add-theme (ctob/make-token-theme :name "test-theme"
|
||||
:sets #{"test-token-set"}))
|
||||
(ctob/set-active-themes #{"/test-theme"})
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "test-token-1"
|
||||
:type :border-radius
|
||||
:value 25))
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "test-token-2"
|
||||
:type :border-radius
|
||||
:value 50))
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "test-token-3"
|
||||
:type :border-radius
|
||||
:value 75))))
|
||||
(ctho/add-frame :frame1)
|
||||
(ctht/apply-token-to-shape :frame1 "test-token-1" [:r1 :r2 :r3 :r4] [:r1 :r2 :r3 :r4] 25)))
|
||||
|
||||
(defn- setup-file-with-main
|
||||
[]
|
||||
(-> (setup-base-file)
|
||||
(cthc/make-component :component1 :frame1)))
|
||||
|
||||
(defn- setup-file-with-copy
|
||||
[]
|
||||
(-> (setup-file-with-main)
|
||||
(cthc/instantiate-component :component1 :c-frame1)))
|
||||
|
||||
(t/deftest create-component-with-token
|
||||
(t/async
|
||||
done
|
||||
(let [;; ==== Setup
|
||||
file (setup-base-file)
|
||||
store (ths/setup-store file)
|
||||
|
||||
;; ==== Action
|
||||
events
|
||||
[(dws/select-shape (cthi/id :frame1))
|
||||
(dwl/add-component)]]
|
||||
|
||||
(ths/run-store
|
||||
store done events
|
||||
(fn [new-state]
|
||||
(let [;; ==== Get
|
||||
file' (ths/get-file-from-store new-state)
|
||||
frame1' (cths/get-shape file' :frame1)
|
||||
tokens-frame1' (:applied-tokens frame1')]
|
||||
|
||||
;; ==== Check
|
||||
(t/is (= (count tokens-frame1') 4))
|
||||
(t/is (= (get tokens-frame1' :r1) "test-token-1"))
|
||||
(t/is (= (get tokens-frame1' :r2) "test-token-1"))
|
||||
(t/is (= (get tokens-frame1' :r3) "test-token-1"))
|
||||
(t/is (= (get tokens-frame1' :r4) "test-token-1"))
|
||||
(t/is (= (get frame1' :r1) 25))
|
||||
(t/is (= (get frame1' :r2) 25))
|
||||
(t/is (= (get frame1' :r3) 25))
|
||||
(t/is (= (get frame1' :r4) 25))))))))
|
||||
|
||||
(t/deftest create-copy-with-token
|
||||
(t/async
|
||||
done
|
||||
(let [;; ==== Setup
|
||||
file (setup-file-with-main)
|
||||
store (ths/setup-store file)
|
||||
|
||||
;; ==== Action
|
||||
events
|
||||
[(dwl/instantiate-component (:id file)
|
||||
(cthi/id :component1)
|
||||
(geom/point 0 0))]]
|
||||
|
||||
(ths/run-store
|
||||
store done events
|
||||
(fn [new-state]
|
||||
(let [;; ==== Get
|
||||
selected (wsh/lookup-selected new-state)
|
||||
c-frame1' (wsh/lookup-shape new-state (first selected))
|
||||
tokens-frame1' (:applied-tokens c-frame1')]
|
||||
|
||||
;; ==== Check
|
||||
(t/is (= (count tokens-frame1') 4))
|
||||
(t/is (= (get tokens-frame1' :r1) "test-token-1"))
|
||||
(t/is (= (get tokens-frame1' :r2) "test-token-1"))
|
||||
(t/is (= (get tokens-frame1' :r3) "test-token-1"))
|
||||
(t/is (= (get tokens-frame1' :r4) "test-token-1"))
|
||||
(t/is (= (get c-frame1' :r1) 25))
|
||||
(t/is (= (get c-frame1' :r2) 25))
|
||||
(t/is (= (get c-frame1' :r3) 25))
|
||||
(t/is (= (get c-frame1' :r4) 25))))))))
|
||||
|
||||
(t/deftest change-token-in-main
|
||||
(t/async
|
||||
done
|
||||
(let [;; ==== Setup
|
||||
file (setup-file-with-copy)
|
||||
store (ths/setup-store file)
|
||||
|
||||
;; ==== Action
|
||||
events [(wtch/apply-token {:shape-ids [(cthi/id :frame1)]
|
||||
:attributes #{:r1 :r2 :r3 :r4}
|
||||
:token (toht/get-token file "test-token-2")
|
||||
:on-update-shape wtch/update-shape-radius-all})]
|
||||
|
||||
step2 (fn [_]
|
||||
(let [events2 [(dwl/sync-file (:id file) (:id file))]]
|
||||
(ths/run-store
|
||||
store done events2
|
||||
(fn [new-state]
|
||||
(let [;; ==== Get
|
||||
file' (ths/get-file-from-store new-state)
|
||||
c-frame1' (cths/get-shape file' :c-frame1)
|
||||
tokens-frame1' (:applied-tokens c-frame1')]
|
||||
|
||||
;; ==== Check
|
||||
(t/is (= (count tokens-frame1') 4))
|
||||
(t/is (= (get tokens-frame1' :r1) "test-token-2"))
|
||||
(t/is (= (get tokens-frame1' :r2) "test-token-2"))
|
||||
(t/is (= (get tokens-frame1' :r3) "test-token-2"))
|
||||
(t/is (= (get tokens-frame1' :r4) "test-token-2"))
|
||||
(t/is (= (get c-frame1' :r1) 50))
|
||||
(t/is (= (get c-frame1' :r2) 50))
|
||||
(t/is (= (get c-frame1' :r3) 50))
|
||||
(t/is (= (get c-frame1' :r4) 50)))))))]
|
||||
|
||||
(tohs/run-store-async
|
||||
store step2 events identity))))
|
||||
|
||||
(t/deftest remove-token-in-main
|
||||
(t/async
|
||||
done
|
||||
(let [;; ==== Setup
|
||||
file (setup-file-with-copy)
|
||||
store (ths/setup-store file)
|
||||
|
||||
;; ==== Action
|
||||
events [(wtch/unapply-token {:shape-ids [(cthi/id :frame1)]
|
||||
:attributes #{:r1 :r2 :r3 :r4}
|
||||
:token (toht/get-token file "test-token-1")})]
|
||||
|
||||
step2 (fn [_]
|
||||
(let [events2 [(dwl/sync-file (:id file) (:id file))]]
|
||||
(ths/run-store
|
||||
store done events2
|
||||
(fn [new-state]
|
||||
(let [;; ==== Get
|
||||
file' (ths/get-file-from-store new-state)
|
||||
c-frame1' (cths/get-shape file' :c-frame1)
|
||||
tokens-frame1' (:applied-tokens c-frame1')]
|
||||
|
||||
;; ==== Check
|
||||
(t/is (= (count tokens-frame1') 0))
|
||||
(t/is (= (get c-frame1' :r1) 25))
|
||||
(t/is (= (get c-frame1' :r2) 25))
|
||||
(t/is (= (get c-frame1' :r3) 25))
|
||||
(t/is (= (get c-frame1' :r4) 25)))))))]
|
||||
|
||||
(tohs/run-store-async
|
||||
store step2 events identity))))
|
||||
|
||||
(t/deftest modify-token
|
||||
(t/async
|
||||
done
|
||||
(let [;; ==== Setup
|
||||
file (setup-file-with-copy)
|
||||
store (ths/setup-store file)
|
||||
|
||||
;; ==== Action
|
||||
events [(dt/update-create-token {:token (ctob/make-token :name "test-token-1"
|
||||
:type :border-radius
|
||||
:value 66)
|
||||
:prev-token-name "test-token-1"})]
|
||||
|
||||
step2 (fn [_]
|
||||
(let [events2 [(wtu/update-workspace-tokens)
|
||||
(dwl/sync-file (:id file) (:id file))]]
|
||||
(tohs/run-store-async
|
||||
store done events2
|
||||
(fn [new-state]
|
||||
(let [;; ==== Get
|
||||
file' (ths/get-file-from-store new-state)
|
||||
c-frame1' (cths/get-shape file' :c-frame1)
|
||||
tokens-frame1' (:applied-tokens c-frame1')]
|
||||
|
||||
;; ==== Check
|
||||
(t/is (= (count tokens-frame1') 4))
|
||||
(t/is (= (get tokens-frame1' :r1) "test-token-1"))
|
||||
(t/is (= (get tokens-frame1' :r2) "test-token-1"))
|
||||
(t/is (= (get tokens-frame1' :r3) "test-token-1"))
|
||||
(t/is (= (get tokens-frame1' :r4) "test-token-1"))
|
||||
(t/is (= (get c-frame1' :r1) 66))
|
||||
(t/is (= (get c-frame1' :r2) 66))
|
||||
(t/is (= (get c-frame1' :r3) 66))
|
||||
(t/is (= (get c-frame1' :r4) 66)))))))]
|
||||
|
||||
(tohs/run-store-async
|
||||
store step2 events identity))))
|
||||
|
||||
(t/deftest change-token-in-copy-then-change-main
|
||||
(t/async
|
||||
done
|
||||
(let [;; ==== Setup
|
||||
file (setup-file-with-copy)
|
||||
store (ths/setup-store file)
|
||||
|
||||
;; ==== Action
|
||||
events [(wtch/apply-token {:shape-ids [(cthi/id :c-frame1)]
|
||||
:attributes #{:r1 :r2 :r3 :r4}
|
||||
:token (toht/get-token file "test-token-2")
|
||||
:on-update-shape wtch/update-shape-radius-all})
|
||||
(wtch/apply-token {:shape-ids [(cthi/id :frame1)]
|
||||
:attributes #{:r1 :r2 :r3 :r4}
|
||||
:token (toht/get-token file "test-token-3")
|
||||
:on-update-shape wtch/update-shape-radius-all})]
|
||||
|
||||
step2 (fn [_]
|
||||
(let [events2 [(dwl/sync-file (:id file) (:id file))]]
|
||||
(ths/run-store
|
||||
store done events2
|
||||
(fn [new-state]
|
||||
(let [;; ==== Get
|
||||
file' (ths/get-file-from-store new-state)
|
||||
c-frame1' (cths/get-shape file' :c-frame1)
|
||||
tokens-frame1' (:applied-tokens c-frame1')]
|
||||
|
||||
;; ==== Check
|
||||
(t/is (= (count tokens-frame1') 4))
|
||||
(t/is (= (get tokens-frame1' :r1) "test-token-2"))
|
||||
(t/is (= (get tokens-frame1' :r2) "test-token-2"))
|
||||
(t/is (= (get tokens-frame1' :r3) "test-token-2"))
|
||||
(t/is (= (get tokens-frame1' :r4) "test-token-2"))
|
||||
(t/is (= (get c-frame1' :r1) 50))
|
||||
(t/is (= (get c-frame1' :r2) 50))
|
||||
(t/is (= (get c-frame1' :r3) 50))
|
||||
(t/is (= (get c-frame1' :r4) 50)))))))]
|
||||
|
||||
(tohs/run-store-async
|
||||
store step2 events identity))))
|
||||
|
||||
(t/deftest remove-token-in-copy-then-change-main
|
||||
(t/async
|
||||
done
|
||||
(let [;; ==== Setup
|
||||
file (setup-file-with-copy)
|
||||
store (ths/setup-store file)
|
||||
|
||||
;; ==== Action
|
||||
events [(wtch/unapply-token {:shape-ids [(cthi/id :c-frame1)]
|
||||
:attributes #{:r1 :r2 :r3 :r4}
|
||||
:token (toht/get-token file "test-token-1")})
|
||||
(wtch/apply-token {:shape-ids [(cthi/id :frame1)]
|
||||
:attributes #{:r1 :r2 :r3 :r4}
|
||||
:token (toht/get-token file "test-token-3")
|
||||
:on-update-shape wtch/update-shape-radius-all})]
|
||||
|
||||
step2 (fn [_]
|
||||
(let [events2 [(dwl/sync-file (:id file) (:id file))]]
|
||||
(ths/run-store
|
||||
store done events2
|
||||
(fn [new-state]
|
||||
(let [;; ==== Get
|
||||
file' (ths/get-file-from-store new-state)
|
||||
c-frame1' (cths/get-shape file' :c-frame1)
|
||||
tokens-frame1' (:applied-tokens c-frame1')]
|
||||
|
||||
;; ==== Check
|
||||
(t/is (= (count tokens-frame1') 0))
|
||||
(t/is (= (get c-frame1' :r1) 25))
|
||||
(t/is (= (get c-frame1' :r2) 25))
|
||||
(t/is (= (get c-frame1' :r3) 25))
|
||||
(t/is (= (get c-frame1' :r4) 25)))))))]
|
||||
|
||||
(tohs/run-store-async
|
||||
store step2 events identity))))
|
||||
|
||||
(t/deftest modify-token-all-types
|
||||
(t/async
|
||||
done
|
||||
(let [;; ==== Setup
|
||||
file (-> (cthf/sample-file :file1)
|
||||
(ctht/add-tokens-lib)
|
||||
(ctht/update-tokens-lib #(-> %
|
||||
(ctob/add-set (ctob/make-token-set :name "test-token-set"))
|
||||
(ctob/add-theme (ctob/make-token-theme :name "test-theme"
|
||||
:sets #{"test-token-set"}))
|
||||
(ctob/set-active-themes #{"/test-theme"})
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "token-radius"
|
||||
:type :border-radius
|
||||
:value 10))
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "token-rotation"
|
||||
:type :rotation
|
||||
:value 30))
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "token-opacity"
|
||||
:type :opacity
|
||||
:value 0.7))
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "token-stroke-width"
|
||||
:type :stroke-width
|
||||
:value 2))
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "token-color"
|
||||
:type :color
|
||||
:value "#00ff00"))
|
||||
(ctob/add-token-in-set "test-token-set"
|
||||
(ctob/make-token :name "token-dimensions"
|
||||
:type :dimensions
|
||||
:value 100))))
|
||||
(ctho/add-frame :frame1)
|
||||
(ctht/apply-token-to-shape :frame1 "token-radius" [:r1 :r2 :r3 :r4] [:r1 :r2 :r3 :r4] 10)
|
||||
(ctht/apply-token-to-shape :frame1 "token-rotation" [:rotation] [:rotation] 30)
|
||||
(ctht/apply-token-to-shape :frame1 "token-opacity" [:opacity] [:opacity] 0.7)
|
||||
(ctht/apply-token-to-shape :frame1 "token-stroke-width" [:stroke-width] [:stroke-width] 2)
|
||||
(ctht/apply-token-to-shape :frame1 "token-color" [:stroke-color] [:stroke-color] "#00ff00")
|
||||
(ctht/apply-token-to-shape :frame1 "token-color" [:fill] [:fill] "#00ff00")
|
||||
(ctht/apply-token-to-shape :frame1 "token-dimensions" [:width :height] [:width :height] 100)
|
||||
(cthc/make-component :component1 :frame1)
|
||||
(cthc/instantiate-component :component1 :c-frame1))
|
||||
store (ths/setup-store file)
|
||||
|
||||
;; ==== Action
|
||||
events [(dt/update-create-token {:token (ctob/make-token :name "token-radius"
|
||||
:type :border-radius
|
||||
:value 30)
|
||||
:prev-token-name "token-radius"})
|
||||
(dt/update-create-token {:token (ctob/make-token :name "token-rotation"
|
||||
:type :rotation
|
||||
:value 45)
|
||||
:prev-token-name "token-rotation"})
|
||||
(dt/update-create-token {:token (ctob/make-token :name "token-opacity"
|
||||
:type :opacity
|
||||
:value 0.9)
|
||||
:prev-token-name "token-opacity"})
|
||||
(dt/update-create-token {:token (ctob/make-token :name "token-stroke-width"
|
||||
:type :stroke-width
|
||||
:value 8)
|
||||
:prev-token-name "token-stroke-width"})
|
||||
(dt/update-create-token {:token (ctob/make-token :name "token-color"
|
||||
:type :color
|
||||
:value "#ff0000")
|
||||
:prev-token-name "token-color"})
|
||||
(dt/update-create-token {:token (ctob/make-token :name "token-dimensions"
|
||||
:type :dimensions
|
||||
:value 200)
|
||||
:prev-token-name "token-dimensions"})]
|
||||
|
||||
step2 (fn [_]
|
||||
(let [events2 [(wtu/update-workspace-tokens)
|
||||
(dwl/sync-file (:id file) (:id file))]]
|
||||
(tohs/run-store-async
|
||||
store done events2
|
||||
(fn [new-state]
|
||||
(let [;; ==== Get
|
||||
file' (ths/get-file-from-store new-state)
|
||||
frame1' (cths/get-shape file' :frame1)
|
||||
c-frame1' (cths/get-shape file' :c-frame1)
|
||||
tokens-frame1' (:applied-tokens c-frame1')]
|
||||
|
||||
;; ==== Check
|
||||
(t/is (= (count tokens-frame1') 11))
|
||||
(t/is (= (get tokens-frame1' :r1) "token-radius"))
|
||||
(t/is (= (get tokens-frame1' :r2) "token-radius"))
|
||||
(t/is (= (get tokens-frame1' :r3) "token-radius"))
|
||||
(t/is (= (get tokens-frame1' :r4) "token-radius"))
|
||||
(t/is (= (get tokens-frame1' :rotation) "token-rotation"))
|
||||
(t/is (= (get tokens-frame1' :opacity) "token-opacity"))
|
||||
(t/is (= (get tokens-frame1' :stroke-width) "token-stroke-width"))
|
||||
(t/is (= (get tokens-frame1' :stroke-color) "token-color"))
|
||||
(t/is (= (get tokens-frame1' :fill) "token-color"))
|
||||
(t/is (= (get tokens-frame1' :width) "token-dimensions"))
|
||||
(t/is (= (get tokens-frame1' :height) "token-dimensions"))
|
||||
(t/is (= (get c-frame1' :r1) 30))
|
||||
(t/is (= (get c-frame1' :r2) 30))
|
||||
(t/is (= (get c-frame1' :r3) 30))
|
||||
(t/is (= (get c-frame1' :r4) 30))
|
||||
(t/is (= (get c-frame1' :rotation) 45))
|
||||
(t/is (= (get c-frame1' :opacity) 0.9))
|
||||
(t/is (= (get-in c-frame1' [:strokes 0 :stroke-width]) 8))
|
||||
(t/is (= (get-in c-frame1' [:strokes 0 :stroke-color]) "#ff0000"))
|
||||
(t/is (= (get-in c-frame1' [:fills 0 :fill-color]) "#ff0000"))
|
||||
(t/is (mth/close? (get c-frame1' :width) 200))
|
||||
(t/is (mth/close? (get c-frame1' :height) 200))
|
||||
|
||||
(t/is (empty? (:touched c-frame1'))))))))]
|
||||
|
||||
(tohs/run-store-async
|
||||
store step2 events identity))))
|
|
@ -4,6 +4,7 @@
|
|||
[frontend-tests.basic-shapes-test]
|
||||
[frontend-tests.helpers-shapes-test]
|
||||
[frontend-tests.logic.comp-remove-swap-slots-test]
|
||||
[frontend-tests.logic.components-and-tokens]
|
||||
[frontend-tests.logic.copying-and-duplicating-test]
|
||||
[frontend-tests.logic.frame-guides-test]
|
||||
[frontend-tests.logic.groups-test]
|
||||
|
@ -28,6 +29,7 @@
|
|||
(t/run-tests
|
||||
'frontend-tests.helpers-shapes-test
|
||||
'frontend-tests.logic.comp-remove-swap-slots-test
|
||||
'frontend-tests.logic.components-and-tokens
|
||||
'frontend-tests.logic.copying-and-duplicating-test
|
||||
'frontend-tests.logic.frame-guides-test
|
||||
'frontend-tests.logic.groups-test
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
[app.common.types.tokens-lib :as ctob]
|
||||
[app.main.ui.workspace.tokens.token :as wtt]))
|
||||
|
||||
(defn add-token [state label params]
|
||||
(let [id (thi/new-id! label)
|
||||
token (assoc params :id id)]
|
||||
(update-in state [:data :tokens] assoc id token)))
|
||||
|
||||
(defn get-token [file name]
|
||||
(some-> (get-in file [:data :tokens-lib])
|
||||
(ctob/get-active-themes-set-tokens)
|
||||
|
|
|
@ -122,6 +122,38 @@
|
|||
(t/testing "while :r4 was kept with borderRadius.sm"
|
||||
(t/is (= (:r4 (:applied-tokens rect-1')) (:name token-sm)))))))))))
|
||||
|
||||
(t/deftest test-apply-color
|
||||
(t/testing "applies color token and updates the shape fill and stroke-color"
|
||||
(t/async
|
||||
done
|
||||
(let [color-token {:name "color.primary"
|
||||
:value "red"
|
||||
:type :color}
|
||||
file (-> (setup-file-with-tokens)
|
||||
(update-in [:data :tokens-lib]
|
||||
#(ctob/add-token-in-set % "Set A" (ctob/make-token color-token))))
|
||||
store (ths/setup-store file)
|
||||
rect-1 (cths/get-shape file :rect-1)
|
||||
events [(wtch/apply-token {:shape-ids [(:id rect-1)]
|
||||
:attributes #{:color}
|
||||
:token (toht/get-token file "color.primary")
|
||||
:on-update-shape wtch/update-fill})
|
||||
(wtch/apply-token {:shape-ids [(:id rect-1)]
|
||||
:attributes #{:stroke-color}
|
||||
:token (toht/get-token file "color.primary")
|
||||
:on-update-shape wtch/update-stroke-color})]]
|
||||
(tohs/run-store-async
|
||||
store done events
|
||||
(fn [new-state]
|
||||
(let [file' (ths/get-file-from-store new-state)
|
||||
token-target' (toht/get-token file' "rotation.medium")
|
||||
rect-1' (cths/get-shape file' :rect-1)]
|
||||
(t/is (some? (:applied-tokens rect-1')))
|
||||
(t/is (= (:fill (:applied-tokens rect-1')) (:name token-target')))
|
||||
(t/is (= (get-in rect-1' [:fills 0 :fill-color]) "#ff0000"))
|
||||
(t/is (= (:stroke (:applied-tokens rect-1')) (:name token-target')))
|
||||
(t/is (= (get-in rect-1' [:strokes 0 :stroke-color]) "#ff0000")))))))))
|
||||
|
||||
(t/deftest test-apply-dimensions
|
||||
(t/testing "applies dimensions token and updates the shapes width and height"
|
||||
(t/async
|
||||
|
|
|
@ -1756,6 +1756,10 @@ msgstr "Expired"
|
|||
msgid "labels.export"
|
||||
msgstr "Export"
|
||||
|
||||
#: src/app/main/ui/exports/assets.cljs:177
|
||||
msgid "labels.import"
|
||||
msgstr "Import"
|
||||
|
||||
#: src/app/main/ui/settings/feedback.cljs:48
|
||||
msgid "labels.feedback-disabled"
|
||||
msgstr "Feedback disabled"
|
||||
|
@ -5466,12 +5470,12 @@ msgid "workspace.options.radius-top-right"
|
|||
msgstr "Top right"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/measures.cljs:639
|
||||
msgid "workspace.options.radius.all-corners"
|
||||
msgstr "All corners"
|
||||
msgid "workspace.options.radius.hide-all-corners"
|
||||
msgstr "Collapse independent radius"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/measures.cljs:640
|
||||
msgid "workspace.options.radius.single-corners"
|
||||
msgstr "Independent corners"
|
||||
msgid "workspace.options.radius.show-single-corners"
|
||||
msgstr "Show independent radius"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/typography.cljs:184
|
||||
msgid "workspace.options.recent-fonts"
|
||||
|
@ -6700,6 +6704,202 @@ msgstr "Open version menu"
|
|||
msgid "workspace.viewport.click-to-close-path"
|
||||
msgstr "Click to close the path"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.create-token"
|
||||
msgstr "Create new %s token"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.edit-token"
|
||||
msgstr "Edit token"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs, src/app/main/ui/workspace/tokens/token_pill.cljs
|
||||
msgid "workspace.token.resolved-value"
|
||||
msgstr "Resolved value: %s"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.token-name"
|
||||
msgstr "Name"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.enter-token-name"
|
||||
msgstr "Enter %s token name"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.token-value"
|
||||
msgstr "Value"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.enter-token-value"
|
||||
msgstr "Enter token value or alias"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.token-description"
|
||||
msgstr "Description"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.enter-token-description"
|
||||
msgstr "Add a description (optional)"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sidebar.cljs
|
||||
msgid "workspace.token.original-value"
|
||||
msgstr "Original value: %s"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sidebar.cljs
|
||||
msgid "workspace.token.no-themes"
|
||||
msgstr "There are no themes."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sidebar.cljs
|
||||
msgid "workspace.token.create-one"
|
||||
msgstr "Create one."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sidebar.cljs
|
||||
msgid "workspace.token.add set"
|
||||
msgstr "Add set"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sidebar.cljs
|
||||
msgid "workspace.token.tools"
|
||||
msgstr "Tools"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.save-theme"
|
||||
msgstr "Save theme"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.create-theme-title"
|
||||
msgstr "Create theme"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.edit-theme-title"
|
||||
msgstr "Edit theme"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.delete-theme-title"
|
||||
msgstr "Delete theme"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.no-themes-currently"
|
||||
msgstr "You currently have no themes."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.create-new-theme"
|
||||
msgstr "Create your first theme now."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.new-theme"
|
||||
msgstr "New theme"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.themes"
|
||||
msgstr "Themes"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.theme-name"
|
||||
msgstr "Theme %s"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.no-sets"
|
||||
msgstr "No sets"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.num-sets"
|
||||
msgstr "%s sets"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.back-to-themes"
|
||||
msgstr "Back to theme list"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/theme_select.cljs
|
||||
msgid "workspace.token.edit-themes"
|
||||
msgstr "Edit themes"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/theme_select.cljs
|
||||
msgid "workspace.token.no-active-theme"
|
||||
msgstr "No theme active"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/theme_select.cljs
|
||||
msgid "workspace.token.active-themes"
|
||||
msgstr "%s active themes"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sets.cljs
|
||||
msgid "workspace.token.grouping-set-alert"
|
||||
msgstr "Token Set grouping is not supported yet."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sets.cljs
|
||||
msgid "workspace.token.select-set"
|
||||
msgstr "Select set."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sets.cljs
|
||||
msgid "workspace.token.set-selection-theme"
|
||||
msgstr "Define what token sets should be used as part of this theme option:"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sets.cljs
|
||||
msgid "workspace.token.no-sets-yet"
|
||||
msgstr "There are no sets yet."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sets.cljs
|
||||
msgid "workspace.token.no-sets-create"
|
||||
msgstr "There are no sets defined yet. Create one first."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/context_menu.cljs
|
||||
msgid "workspace.token.delete"
|
||||
msgstr "Delete token"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/context_menu.cljs
|
||||
msgid "workspace.token.duplicate"
|
||||
msgstr "Duplicate token"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/context_menu.cljs
|
||||
msgid "workspace.token.edit"
|
||||
msgstr "Edit token"
|
||||
|
||||
msgid "workspace.versions.button.save"
|
||||
msgstr "Save version"
|
||||
|
||||
msgid "workspace.versions.button.pin"
|
||||
msgstr "Pin version"
|
||||
|
||||
msgid "workspace.versions.button.restore"
|
||||
msgstr "Restore version"
|
||||
|
||||
msgid "workspace.versions.empty"
|
||||
msgstr "There are no versions yet"
|
||||
|
||||
msgid "workspace.versions.autosaved.version"
|
||||
msgstr "Autosaved %s"
|
||||
|
||||
msgid "workspace.versions.autosaved.entry"
|
||||
msgstr "%s autosave versions"
|
||||
|
||||
msgid "workspace.versions.loading"
|
||||
msgstr "Loading..."
|
||||
|
||||
msgid "workspace.versions.filter.label"
|
||||
msgstr "Versions filter"
|
||||
|
||||
msgid "workspace.versions.filter.all"
|
||||
msgstr "All versions"
|
||||
|
||||
msgid "workspace.versions.filter.mine"
|
||||
msgstr "My versions"
|
||||
|
||||
msgid "workspace.versions.filter.user"
|
||||
msgstr "%s's versions"
|
||||
|
||||
msgid "workspace.versions.restore-warning"
|
||||
msgstr "Do you want to restore this version?"
|
||||
|
||||
msgid "workspace.versions.snapshot-menu"
|
||||
msgstr "Open snapshot menu"
|
||||
|
||||
msgid "workspace.versions.version-menu"
|
||||
msgstr "Open version menu"
|
||||
|
||||
msgid "workspace.versions.expand-snapshot"
|
||||
msgstr "Expand snapshots"
|
||||
|
||||
msgid "workspace.versions.tab.history"
|
||||
msgstr "History"
|
||||
|
||||
msgid "dashboard.notifications.notifications-saved"
|
||||
msgstr "Notification settings updated"
|
||||
|
||||
|
|
|
@ -1761,6 +1761,11 @@ msgstr "Expirada"
|
|||
msgid "labels.export"
|
||||
msgstr "Exportar"
|
||||
|
||||
|
||||
#: src/app/main/ui/exports/assets.cljs:177
|
||||
msgid "labels.import"
|
||||
msgstr "Importar"
|
||||
|
||||
#: src/app/main/ui/settings/feedback.cljs:48
|
||||
msgid "labels.feedback-disabled"
|
||||
msgstr "El modulo de recepción de opiniones esta deshabilitado"
|
||||
|
@ -5461,12 +5466,12 @@ msgid "workspace.options.radius-top-right"
|
|||
msgstr "Arriba derecha"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/measures.cljs:639
|
||||
msgid "workspace.options.radius.all-corners"
|
||||
msgstr "Todas las esquinas"
|
||||
msgid "workspace.options.radius.hide-all-corners"
|
||||
msgstr "Colapsar radios individuales"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/measures.cljs:640
|
||||
msgid "workspace.options.radius.single-corners"
|
||||
msgstr "Esquinas individuales"
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/measures.cljs:639
|
||||
msgid "workspace.options.radius.show-single-corners"
|
||||
msgstr "Mostrar radios individuales"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/typography.cljs:184
|
||||
msgid "workspace.options.recent-fonts"
|
||||
|
@ -6323,10 +6328,6 @@ msgstr "%s sets"
|
|||
msgid "workspace.token.original-value"
|
||||
msgstr "Valor original: "
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs:193, src/app/main/ui/workspace/tokens/form.cljs:196, src/app/main/ui/workspace/tokens/sidebar.cljs:67
|
||||
msgid "workspace.token.resolved-value"
|
||||
msgstr "Valor resuelto: "
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs:208
|
||||
msgid "workspace.token.save-theme"
|
||||
msgstr "Guardar tema"
|
||||
|
@ -6650,6 +6651,206 @@ msgstr "Abrir menu de versiones"
|
|||
msgid "workspace.viewport.click-to-close-path"
|
||||
msgstr "Pulsar para cerrar la ruta"
|
||||
|
||||
msgid "errors.maximum-invitations-by-request-reached"
|
||||
msgstr "Se ha alcanzado el número máximo (%s) de correos electrónicos que se pueden invitar en una sola solicitud"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.create-token"
|
||||
msgstr "Crear un token de %s"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.edit-token"
|
||||
msgstr "Editar token"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs ,src/app/main/ui/workspace/tokens/token_pill.cljs
|
||||
msgid "workspace.token.resolved-value"
|
||||
msgstr "Valor resuelto: %s"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.token-name"
|
||||
msgstr "Nombre"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.enter-token-name"
|
||||
msgstr "Introduce un nombre para el token %s"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.token-value"
|
||||
msgstr "Valor"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.enter-token-value"
|
||||
msgstr "Introduce un valor o alias"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.token-description"
|
||||
msgstr "Descripción"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/form.cljs
|
||||
msgid "workspace.token.enter-token-description"
|
||||
msgstr "Añade una Descripción (opcional)"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sidebar.cljs
|
||||
msgid "workspace.token.original-value"
|
||||
msgstr "Valor original: %s"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sidebar.cljs
|
||||
msgid "workspace.token.no-themes"
|
||||
msgstr "No hay temas."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sidebar.cljs
|
||||
msgid "workspace.token.create-one"
|
||||
msgstr "Crear uno."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sidebar.cljs
|
||||
msgid "workspace.token.add set"
|
||||
msgstr "Añadir set"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sidebar.cljs
|
||||
msgid "workspace.token.tools"
|
||||
msgstr "Herramientas"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.save-theme"
|
||||
msgstr "Guardar tema"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.create-theme-title"
|
||||
msgstr "Crear tema"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.edit-theme-title"
|
||||
msgstr "Editar tema"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.delete-theme-title"
|
||||
msgstr "Borrar theme"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.no-themes-currently"
|
||||
msgstr "Actualmente no existen temas."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.create-new-theme"
|
||||
msgstr "Crea un nuevo tema ahora."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.new-theme"
|
||||
msgstr "Nuevo tema"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.themes"
|
||||
msgstr "Temas"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.theme-name"
|
||||
msgstr "Tema %s"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.no-sets"
|
||||
msgstr "No hay sets"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.num-sets"
|
||||
msgstr "%s sets"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/modals/themes.cljs
|
||||
msgid "workspace.token.back-to-themes"
|
||||
msgstr "Volver al listado de temas"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/theme_select.cljs
|
||||
msgid "workspace.token.edit-themes"
|
||||
msgstr "Editar temas"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/theme_select.cljs
|
||||
msgid "workspace.token.no-active-theme"
|
||||
msgstr "No hay temas activos"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/theme_select.cljs
|
||||
msgid "workspace.token.active-themes"
|
||||
msgstr "%s temas activos"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sets.cljs
|
||||
msgid "workspace.token.grouping-set-alert"
|
||||
msgstr "La agrupación de sets aun no está soportada."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sets.cljs
|
||||
msgid "workspace.token.select-set"
|
||||
msgstr "Selecciona set"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sets.cljs
|
||||
msgid "workspace.token.set-selection-theme"
|
||||
msgstr "Define que sets de tokens deberian formar parte de este tema:"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sets.cljs
|
||||
msgid "workspace.token.no-sets"
|
||||
msgstr "Aun no hay sets."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sets.cljs
|
||||
msgid "workspace.create-one"
|
||||
msgstr "Crea uno."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/sets.cljs
|
||||
msgid "workspace.token.no-sets-create"
|
||||
msgstr "Aun no hay sets definidos. Crea uno primero"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/context_menu.cljs
|
||||
msgid "workspace.token.delete"
|
||||
msgstr "Eliminar token"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/context_menu.cljs
|
||||
msgid "workspace.token.duplicate"
|
||||
msgstr "Duplicar token"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/context_menu.cljs
|
||||
msgid "workspace.token.edit"
|
||||
msgstr "Editar token"
|
||||
|
||||
msgid "workspace.versions.button.save"
|
||||
msgstr "Guardar versión"
|
||||
|
||||
msgid "workspace.versions.button.pin"
|
||||
msgstr "Fijar versión"
|
||||
|
||||
msgid "workspace.versions.button.restore"
|
||||
msgstr "Restaurar versión"
|
||||
|
||||
msgid "workspace.versions.empty"
|
||||
msgstr "No hay versiones aún"
|
||||
|
||||
msgid "workspace.versions.autosaved.version"
|
||||
msgstr "Autoguardado %s"
|
||||
|
||||
msgid "workspace.versions.autosaved.entry"
|
||||
msgstr "%s versiones de autoguardado"
|
||||
|
||||
msgid "workspace.versions.loading"
|
||||
msgstr "Cargando..."
|
||||
|
||||
msgid "workspace.versions.filter.label"
|
||||
msgstr "Filtro de versiones"
|
||||
|
||||
msgid "workspace.versions.filter.all"
|
||||
msgstr "Todas las versiones"
|
||||
|
||||
msgid "workspace.versions.filter.mine"
|
||||
msgstr "Mis versiones"
|
||||
|
||||
msgid "workspace.versions.filter.user"
|
||||
msgstr "Versiones de %s"
|
||||
|
||||
msgid "workspace.versions.restore-warning"
|
||||
msgstr "¿Quieres restaurar esta versión?"
|
||||
|
||||
msgid "workspace.versions.snapshot-menu"
|
||||
msgstr "Abrir menu de versiones"
|
||||
|
||||
msgid "workspace.versions.version-menu"
|
||||
msgstr "Abrir menu de versiones"
|
||||
|
||||
msgid "workspace.versions.expand-snapshot"
|
||||
msgstr "Expandir versiones"
|
||||
|
||||
msgid "workspace.versions.tab.history"
|
||||
msgstr "Histórico"
|
||||
|
||||
|
|
|
@ -4557,7 +4557,7 @@ __metadata:
|
|||
shadow-cljs: "npm:2.28.18"
|
||||
source-map-support: "npm:^0.5.21"
|
||||
storybook: "npm:^8.4.6"
|
||||
style-dictionary: "npm:4.0.0-prerelease.34"
|
||||
style-dictionary: "npm:4.0.0-prerelease.36"
|
||||
svg-sprite: "npm:^2.0.4"
|
||||
tdigest: "npm:^0.1.2"
|
||||
tinycolor2: "npm:^1.6.0"
|
||||
|
@ -8728,9 +8728,9 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"style-dictionary@npm:4.0.0-prerelease.34":
|
||||
version: 4.0.0-prerelease.34
|
||||
resolution: "style-dictionary@npm:4.0.0-prerelease.34"
|
||||
"style-dictionary@npm:4.0.0-prerelease.36":
|
||||
version: 4.0.0-prerelease.36
|
||||
resolution: "style-dictionary@npm:4.0.0-prerelease.36"
|
||||
dependencies:
|
||||
"@bundled-es-modules/deepmerge": "npm:^4.3.1"
|
||||
"@bundled-es-modules/glob": "npm:^10.3.13"
|
||||
|
@ -8746,7 +8746,7 @@ __metadata:
|
|||
tinycolor2: "npm:^1.6.0"
|
||||
bin:
|
||||
style-dictionary: bin/style-dictionary.js
|
||||
checksum: 10c0/775d00c0e6aec7749dd5554c448550bc0793aaff9ab028d61ba219476ffa827d3e11866d326c34a27d3e848156b885e476beaade0909fe6b174a50e857dd5009
|
||||
checksum: 10c0/8707b3cced5ee7a858c425b296b53f3b9055f388839ab77ec94f9ed012ca99db43ce28fb540cec1659b92680a2769b1ed24d9af891ea98b9b298895341781f30
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
|
50
run-ci.sh
Executable file
50
run-ci.sh
Executable file
|
@ -0,0 +1,50 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "################ test common ################"
|
||||
cd common
|
||||
yarn install
|
||||
yarn run fmt:clj:check
|
||||
yarn run lint:clj
|
||||
clojure -M:dev:test
|
||||
yarn run test
|
||||
cd ..
|
||||
|
||||
echo "################ test frontend ################"
|
||||
cd frontend
|
||||
yarn install
|
||||
yarn run fmt:clj:check
|
||||
yarn run fmt:js:check
|
||||
yarn run lint:scss
|
||||
yarn run lint:clj
|
||||
yarn run test
|
||||
cd ..
|
||||
|
||||
echo "################ test integration ################"
|
||||
cd frontend
|
||||
yarn install
|
||||
yarn run test:e2e -x --workers=4
|
||||
cd ..
|
||||
|
||||
echo "################ test backend ################"
|
||||
cd backend
|
||||
yarn install
|
||||
yarn run fmt:clj:check
|
||||
yarn run lint:clj
|
||||
clojure -M:dev:test --reporter kaocha.report/documentation
|
||||
cd ..
|
||||
|
||||
echo "################ test exporter ################"
|
||||
cd exporter
|
||||
yarn install
|
||||
yarn run fmt:clj:check
|
||||
yarn run lint:clj
|
||||
cd ..
|
||||
|
||||
echo "################ test render-wasm ################"
|
||||
cd render-wasm
|
||||
cargo fmt --check
|
||||
./test
|
||||
cd ..
|
||||
|
Loading…
Add table
Reference in a new issue