mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🔧 Add ff for typography composite token
This commit is contained in:
committed by
Andrés Moya
parent
2a5f1f870b
commit
a20bbeff79
@@ -120,6 +120,7 @@
|
|||||||
:tiered-file-data-storage
|
:tiered-file-data-storage
|
||||||
:token-units
|
:token-units
|
||||||
:token-typography-types
|
:token-typography-types
|
||||||
|
:token-typography-composite
|
||||||
:transit-readable-response
|
:transit-readable-response
|
||||||
:user-feedback
|
:user-feedback
|
||||||
;; TODO: remove this flag.
|
;; TODO: remove this flag.
|
||||||
|
|||||||
@@ -84,7 +84,10 @@ const setupTypographyTokensFile = async (page, options = {}) => {
|
|||||||
return setupTokensFile(page, {
|
return setupTokensFile(page, {
|
||||||
file: "workspace/get-file-typography-tokens.json",
|
file: "workspace/get-file-typography-tokens.json",
|
||||||
fileFragment: "workspace/get-file-fragment-typography-tokens.json",
|
fileFragment: "workspace/get-file-fragment-typography-tokens.json",
|
||||||
flags: ["enable-token-typography-types"],
|
flags: [
|
||||||
|
"enable-token-typography-types",
|
||||||
|
"enable-token-typography-composite",
|
||||||
|
],
|
||||||
...options,
|
...options,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -32,9 +32,11 @@
|
|||||||
If `:token-units` is not in cf/flags, number tokens are excluded."
|
If `:token-units` is not in cf/flags, number tokens are excluded."
|
||||||
[tokens-by-type]
|
[tokens-by-type]
|
||||||
(let [token-units? (contains? cf/flags :token-units)
|
(let [token-units? (contains? cf/flags :token-units)
|
||||||
|
token-typography-composite-types? (contains? cf/flags :token-typography-composite)
|
||||||
token-typography-types? (contains? cf/flags :token-typography-types)
|
token-typography-types? (contains? cf/flags :token-typography-types)
|
||||||
all-types (cond-> dwta/token-properties
|
all-types (cond-> dwta/token-properties
|
||||||
(not token-units?) (dissoc :number)
|
(not token-units?) (dissoc :number)
|
||||||
|
(not token-typography-composite-types?) (remove-keys ctt/typography-token-keys)
|
||||||
(not token-typography-types?) (remove-keys ctt/ff-typography-keys))
|
(not token-typography-types?) (remove-keys ctt/ff-typography-keys))
|
||||||
all-types (-> all-types keys seq)]
|
all-types (-> all-types keys seq)]
|
||||||
(loop [empty #js []
|
(loop [empty #js []
|
||||||
|
|||||||
Reference in New Issue
Block a user