5.1.0 (2024-10-20)
-
add color-copy event (910f12c)
Add a new event
copy-color
that is fired once a copy operation succeeded. Its event data is the same as that of thecolor-change
event.
5.0.1 (2023-11-23)
-
cannot find module TypeScript error (577b4b4)
Adds the types field back to the package.json file to prevent the "Cannot find module 'vue-accessible-color-picker' or its corresponding type declarations." error.
5.0.0 (2023-11-23)
- Renames the following CSS custom properties:
--vacp-border-color
→--vacp-color-border
,--vacp-border-width
→--vacp-width-border
,--vacp-color-space-width
→--vacp-width-color-space
,--vacp-focus-color
→--vacp-color-focus
(see README.md for the full list of supported custom properties). - Removes the following CSS custom properties:
--vacp-border
(direct replacement:var(--vacp-width-border) solid var(--vacp-color-border)
),--vacp-focus-outline
(direct replacement:2px solid var(--vacp-color-focus)
). - Changes how color objects provided to the
color
prop 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 thecolor
prop 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 thecolors
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 thecolors
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). - The component, when imported using the default module specifier
vue-accessible-color-picker
, no longer injects styles into the document. How to update: Import the styles either locally inside a Vue single file component'sstyle
block (using@import url('vue-accessible-color-picker/styles');
) or globally in your application's entry point (commonly a main.js file somewhere). - Removes the module specifier
vue-accessible-color-picker/unstyled
. It's no longer needed becausevue-accessible-color-picker
now resolves to a component without styles. How to update: Import fromvue-accessible-color-picker
instead. - Removes the module specifier
vue-accessible-color-picker/types/index.d.ts
. How to update: Import fromvue-accessible-color-picker
instead. - Renames the type
ColorChangeEvent
toColorChangeDetail
.
-
make theming using custom properties easier (e3147aa)
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.
--vacp-focus-color
) can now be done on any ancestor element of.vacp-color-picker
in addition to.vacp-color-picker
itself. For example, you can set--vacp-focus-color: orange
on:root
and it will work.Adds the following CSS custom properties for theming:
--vacp-color-background-input
,--vacp-color-background
,--vacp-color-text-input
,--vacp-color-text
,--vacp-font-family
,--vacp-font-size
(see README.md for the full list of supported custom properties).BREAKING CHANGE: Renames the following CSS custom properties:
--vacp-border-color
→--vacp-color-border
,--vacp-border-width
→--vacp-width-border
,--vacp-color-space-width
→--vacp-width-color-space
,--vacp-focus-color
→--vacp-color-focus
(see README.md for the full list of supported custom properties).BREAKING CHANGE: Removes the following CSS custom properties:
--vacp-border
(direct replacement:var(--vacp-width-border) solid var(--vacp-color-border)
),--vacp-focus-outline
(direct replacement:2px solid var(--vacp-color-focus)
). -
support all angle values as input (3fac65e)
Adds support for the angle value units
deg
,grad
,rad
, andturn
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, stored, and emitted as 90).
-
change color channels to not be constrained to the range [0, 1] (93fce2c)
Changes how color objects are processed (via the
color
prop), stored, and emitted (via thecolor-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
prop 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 thecolor
prop 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 thecolors
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 thecolors
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). -
migrate code base to TypeScript (18a2a98)
Migrates the code base to TypeScript. This required a fundamental change in the build chain as some of the previously used Rollup plugins (
rollup-plugin-vue
,rollup-plugin-typescript
,rollup-plugin-typescript2
) are either not being maintained anymore and/or don't work well with the combination of Vue 3 and TypeScript. The project is now built usingvite
and@vitejs/plugin-vue
(for building the component) andvue-tsc
and@microsoft/api-extractor
(for bundling the type definitions).BREAKING CHANGE: The component, when imported using the default module specifier
vue-accessible-color-picker
, no longer injects styles into the document. How to update: Import the styles either locally inside a Vue single file component'sstyle
block (using@import url('vue-accessible-color-picker/styles');
) or globally in your application's entry point (commonly a main.js file somewhere).BREAKING CHANGE: Removes the module specifier
vue-accessible-color-picker/unstyled
. It's no longer needed becausevue-accessible-color-picker
now resolves to a component without styles. How to update: Import fromvue-accessible-color-picker
instead.BREAKING CHANGE: Removes the module specifier
vue-accessible-color-picker/types/index.d.ts
. How to update: Import fromvue-accessible-color-picker
instead.BREAKING CHANGE: Renames the type
ColorChangeEvent
toColorChangeDetail
.
4.1.4 (2023-08-02)
- not setting box-sizing on the color picker element (651a0fd)
4.1.3 (2023-05-18)
- types being misconfigured in pkg.exports (c56cb99)
4.1.2 (2022-11-18)
- more duplicate ID attributes (fec5ff3)
4.1.1 (2022-11-18)
- duplicate ID attributes (e8b5e00)
4.1.0 (2022-10-06)
- reworks color picker styles (ad9afb8)
4.0.7 (2022-10-06)
4.0.6 (2022-09-02)
- css not being minified (307e46b)
4.0.5 (2022-08-27)
- color picker initializing incorrectly without color prop (065b5b1)
4.0.4 (2022-08-07)
- not always initially setting custom properties (9ec0b64)
4.0.3 (2022-05-30)
- incorrectly reading hex color from prop (9f31c3e)
4.0.2 (2022-05-24)
4.0.1 (2022-05-23)
- showing alpha channel of hex color in wrong scenario (b301c5b)
4.0.0 (2022-04-03)
- dist: make package ES module only (3ab745b)
- dist: Adds
"type": "package"
to the package.json file which indicates that this package is now distributed primarily (and solely) in the ES module format. Previously, the package was distributed in both ES and UMD module formats. Below is a list of the individual breaking changes regarding the package’s exposed module specifiers. If you want to know what module specifiers are, you can read up on the matter in the article “Publishing and consuming ECMAScript modules via packages – the big picture” by Dr. Axel Rauschmayer (https://2ality.com/2022/01/esm-specifiers.html#referring-to-ecmascript-modules-via-specifiers). - dist: Changes the bare module specifiers “vue-accessible-color-picker” and “vue-accessible-color-picker/unstyled” to refer to ES modules instead of UMD modules.
- dist: Removes the bare module specifier “vue-accessible-color-picker/esm”. The same module is now referred to as “vue-accessible-color-picker”.
- dist: Removes the bare module specifier “vue-accessible-color-picker/esm/unstyled”. The same module is now referred to as “vue-accessible-color-picker/unstyled”.
- dist: Removes the bare module specifier “vue-accessible-color-picker/dist/vue-accessible-color-picker-unstyled.js”. Use “vue-accessible-color-picker/unstyled” instead.
3.3.1 (2022-02-14)
3.3.0 (2022-02-05)
- provide untranspiled ES module bundles (ce1dc59)
3.2.0 (2021-12-16)
- add prop for hiding alpha channel (cdfce86)
3.1.0 (2021-12-10)
- convert to script setup syntax (70c59a5)
3.0.1 (2021-11-04)
3.0.0 (2021-03-21)
- improve color prop parsing (8b74dbd)
- types: Removes the
VueAccessibleColorPicker
namespace from types. - Changes the default color format from
'rgb'
to'hsl'
. To upgrade without changing this in your application, you can pass'rgb'
to thedefaultFormat
prop. - Updates browser support on account of using
Object.fromEntries
. Most notably, Edge using the EdgeHTML engine and Safari versions before 12.2 are no longer supported. Please refer to the README.md file for the complete list.
2.1.0 (2021-03-21)
- set different default format via prop (4291e05)
2.0.0 (2021-01-17)
- migrate to Vue.js version 3 (26b8eb2)
- Migrates this package to use and be compatible with Vue.js 3. Upcoming versions of this package therefor no longer support Vue.js 2. Use the new application instance APIs to register components via
app.component
. The README.md file was updated to take these changes into account. Detailed instructions on the the general migration process to Vue.js 3 can be found in the Vue 3 migration guide. - Deprecates global component registration via side effect.
- Renames type
SupportedColorFormat
toColorFormat
. - Removes type
ColorChannel
because it’s not a useful type.
Adds the vue package (vue@^3.x
) as a peer dependency.
Removes some tests from index.test.js because they were testing the behavior of Vue.js itself rather than that of the index.js file.
1.1.2 (2020-12-20)
-
package: bundle dist files (9b15741)
Fixes the dist files missing from the published npm package. It seems that the
files
field in the package.json must not contain paths that start with./
.
1.1.1 (2020-12-20)
Note: This version cannot be used. Use version 1.1.2 instead.
Due to an issue with the package.json file’s files
field, version 1.1.1 does not include the dist files in the published npm package. The issue was fixed in 9b15741 and a new version of the package was released.
-
package: add exports and module fields to package.json (5a9eda3)
Adds the “exports” and “module” fields to the package.json file. Their values refer to the package’s main entry point (i.e.
./dist/vue-accessible-color-picker.js
).
Note: This version cannot be used. Use version 1.1.2 instead.
Due to an issue with the package.json file’s files
field, version 1.1.0 does not include the dist files in the published npm package. The issue was fixed in 9b15741 and a new version of the package was released.
-
types: add basic type definitions (37b425e)
Adds type definitions file index.d.ts within the types directory and moves existing JSDoc-based type definitions into this file.
Points the types field in the package.json file to the newly added type definition file and adds it to the bundled package files.
Configures the project to check JavaScript for TypeScript errors via a jsconfig.json file in the project’s root directory.
Adds type annotations to several parts of the codebase.
-
import: safe-guard Vue.use call (b4b829a)
Adds an additional check to the index.js side effect that causes Vue.use only to be called when it is a function.