-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build(deps): update dependency @tokens-studio/sd-transforms to v1 #10618
base: dev
Are you sure you want to change the base?
Conversation
|
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
4b8e299
to
3db5a09
Compare
3c1dcce
to
a37337e
Compare
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
a37337e
to
1ace631
Compare
1ace631
to
7e8aefb
Compare
This PR contains the following updates:
0.12.2
->1.2.8
Release Notes
tokens-studio/sd-transforms (@tokens-studio/sd-transforms)
v1.2.8
Compare Source
Patch Changes
5de4025
: Addressed issue #316 about letterSpacing. LetterSpacing is no longer a dimension token. Also, the expand composition test token has been modify to test if the letterSpacing still works properly.v1.2.7
Compare Source
Patch Changes
fb3c7d3
: Export TransformOption type to be publicly available (#319)26cf7f9
: -Made the font weight case insensitive; Extra checks for style and weight values, confusions cleared up in the code; Font style and value are not both mandatory, it is fine if only one is specified; If font style is not provided, the style field will take the weight value; The bug from issue #267 is fixed.v1.2.6
Compare Source
Patch Changes
b4461f4
: Ensure that shadow value is still of type object (either Object or Array) before attempting to resolve math for each property/item.v1.2.5
Compare Source
Patch Changes
61af02f
: Check for color transforms that the value is of type string, since other color object types could occur from previously ran transforms.v1.2.4
Compare Source
Patch Changes
b9aee1e
: Fix lineHeight transform to keep numbers as numbers, and not stringify them.v1.2.3
Compare Source
Patch Changes
1085fe8
: Improve math compute utility to better deal with mixed units computations. Expand on tests.v1.2.2
Compare Source
Patch Changes
0dea2af
: fix: evaluate math expressions with units4fe336f
: Override lineHeight expandTypesMap from SD. Add letterSpacing override. This is needed for our lineHeight and letterSpacing transforms to apply.v1.2.1
Compare Source
Patch Changes
c6c9223
: Add composition to expandTypesMap.19f4530
: Fix alwaysAddFontStyle option to not apply to tokens of type fontWeight(s), only meant for typography tokens.32c2d13
: textCase and textDecoration types should be kept, instead of changing to "other". This should help with transforms targeting those tokens, whereas "other" is not a useful type conversion whatsoever.3a044ed
: Remove the boxShadow expandTypesMap, this is no longer needed since SD 4.0.1 as it runs user defined preprocessors before expanding tokens.v1.2.0
Compare Source
Minor Changes
ff31df8
: Add lineHeight and fontWeight types to the expandTypesMap. Even though DTCG spec does not yet recognize them, they really are special types and marking them as such enables transforms to target them specifically.ff31df8
: Properly split fontWeight tokens that contain fontStyle into the parent group. For typography tokens this was correct but for fontWeight tokens, collision could occur between the token and its sibling tokens.v1.1.0
Compare Source
Minor Changes
c687817
: Add theoriginalType
property to$extensions.['studio.tokens']
to store the original Tokens Studio token type, when the type is aligned to DTCG types. LetterSpacing transform is the transform in this package that actually needs to use this, because it doesn't want to match all dimension tokens, but it does want to match letterSpacing tokens.ed10715
: Allow changing the resolve math transform amount of decimals to round for using platform optionsmathFractionDigits
, change default value from 3 to 4.Patch Changes
c687817
: Fix alignTypes to also includeborderWidth
,letterSpacing
,paragraphSpacing
andparagraphIndent
and align them todimension
.9c02741
: Fix bug where usesDtcg flag was not passed to resolveReference utility.v1.0.1
Compare Source
Patch Changes
6c7b2ff
: Fix tsconfig to exclude test files and ensure dist folder structure is correct.v1.0.0
Compare Source
Major Changes
67edf4b
: BREAKING:descriptionToComment
transform no longer removes newlines, just turns carriage returns into newlines. Style Dictionary now handles comments with newlines properly in its createPropertyFormatter utility.67edf4b
: BREAKING: Removeexpand
option, composite/object-value tokens must be expanded by using Style Dictionary Expand.67edf4b
: BREAKING: remove CommonJS entrypoint and tools/scripts required to dual publish. Now that Style Dictionary v4 is ESM-only, this library will follow suit.67edf4b
: BREAKING:transformFontWeights
has been renamed totransformFontWeight
for consistency.Apply transforms to object-value (composite) token types:
This also means that all transforms except for description to comment mapping are now transitive transforms, since the math resolve transform must be transitive and all other transforms must apply after the math one.
67edf4b
: BREAKING: remove CSS shorthand transforms for border, typography and shadow. Use the Style Dictionary transforms instead: https://styledictionary.com/reference/hooks/transforms/predefined/#bordercssshorthand.Note that if you're not disabling the
withSDBuiltins
option, thetokens-studio
transformGroup will include the ones in thecss
built-in transformGroup, so you might not notice the fact that they are moved.67edf4b
: - BREAKING: Compatible with Style Dictionary >= v4.0.0. Not compatible with anything below that SD version.registerTransforms
function has been renamed toregister
.transforms
array has been refactored togetTransforms()
, which is a function you should call. Optionally pass in the new platform option as parameter{ platform: 'css' /* or 'compose' */}
tokens-studio
transformGroup will include the platform's Style Dictionary built-in transforms. E.g. if you're registering for platformcss
it will include thecss
transformGroup transforms from Style Dictionary, appended to the Tokens Studio specific transforms. This behavior can be disabled by passing{ withSDBuiltins: false }
.register()
call:register(SD, { platform: 'compose' })
. Default value is'css'
. This means yourtokens-studio
group will be registered for that specific platform.name
to theregister()
call to configure the transformGroup name:register(SD, { name: 'tokens-studio-css' })
. Default value istokens-studio
.Minor Changes
67edf4b
: Adjust add-font-styles parser to also run on tokens of type fontWeight, to create a sibling token for the fontStyle if it is included in the fontWeight token.67edf4b
: Add an adjust-types preprocessor utility that aligns the Tokens Studio types / object-value props with the DTCG ones.v0.16.1
Compare Source
Patch Changes
3ab8d64
: Restructure evaluate math util to support expr eval expressions in combination with regular math.3ab8d64
: Allow math expressions where multiple components contain units, as long as they are still computable.v0.16.0
Compare Source
Minor Changes
5856621
: BREAKING: update to Style Dictionaryv4.0.0-prerelease.27
, set preprocessor name to'tokens-studio'
, which now has to be applied if you want to exclude parent keys, expand composite types or add font style properties to typography values.v0.15.2
Compare Source
Patch Changes
7617f9d
: Pass colorspace to mix modifier, to use the correct color space to mix in.v0.15.1
Compare Source
Patch Changes
000b202
: Update to latest style-dictionary pre.22v0.15.0
Compare Source
Minor Changes
09b1fc0
: BREAKING: remove optionsaddAttributeCTI
&casing
.Since
transformGroup
can now be combined withtransforms
, this is now much easier to accomplish in Style-Dictionary without additional sd-transforms options.Before:
After:
v0.14.4
Compare Source
Patch Changes
41d83fa
: Add "book" to named font weights, converted to 400v0.14.3
Compare Source
Patch Changes
9351782
: Fix expand utility with latest style-dictionary prerelease.16, values would end up undefined due to bad reference resolve.v0.14.2
Compare Source
Patch Changes
d2c1ff6
: Revert back change that throws fatal error for broken references when expanding tokens or adding fontStyle. To keep compatibility with Style-Dictionary v3.See the issue describing the problem and necessary workaround for v3.
d2c1ff6
: Fix fontWeights transformer to allow spaces within fontWeights.v0.14.1
Compare Source
Patch Changes
f5a8b12
: Copy metadata from composite type tokens when expanding.v0.14.0
Compare Source
Minor Changes
03e3819
: Add W3C Design Token Community Group draft spec forward compatibility.v0.13.4
Compare Source
Patch Changes
8bde22d
: Support references in color modifiers now that style-dictionary transformers can defer themselves.771428a
: Fix expanding composition tokens flattening to not occur for certain object values and resulting in [object Object].v0.13.3
Compare Source
Patch Changes
cfc0c3d
: Fix rgba(hex, alpha) regex to allow percentages, add more tests for different types of alpha values.v0.13.2
Compare Source
Patch Changes
3f97dc2
: Remove trailing console logs from previous update.v0.13.1
Compare Source
Patch Changes
7409419
: Use expr-eval-fork to work around a prototype pollution vulnerability in the original package.v0.13.0
Compare Source
Minor Changes
6c95fe4
: BREAKING: remove code that allowed user to not pass StyleDictionary instance to registerTransforms, and grabbed the locally installed StyleDictionary automatically. This seemed like a cool feature at first, but can cause hard to trace bugs if there are multiple installations of style-dictionary (due to incompatible semver).6c95fe4
: Will now use preprocessors instead of parsers when user Style-Dictionary is v4.0.0-prerelease.2 or higher. Fixes an issue with multi-file references not being resolvable when running composite token expansion or add font style utilities.