Skip to content

Commit

Permalink
build(build): v3.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiu-Jun committed Dec 22, 2024
1 parent dfae127 commit ae9d39a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion lib/dist/color-gradient-picker-vue3.css

Large diffs are not rendered by default.

32 changes: 14 additions & 18 deletions lib/dist/color-gradient-picker-vue3.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ const config = {
defaultColor: "rgba(175, 51, 242, 1)",
defaultGradient: "linear-gradient(90deg, rgb(245, 66, 245) 0%, rgb(0, 0, 255) 100%)"
};
const fakePresets = [
const presetColors = [
"rgba(0,0,0,1)",
"rgba(128,128,128, 1)",
"rgba(192,192,192, 1)",
Expand Down Expand Up @@ -2528,10 +2528,14 @@ function useColor() {
gradientType.value = GradientType.radial;
};
const init = (data, cb) => {
var _a;
Object.assign(colorState, data);
colorState.width = data.width <= 320 ? 304 : data.width - 16;
colorState.height = data.width;
onChange = cb;
if (colorState.presetColors && ((_a = colorState.presetColors) == null ? void 0 : _a.length) > 18) {
colorState.presetColors.length = 18;
}
if (colorState.value) {
const isGradient2 = getIsGradient(colorState.value);
colorState.inputType = InputType.rgb;
Expand Down Expand Up @@ -3044,7 +3048,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
onClick: _cache[0] || (_cache[0] = //@ts-ignore
(...args) => unref(handleUpdateValue) && unref(handleUpdateValue)(...args))
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(fakePresets), (color, idx) => {
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(colorState2).presetColors, (color, idx) => {
return openBlock(), createElementBlock("span", {
key: color + idx,
class: "cpg-preview-presetItem",
Expand Down Expand Up @@ -3769,6 +3773,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
type: String,
default: "rgba(175, 51, 242, 1)"
},
width: {
type: Number,
default: 300
},
hideInputs: {
type: Boolean,
default: false
Expand All @@ -3777,27 +3785,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
type: Boolean,
default: false
},
hidePresets: {
type: Boolean,
default: false
},
hideColorGuide: {
type: Boolean,
default: false
},
hideGradient: {
type: Boolean,
default: false
},
width: {
type: Number,
default: 300
},
disableDarkMode: {
type: Boolean,
default: false
presetColors: {
type: Array,
default: () => presetColors
},
disableLightMode: {
hidePresets: {
type: Boolean,
default: false
}
Expand Down
2 changes: 1 addition & 1 deletion lib/dist/color-gradient-picker-vue3.umd.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "color-gradient-picker-vue3",
"version": "3.0.5",
"version": "3.0.6",
"type": "module",
"author": "June",
"description": "Color and gradient picker for vue3.js",
Expand Down Expand Up @@ -31,7 +31,7 @@
"require": "./dist/color-gradient-picker-vue3.umd.js",
"import": "./dist/color-gradient-picker-vue3.es.js"
},
"./dist/style.css": "./dist/style.css"
"./dist/style.css": "./dist/color-gradient-picker-vue3.css"
},
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion lib/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Description:
* @Date: 2023-04-11 11:17:35
* @LastEditors: June
* @LastEditTime: 2024-12-13 17:59:08
* @LastEditTime: 2024-12-22 12:46:23
*/
import type { ConfigEnv, UserConfigExport } from 'vite'
import vueJsx from '@vitejs/plugin-vue-jsx'
Expand Down

0 comments on commit ae9d39a

Please sign in to comment.