Skip to content

Releases: amzn/style-dictionary

v4.0.0-prerelease.37

17 Jun 19:36
17985e5
Compare
Choose a tag to compare
v4.0.0-prerelease.37 Pre-release
Pre-release

Minor Changes

  • 8450a45: Some fixes for Expand utility:

    • Array values such as dashArray property of strokeStyle tokens no longer get expanded unintentionally, typeof 'object' check changed to isPlainObject check.
    • Nested object-value tokens (such as style property inside border tokens) will now also be expanded.
    • When references are involved during expansion, the resolved value is used when the property is an object, if not, then we keep the reference as is.
      This is because if the reference is to an object value, the expansion might break the reference.

v4.0.0-prerelease.36

16 Jun 10:39
fdb308a
Compare
Choose a tag to compare
v4.0.0-prerelease.36 Pre-release
Pre-release

Minor Changes

  • 39f0220: Allow not throwing fatal errors on broken token references/aliases, but console.error instead.

    You can also configure this on global/platform log property:

    {
      "log": {
        "errors": {
          "brokenReferences": "console"
        }
      }
    }

    This setting defaults to "error" when not configured.

    resolveReferences and getReferences warnImmediately option is set to true which causes an error to be thrown/warned immediately by default, which can be configured to false if you know those utils are running in the transform/format hooks respectively, where the errors are collected and grouped, then thrown as 1 error/warning instead of multiple.

    Some minor grammatical improvements to some of the error logs were also done.

v4.0.0-prerelease.35

11 Jun 08:24
1b8bdff
Compare
Choose a tag to compare
v4.0.0-prerelease.35 Pre-release
Pre-release

Minor Changes

  • c06661d: Re-add and update example basic, fix copySync command in CLI, fix android templates to use $type for DTCG tokens.

v4.0.0-prerelease.34

04 Jun 12:12
344cf66
Compare
Choose a tag to compare
v4.0.0-prerelease.34 Pre-release
Pre-release

Patch Changes

  • ba03ee9: Fix for expand utility on platform level to adjust the token's path property.

v4.0.0-prerelease.33

04 Jun 09:20
6560456
Compare
Choose a tag to compare
v4.0.0-prerelease.33 Pre-release
Pre-release

Minor Changes

  • 261a2cb: Handle transition timingFunction prop in cubicBezier/css transform. Handle typography fontFamily prop in fontFamily/css transform.

Patch Changes

  • 261a2cb: Allow border type tokens to be empty, every property is optional.

v4.0.0-prerelease.32

30 May 16:50
04c3377
Compare
Choose a tag to compare
v4.0.0-prerelease.32 Pre-release
Pre-release

Minor Changes

  • af5cc94: Create formatPlatform and formatAllPlatforms methods.
    This will return the outputs and destinations from the format hook for your dictionary, without building these outputs and persisting them to the filesystem.
    Additionally, formats can now return any data type instead of requiring it to be a string and destination property in files is now optional.
    This allows users to create formats intended for only formatting tokens and letting users do stuff with it during runtime rather than writing to files.

Patch Changes

  • 2335f13: Allow using registerHook methods to override hooks that are already registered with the same name.
  • 6e226aa: Pass the original ref path to the getReferences util result tokens.
  • 3f09277: Pass dictionary options to preprocessor functions.

v4.0.0-prerelease.31

29 May 14:43
a2ecdf0
Compare
Choose a tag to compare
v4.0.0-prerelease.31 Pre-release
Pre-release

Patch Changes

  • c708325: Moving the @zip.js/zip.js dependency from a devDependency to a normal dependency.

v4.0.0-prerelease.30

23 May 11:44
aeca085
Compare
Choose a tag to compare
v4.0.0-prerelease.30 Pre-release
Pre-release

Minor Changes

  • 7418c97: Add a couple of utilities for converting a regular Style Dictionary tokens object/file(s) to DTCG formatted tokens:

    • convertToDTCG
    • convertJSONToDTCG
    • convertZIPToDTCG

    Documentation of these utilities

v4.0.0-prerelease.29

17 May 11:52
9d61dcd
Compare
Choose a tag to compare
v4.0.0-prerelease.29 Pre-release
Pre-release

Minor Changes

  • cb94554: 'size/rem' transform to not transform tokens that already have a unit, such as "4px", this should not be transformed to "4rem".

Patch Changes

  • cb94554: Fix typeDtcgDelegate util $type property position to be allowed anywhere in the object, not just at the top.
  • 0972b26: Pass SD options to fileheaders and filters, to make it easier to use and adjust according to config or options like usesDTCG.
  • 4ec34fd: Pass options to all of the filter functions in our built-in transforms, to check for usesDTCG and $type property.
  • 0972b26: Add unfilteredAllTokens property in dictionary object for formats, which is an unfiltered version of allTokens property, or a flattened version of the unfilteredTokens property.

v4.0.0-prerelease.28

14 May 11:46
a140902
Compare
Choose a tag to compare
v4.0.0-prerelease.28 Pre-release
Pre-release

Minor Changes

  • 4225d78: Added the following transforms for CSS, and added them to the scss, css and less transformGroups:

    • fontFamily/css -> wraps font names with spaces in ' quotes
    • cubicBezier/css -> array value, put inside cubic-bezier() CSS function
    • strokeStyle/css/shorthand -> object value, transform to CSS shorthand
    • border/css/shorthand -> object value, transform to CSS shorthand
    • typography/css/shorthand -> object value, transform to CSS shorthand
    • transition/css/shorthand -> object value, transform to CSS shorthand
    • shadow/css/shorthand -> object value (or array of objects), transform to CSS shorthand

    The main intention here is to ensure that Style Dictionary is compliant with DTCG draft specification out of the box with regards to exporting to CSS, where object-value tokens are not supported without transforming them to shorthands (or expanding them, which is a different feature that was added in 4.0.0-prerelease.27).

Patch Changes

  • a5bafac: Colors that are not recognized by tinycolor2 as valid color formats (e.g. linear-gradient(...)) are now ignored by the builtin color transforms filter functions.