From 57431ece469b903b673486cc139f5014febe8cb0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 13:29:16 +0200 Subject: [PATCH] Version Packages (#284) Co-authored-by: github-actions[bot] --- .changeset/four-shoes-peel.md | 5 ----- .changeset/giant-days-smash.md | 5 ----- .changeset/good-ties-sell.md | 5 ----- .changeset/new-points-jam.md | 5 ----- .changeset/odd-phones-fail.md | 14 ------------ .changeset/polite-cobras-arrive.md | 7 ------ .changeset/twelve-icons-wait.md | 5 ----- .changeset/yellow-nails-live.md | 15 ------------- CHANGELOG.md | 35 ++++++++++++++++++++++++++++++ package.json | 2 +- 10 files changed, 36 insertions(+), 62 deletions(-) delete mode 100644 .changeset/four-shoes-peel.md delete mode 100644 .changeset/giant-days-smash.md delete mode 100644 .changeset/good-ties-sell.md delete mode 100644 .changeset/new-points-jam.md delete mode 100644 .changeset/odd-phones-fail.md delete mode 100644 .changeset/polite-cobras-arrive.md delete mode 100644 .changeset/twelve-icons-wait.md delete mode 100644 .changeset/yellow-nails-live.md diff --git a/.changeset/four-shoes-peel.md b/.changeset/four-shoes-peel.md deleted file mode 100644 index 3194a81..0000000 --- a/.changeset/four-shoes-peel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tokens-studio/sd-transforms': minor ---- - -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. diff --git a/.changeset/giant-days-smash.md b/.changeset/giant-days-smash.md deleted file mode 100644 index 39e9161..0000000 --- a/.changeset/giant-days-smash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tokens-studio/sd-transforms': major ---- - -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. diff --git a/.changeset/good-ties-sell.md b/.changeset/good-ties-sell.md deleted file mode 100644 index 5f26c4d..0000000 --- a/.changeset/good-ties-sell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tokens-studio/sd-transforms': major ---- - -BREAKING: Remove `expand` option, composite/object-value tokens must be expanded by using [Style Dictionary Expand](https://v4.styledictionary.com/reference/config/#expand). diff --git a/.changeset/new-points-jam.md b/.changeset/new-points-jam.md deleted file mode 100644 index c63ed2c..0000000 --- a/.changeset/new-points-jam.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tokens-studio/sd-transforms': major ---- - -BREAKING: remove CommonJS entrypoint and tools/scripts required to dual publish. Now that Style Dictionary v4 is ESM-only, this library will follow suit. diff --git a/.changeset/odd-phones-fail.md b/.changeset/odd-phones-fail.md deleted file mode 100644 index 536aa1d..0000000 --- a/.changeset/odd-phones-fail.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@tokens-studio/sd-transforms': major ---- - -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. diff --git a/.changeset/polite-cobras-arrive.md b/.changeset/polite-cobras-arrive.md deleted file mode 100644 index 5a9ede5..0000000 --- a/.changeset/polite-cobras-arrive.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@tokens-studio/sd-transforms': major ---- - -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. diff --git a/.changeset/twelve-icons-wait.md b/.changeset/twelve-icons-wait.md deleted file mode 100644 index 23b318e..0000000 --- a/.changeset/twelve-icons-wait.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tokens-studio/sd-transforms': minor ---- - -Add an adjust-types preprocessor utility that aligns the Tokens Studio types / object-value props with the DTCG ones. diff --git a/.changeset/yellow-nails-live.md b/.changeset/yellow-nails-live.md deleted file mode 100644 index ee12460..0000000 --- a/.changeset/yellow-nails-live.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@tokens-studio/sd-transforms': major ---- - -- 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`. diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d501ce..07c40b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ # @tokens-studio/sd-transforms +## 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](https://v4.styledictionary.com/reference/config/#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. + ## 0.16.1 ### Patch Changes diff --git a/package.json b/package.json index eb097ae..13ea337 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tokens-studio/sd-transforms", - "version": "0.16.1", + "version": "1.0.0", "description": "Custom transforms for Style-Dictionary, to work with Design Tokens that are exported from Tokens Studio", "license": "MIT", "author": "Joren Broekema ",