chore(deps): update dependency @tokens-studio/sd-transforms to v1 #3332
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.16.1
->1.2.0
Release Notes
tokens-studio/sd-transforms (@tokens-studio/sd-transforms)
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.Configuration
📅 Schedule: Branch creation - "before 4am on the first day of the month" in timezone Europe/Zurich, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.