Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tokens-studio/sd-transforms

Package Overview
Dependencies
Maintainers
0
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tokens-studio/sd-transforms - npm Package Versions

13
9

1.0.0

Diff

Changelog

Source

1.0.0

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: Remove expand 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 to transformFontWeight for 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 withSDBuiltins option, the tokens-studio transformGroup will include the ones in the css 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.

    • BREAKING: registerTransforms function has been renamed to register.
    • BREAKING: transforms array has been refactored to getTransforms(), 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-studio transformGroup will include the platform's Style Dictionary built-in transforms. E.g. if you're registering for platform css it will include the css transformGroup 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 your tokens-studio group will be registered for that specific platform.
    • Allow passing name to the register() call to configure the transformGroup name: register(SD, { name: 'tokens-studio-css' }). Default value is tokens-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.
jorenbroekema
published 0.16.1 •

Changelog

Source

0.16.1

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.
jorenbroekema
published 0.16.0 •

Changelog

Source

0.16.0

Minor Changes

  • 5856621: BREAKING: update to Style Dictionary v4.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.
jorenbroekema
published 0.15.2 •

Changelog

Source

0.15.2

Patch Changes

  • 7617f9d: Pass colorspace to mix modifier, to use the correct color space to mix in.
jorenbroekema
published 0.15.1 •

Changelog

Source

0.15.1

Patch Changes

  • 000b202: Update to latest style-dictionary pre.22
jorenbroekema
published 0.15.0 •

Changelog

Source

0.15.0

Minor Changes

  • 09b1fc0: BREAKING: remove options addAttributeCTI & casing. Since transformGroup can now be combined with transforms, this is now much easier to accomplish in Style-Dictionary without additional sd-transforms options.

    Before:

    registerTransforms(StyleDictionary, { addAttributeCTI: true, casing: 'kebab' });
    

    After:

    {
      "platforms": {
        "css": {
          "transformGroup": "tokens-studio",
          "transforms": ["attribute/cti", "name/kebab"]
        }
      }
    }
    

    From this version onwards, Style-Dictionary v4.0.0-prerelease.19 minimum is required.

jorenbroekema
published 0.14.4 •

Changelog

Source

0.14.4

Patch Changes

  • 41d83fa: Add "book" to named font weights, converted to 400
jorenbroekema
published 0.14.3 •

Changelog

Source

0.14.3

Patch Changes

  • 9351782: Fix expand utility with latest style-dictionary prerelease.16, values would end up undefined due to bad reference resolve.
jorenbroekema
published 0.14.2 •

Changelog

Source

0.14.2

Patch Changes

jorenbroekema
published 0.14.1 •

Changelog

Source

0.14.1

Patch Changes

  • f5a8b12: Copy metadata from composite type tokens when expanding.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc