Skip to content

Commit

Permalink
chore(release): 3.0.0 [skip ci]
Browse files Browse the repository at this point in the history
## [3.0.0](v2.0.1...v3.0.0) (2023-11-23)

### ⚠ BREAKING CHANGES

* Renames the following CSS custom properties: `--cp-border-color` → `--cp-color-border`, `--cp-border-width` → `--cp-width-border`, `--cp-color-space-width` → `--cp-width-color-space`, `--cp-focus-color` → `--cp-color-focus` (see README.md for the full list of supported custom properties).
* Removes the following CSS custom properties: `--cp-border` (direct replacement: `var(--cp-width-border) solid var(--cp-color-border)`), `--cp-focus-outline` (direct replacement: `2px solid var(--cp-color-focus)`).
* Removes the module specifier `yet-another-color-picker/dist/ColorPicker.css`. **How to update**: Use `yet-another-color-picker/styles` instead.
* Removes the module specifier `yet-another-color-picker/dist/ColorPicker.d.ts`. **How to update**: Import from `yet-another-color-picker` instead.
* Changes how color objects provided to the `color` property are handled. Color objects no longer use values that are constrained to the range [0, 1] (except for any alpha channel values). **How to update**: Multiply any value of objects you pass to the `color` property by the number in parentheses corresponding to the right color channel: For HSL: h (360), s (100), l (100). For HWB: h (360), w (100), b (100). For RGB: r (255), g (255), b (255).
* Changes the data emitted by the `color-change` event such that the values on the `colors` object are no longer constrained to the range [0, 1] (except for any alpha channel values). **How to update**: Divide any value of objects from the `colors` object you mkae use of by the number in parentheses corresponding to the right color channel: For HSL: h (360), s (100), l (100). For HWB: h (360), w (100), b (100). For RGB: r (255), g (255), b (255).

### Features

* feat: add module specifier yet-another-color-picker/styles ([17fee1d](17fee1d))

  Adds the module specifier `yet-another-color-picker/styles` which resolves to the color picker styles (i.e. `dist/ColorPicker.css`).

  **BREAKING CHANGE**: Removes the module specifier `yet-another-color-picker/dist/ColorPicker.css`. **How to update**: Use `yet-another-color-picker/styles` instead.

* feat: make theming using custom properties easier ([0c1d5b6](0c1d5b6))

  Simplifies theming of the color picker GUI with CSS custom properties by making better use of the CSS cascade. Customizing the custom properties (e.g. `--cp-focus-color`) can now be done on any ancestor element of `.cp-color-picker` in addition to `.cp-color-picker` itself. For example, you can set `--cp-focus-color: orange` on `:root` and it will work.

  Adds the following CSS custom properties for theming: `--cp-color-background-input`, `--cp-color-background`, `--cp-color-text-input`, `--cp-color-text`, `--cp-font-family`, `--cp-font-size` (see README.md for the full list of supported custom properties).

  **BREAKING CHANGE**: Renames the following CSS custom properties: `--cp-border-color` → `--cp-color-border`, `--cp-border-width` → `--cp-width-border`, `--cp-color-space-width` → `--cp-width-color-space`, `--cp-focus-color` → `--cp-color-focus` (see README.md for the full list of supported custom properties).

  **BREAKING CHANGE**: Removes the following CSS custom properties: `--cp-border` (direct replacement: `var(--cp-width-border) solid var(--cp-color-border)`), `--cp-focus-outline` (direct replacement: `2px solid var(--cp-color-focus)`).

