Skip to content

Commit b943d6e

Browse files
committed
chore: update
1 parent f4a8b20 commit b943d6e

File tree

8 files changed

+34
-15
lines changed

8 files changed

+34
-15
lines changed

eslint.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// @ts-check
22
import antfu from '@antfu/eslint-config'
33

4-
export default antfu()
4+
export default antfu({
5+
rules: {
6+
'vue/valid-v-bind': 'off',
7+
},
8+
})

playground/src/components/Palette/PaletteInput.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ const aplhaStringify = computed({
3838
})
3939
4040
function handleAlphaBlur(e: any) {
41-
console.log(e.target.value)
42-
console.log(aplhaStringify.value)
4341
if (aplhaStringify.value !== e.target.value)
4442
e.target.value = aplhaStringify.value
4543
}

playground/src/components/ThemeButtons.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ defineProps<{
1111
<template>
1212
<ul fcc text-white gap-2 mt-10>
1313
<li v-for="(v, k) in theme" :key="k" fccc>
14-
<button px-3 py-2 text-sm rd-md important-duration-100 hover-scale-105 trans
15-
:style="{ backgroundColor: v, color: getReadableTextColor(v) }">
14+
<button
15+
px-3 py-2 text-sm rd-md important-duration-100 hover-scale-105 trans
16+
:style="{ backgroundColor: v, color: getReadableTextColor(v) }"
17+
>
1618
button
1719
</button>
1820
<span>{{ k }}</span>

playground/src/components/ThemeHue.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ defineProps<{
1010

1111
<template>
1212
<ul fccc text-white mt-10>
13-
<li v-for="(v, k) in theme" :key="k" fccc w="100" h="12" :class="k === '500' ? 'scale-105' : 'scale-100'"
14-
important-duration-100 hover-scale-105 trans :style="{ backgroundColor: v, color: getReadableTextColor(v) }">
13+
<li
14+
v-for="(v, k) in theme" :key="k" fccc w="100" h="12" :class="k === '500' ? 'scale-105' : 'scale-100'"
15+
important-duration-100 hover-scale-105 trans :style="{ backgroundColor: v, color: getReadableTextColor(v) }"
16+
>
1517
<span>{{ v }}</span>
1618
</li>
1719
</ul>

pnpm-lock.yaml

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/theme.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest'
2-
import { theme } from '../packages/magic-color/src'
2+
import { theme } from 'magic-color'
33

44
describe('theme colors', () => {
55
const testColor = '#9955FF'

test/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest'
2-
import { isColor, createMagicColor as mc, opacityToString } from '../packages/magic-color/src/core'
2+
import { isColor, createMagicColor as mc, opacityToString } from 'magic-color'
33

44
describe('utils scoped', () => {
55
const hex = '#ff0000'

vitest.config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import path from 'node:path'
2+
import { defaultExclude, defineConfig } from 'vitest/config'
3+
4+
const r = (p: string) => path.resolve(__dirname, p)
5+
6+
export default defineConfig({
7+
resolve: {
8+
alias: {
9+
'magic-color': r('./packages/magic-color/src/index.ts'),
10+
},
11+
},
12+
test: {
13+
exclude: [...defaultExclude],
14+
},
15+
})

0 commit comments

Comments
 (0)