Releases: tokens-studio/sd-transforms
v1.2.4
v1.2.3
v1.2.2
v1.2.1
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
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
Minor Changes
- c687817: Add the 
originalTypeproperty 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 options 
mathFractionDigits, change default value from 3 to 4. 
Patch Changes
v1.0.1
v1.0.0
Major Changes
- 
67edf4b: BREAKING:
descriptionToCommenttransform no longer removes newlines, just turns carriage returns into newlines. Style Dictionary now handles comments with newlines properly in its createPropertyFormatter utility. - 
67edf4b: BREAKING: Remove
expandoption, 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:
transformFontWeightshas been renamed totransformFontWeightfor consistency.Apply transforms to object-value (composite) token types:
- HEXRGBa transform applies to border and shadow colors
 - Px dimension transform applies to border, typography and shadow dimensions
 - Letterspacing, lineheights and fontweights transforms apply to these respective typography properties
 - Resolve math transform applies to all properties of border, typography and shadow tokens
 
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
withSDBuiltinsoption, thetokens-studiotransformGroup will include the ones in thecssbuilt-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.
- BREAKING: 
registerTransformsfunction has been renamed toregister. - BREAKING: 
transformsarray has been refactored togetTransforms(), which is a function you should call. Optionally pass in the new platform option as parameter{ platform: 'css' /* or 'compose' */} - BREAKING: By default, registered 
tokens-studiotransformGroup will include the platform's Style Dictionary built-in transforms. E.g. if you're registering for platformcssit will include thecsstransformGroup transforms from Style Dictionary, appended to the Tokens Studio specific transforms. This behavior can be disabled by passing{ withSDBuiltins: false }. - Allow passing platform to the 
register()call:register(SD, { platform: 'compose' }). Default value is'css'. This means yourtokens-studiogroup will be registered for that specific platform. - Allow passing 
nameto theregister()call to configure the transformGroup name:register(SD, { name: 'tokens-studio-css' }). Default value istokens-studio. 
 - BREAKING: