Skip to content

Commit ae9d39a

Browse files
committed
build(build): v3.0.6
1 parent dfae127 commit ae9d39a

File tree

5 files changed

+19
-23
lines changed

5 files changed

+19
-23
lines changed

lib/dist/color-gradient-picker-vue3.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/dist/color-gradient-picker-vue3.es.js

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@ const config = {
13411341
defaultColor: "rgba(175, 51, 242, 1)",
13421342
defaultGradient: "linear-gradient(90deg, rgb(245, 66, 245) 0%, rgb(0, 0, 255) 100%)"
13431343
};
1344-
const fakePresets = [
1344+
const presetColors = [
13451345
"rgba(0,0,0,1)",
13461346
"rgba(128,128,128, 1)",
13471347
"rgba(192,192,192, 1)",
@@ -2528,10 +2528,14 @@ function useColor() {
25282528
gradientType.value = GradientType.radial;
25292529
};
25302530
const init = (data, cb) => {
2531+
var _a;
25312532
Object.assign(colorState, data);
25322533
colorState.width = data.width <= 320 ? 304 : data.width - 16;
25332534
colorState.height = data.width;
25342535
onChange = cb;
2536+
if (colorState.presetColors && ((_a = colorState.presetColors) == null ? void 0 : _a.length) > 18) {
2537+
colorState.presetColors.length = 18;
2538+
}
25352539
if (colorState.value) {
25362540
const isGradient2 = getIsGradient(colorState.value);
25372541
colorState.inputType = InputType.rgb;
@@ -3044,7 +3048,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
30443048
onClick: _cache[0] || (_cache[0] = //@ts-ignore
30453049
(...args) => unref(handleUpdateValue) && unref(handleUpdateValue)(...args))
30463050
}, [
3047-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(fakePresets), (color, idx) => {
3051+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(colorState2).presetColors, (color, idx) => {
30483052
return openBlock(), createElementBlock("span", {
30493053
key: color + idx,
30503054
class: "cpg-preview-presetItem",
@@ -3769,6 +3773,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37693773
type: String,
37703774
default: "rgba(175, 51, 242, 1)"
37713775
},
3776+
width: {
3777+
type: Number,
3778+
default: 300
3779+
},
37723780
hideInputs: {
37733781
type: Boolean,
37743782
default: false
@@ -3777,27 +3785,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37773785
type: Boolean,
37783786
default: false
37793787
},
3780-
hidePresets: {
3781-
type: Boolean,
3782-
default: false
3783-
},
3784-
hideColorGuide: {
3785-
type: Boolean,
3786-
default: false
3787-
},
37883788
hideGradient: {
37893789
type: Boolean,
37903790
default: false
37913791
},
3792-
width: {
3793-
type: Number,
3794-
default: 300
3795-
},
3796-
disableDarkMode: {
3797-
type: Boolean,
3798-
default: false
3792+
presetColors: {
3793+
type: Array,
3794+
default: () => presetColors
37993795
},
3800-
disableLightMode: {
3796+
hidePresets: {
38013797
type: Boolean,
38023798
default: false
38033799
}

lib/dist/color-gradient-picker-vue3.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "color-gradient-picker-vue3",
3-
"version": "3.0.5",
3+
"version": "3.0.6",
44
"type": "module",
55
"author": "June",
66
"description": "Color and gradient picker for vue3.js",
@@ -31,7 +31,7 @@
3131
"require": "./dist/color-gradient-picker-vue3.umd.js",
3232
"import": "./dist/color-gradient-picker-vue3.es.js"
3333
},
34-
"./dist/style.css": "./dist/style.css"
34+
"./dist/style.css": "./dist/color-gradient-picker-vue3.css"
3535
},
3636
"scripts": {
3737
"dev": "vite",

lib/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @Description:
44
* @Date: 2023-04-11 11:17:35
55
* @LastEditors: June
6-
* @LastEditTime: 2024-12-13 17:59:08
6+
* @LastEditTime: 2024-12-22 12:46:23
77
*/
88
import type { ConfigEnv, UserConfigExport } from 'vite'
99
import vueJsx from '@vitejs/plugin-vue-jsx'

0 commit comments

Comments
 (0)