* feat: support all angle values as input ([ec7944e](ec7944e))

  Adds support for the angle value units `deg`, `grad`, `rad`, and `turn` when entering hues (see https://www.w3.org/TR/css-values-4/#angle-value).

  Stops normalizing angle values to the range [0, 360) (e.g. a hue value of 450 will no longer be processed as 90).

### Bug Fixes

* fix: color property being listed as accepting ColorHsv ([c4084a8](c4084a8))

* fix: integers with trailing zeros being incorrectly rounded ([a7ec5cf](a7ec5cf))

  Fixes cases where integers would be incorrectly rounded and lose their trailing zeros (only affects representation of color values as CSS color strings, e.g. when copying).

### Miscellaneous Chores

* chore: remove dist/ColorPicker.d.ts module specifier ([c21138f](c21138f))

  **BREAKING CHANGE**: Removes the module specifier `yet-another-color-picker/dist/ColorPicker.d.ts`. **How to update**: Import from `yet-another-color-picker` instead.

### Code Refactoring

* refactor: change color channels to not be constrained to the range [0, 1] ([6161e74](6161e74))

  Changes how color objects are processed (via the `color` property), stored, and emitted (via the `color-change` event) such that the representation of the current color doesn't have its values constrained to the range [0, 1] (inclusive) anymore. Instead, the values are now stored as close as possible to the native representation in CSS (e.g. the hue value 270 is now stored as 270 instead of 0.75). Alpha channel values continue to be stored in the range [0, 1].

  **BREAKING CHANGE**: Changes how color objects provided to the `color` property are handled. Color objects no longer use values that are constrained to the range [0, 1] (except for any alpha channel values). **How to update**: Multiply any value of objects you pass to the `color` property by the number in parentheses corresponding to the right color channel: For HSL: h (360), s (100), l (100). For HWB: h (360), w (100), b (100). For RGB: r (255), g (255), b (255).

  **BREAKING CHANGE**: Changes the data emitted by the `color-change` event such that the values on the `colors` object are no longer constrained to the range [0, 1] (except for any alpha channel values). **How to update**: Divide any value of objects from the `colors` object you mkae use of by the number in parentheses corresponding to the right color channel: For HSL: h (360), s (100), l (100). For HWB: h (360), w (100), b (100). For RGB: r (255), g (255), b (255).
  • Loading branch information
semantic-release-bot committed Nov 23, 2023
1 parent 23951aa commit 2ff63b4
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 3 deletions.
79 changes: 79 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,82 @@
## [3.0.0](https://github.com/kleinfreund/yet-another-color-picker/compare/v2.0.1...v3.0.0) (2023-11-23)


### ⚠ BREAKING CHANGES

* Renames the following CSS custom properties: `--cp-border-color``--cp-color-border`, `--cp-border-width``--cp-width-border`, `--cp-color-space-width``--cp-width-color-space`, `--cp-focus-color``--cp-color-focus` (see README.md for the full list of supported custom properties).
* Removes the following CSS custom properties: `--cp-border` (direct replacement: `var(--cp-width-border) solid var(--cp-color-border)`), `--cp-focus-outline` (direct replacement: `2px solid var(--cp-color-focus)`).
* Removes the module specifier `yet-another-color-picker/dist/ColorPicker.css`. **How to update**: Use `yet-another-color-picker/styles` instead.
* Removes the module specifier `yet-another-color-picker/dist/ColorPicker.d.ts`. **How to update**: Import from `yet-another-color-picker` instead.
* Changes how color objects provided to the `color` property are handled. Color objects no longer use values that are constrained to the range [0, 1] (except for any alpha channel values). **How to update**: Multiply any value of objects you pass to the `color` property by the number in parentheses corresponding to the right color channel: For HSL: h (360), s (100), l (100). For HWB: h (360), w (100), b (100). For RGB: r (255), g (255), b (255).
* Changes the data emitted by the `color-change` event such that the values on the `colors` object are no longer constrained to the range [0, 1] (except for any alpha channel values). **How to update**: Divide any value of objects from the `colors` object you mkae use of by the number in parentheses corresponding to the right color channel: For HSL: h (360), s (100), l (100). For HWB: h (360), w (100), b (100). For RGB: r (255), g (255), b (255).

### Features

* feat: add module specifier yet-another-color-picker/styles ([17fee1d13ed72c7ce0fa589b7e30965c713c1d08](https://github.com/kleinfreund/yet-another-color-picker/commit/17fee1d13ed72c7ce0fa589b7e30965c713c1d08))

Adds the module specifier `yet-another-color-picker/styles` which resolves to the color picker styles (i.e. `dist/ColorPicker.css`).



**BREAKING CHANGE**: Removes the module specifier `yet-another-color-picker/dist/ColorPicker.css`. **How to update**: Use `yet-another-color-picker/styles` instead.

* feat: make theming using custom properties easier ([0c1d5b6b5f53a0c068b71a0e8517402fbd50c458](https://github.com/kleinfreund/yet-another-color-picker/commit/0c1d5b6b5f53a0c068b71a0e8517402fbd50c458))

Simplifies theming of the color picker GUI with CSS custom properties by making better use of the CSS cascade. Customizing the custom properties (e.g. `--cp-focus-color`) can now be done on any ancestor element of `.cp-color-picker` in addition to `.cp-color-picker` itself. For example, you can set `--cp-focus-color: orange` on `:root` and it will work.


Adds the following CSS custom properties for theming: `--cp-color-background-input`, `--cp-color-background`, `--cp-color-text-input`, `--cp-color-text`, `--cp-font-family`, `--cp-font-size` (see README.md for the full list of supported custom properties).



**BREAKING CHANGE**: Renames the following CSS custom properties: `--cp-border-color``--cp-color-border`, `--cp-border-width``--cp-width-border`, `--cp-color-space-width``--cp-width-color-space`, `--cp-focus-color``--cp-color-focus` (see README.md for the full list of supported custom properties).


**BREAKING CHANGE**: Removes the following CSS custom properties: `--cp-border` (direct replacement: `var(--cp-width-border) solid var(--cp-color-border)`), `--cp-focus-outline` (direct replacement: `2px solid var(--cp-color-focus)`).

* feat: support all angle values as input ([ec7944ed4a50c303ababcf4084f7ed4214a6a731](https://github.com/kleinfreund/yet-another-color-picker/commit/ec7944ed4a50c303ababcf4084f7ed4214a6a731))

Adds support for the angle value units `deg`, `grad`, `rad`, and `turn` when entering hues (see https://www.w3.org/TR/css-values-4/#angle-value).


Stops normalizing angle values to the range [0, 360) (e.g. a hue value of 450 will no longer be processed as 90).




### Bug Fixes

* fix: color property being listed as accepting ColorHsv ([c4084a8b24ee118efef772f5fa6c4b756f731489](https://github.com/kleinfreund/yet-another-color-picker/commit/c4084a8b24ee118efef772f5fa6c4b756f731489))

* fix: integers with trailing zeros being incorrectly rounded ([a7ec5cf20a8d477f332df1f5a3a679edfa5a043d](https://github.com/kleinfreund/yet-another-color-picker/commit/a7ec5cf20a8d477f332df1f5a3a679edfa5a043d))

Fixes cases where integers would be incorrectly rounded and lose their trailing zeros (only affects representation of color values as CSS color strings, e.g. when copying).




### Miscellaneous Chores

* chore: remove dist/ColorPicker.d.ts module specifier ([c21138f00089b4927de5fff482bbaa0b211e8db0](https://github.com/kleinfreund/yet-another-color-picker/commit/c21138f00089b4927de5fff482bbaa0b211e8db0))


**BREAKING CHANGE**: Removes the module specifier `yet-another-color-picker/dist/ColorPicker.d.ts`. **How to update**: Import from `yet-another-color-picker` instead.



### Code Refactoring

* refactor: change color channels to not be constrained to the range [0, 1] ([6161e746ecf98b062a4b68b7c6512f65e4c286dc](https://github.com/kleinfreund/yet-another-color-picker/commit/6161e746ecf98b062a4b68b7c6512f65e4c286dc))

Changes how color objects are processed (via the `color` property), stored, and emitted (via the `color-change` event) such that the representation of the current color doesn't have its values constrained to the range [0, 1] (inclusive) anymore. Instead, the values are now stored as close as possible to the native representation in CSS (e.g. the hue value 270 is now stored as 270 instead of 0.75). Alpha channel values continue to be stored in the range [0, 1].



**BREAKING CHANGE**: Changes how color objects provided to the `color` property are handled. Color objects no longer use values that are constrained to the range [0, 1] (except for any alpha channel values). **How to update**: Multiply any value of objects you pass to the `color` property by the number in parentheses corresponding to the right color channel: For HSL: h (360), s (100), l (100). For HWB: h (360), w (100), b (100). For RGB: r (255), g (255), b (255).


**BREAKING CHANGE**: Changes the data emitted by the `color-change` event such that the values on the `colors` object are no longer constrained to the range [0, 1] (except for any alpha channel values). **How to update**: Divide any value of objects from the `colors` object you mkae use of by the number in parentheses corresponding to the right color channel: For HSL: h (360), s (100), l (100). For HWB: h (360), w (100), b (100). For RGB: r (255), g (255), b (255).

## [2.0.1](https://github.com/kleinfreund/yet-another-color-picker/compare/v2.0.0...v2.0.1) (2023-08-03)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yet-another-color-picker",
"version": "2.0.1",
"version": "3.0.0",
"license": "MIT",
"description": "Color picker web component",
"author": {
Expand Down

0 comments on commit 2ff63b4

Please sign in to comment.