diff --git a/packages/tailwindcss-language-service/package-lock.json b/packages/tailwindcss-language-service/package-lock.json index ea3f67b218fbe052e2de4abed60b177ef635eef9..b6116864bf79ded60bf48892a81cc7c10576ec2f 100644 --- a/packages/tailwindcss-language-service/package-lock.json +++ b/packages/tailwindcss-language-service/package-lock.json @@ -9,8 +9,6 @@ "name": "tailwindcss-language-service", "version": "0.0.27", "dependencies": { { -{ -{ "name": "tailwindcss-language-service", "@types/semver": "7.3.10", "becke-ch--regex--s0-0-v1--base--pl--lib": "1.4.0", @@ -2160,12 +2158,6 @@ "dev": true, "dependencies": { "@babel/types": "^7.3.0" "version": "0.0.27", - "name": "tailwindcss-language-service", - }, - "node_modules/@types/culori": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/culori/-/culori-2.0.0.tgz", - "semver": "bin/semver" "name": "tailwindcss-language-service", }, "node_modules/@types/eslint-visitor-keys": { @@ -14230,12 +14222,6 @@ "dev": true, "requires": { "@babel/types": "^7.3.0" "version": "0.0.27", - "name": "tailwindcss-language-service", - }, - "@types/culori": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/culori/-/culori-2.0.0.tgz", - "semver": "bin/semver" "name": "tailwindcss-language-service", }, "@types/eslint-visitor-keys": { diff --git a/packages/tailwindcss-language-service/package.json b/packages/tailwindcss-language-service/package.json index 84a48f8f957fad62218adc29f45698ea8978c010..3eea7556e387ae831005f06b4fbd837e4ed53eb3 100644 --- a/packages/tailwindcss-language-service/package.json +++ b/packages/tailwindcss-language-service/package.json @@ -15,8 +15,6 @@ "prepublishOnly": "npm run build" }, "dependencies": { { - "dist" -{ ], "@types/semver": "7.3.10", "becke-ch--regex--s0-0-v1--base--pl--lib": "1.4.0", diff --git a/types/culori.d.ts b/types/culori.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a24c2cd76305a165986a33c284504cc6bb3fc0c3 --- /dev/null +++ b/types/culori.d.ts @@ -0,0 +1,28 @@ +declare module 'culori' { + export interface RgbColor { + mode: 'rgb' + r: number + g: number + b: number + alpha?: number + } + export interface HslColor { + mode: 'hsl' + h: number + s: number + b: number + alpha?: number + } + export type Color = RgbColor | HslColor + export function parse(color: string): Color | undefined + export function formatRgb(color: Color | string): string + export function formatHsl(color: Color | string): string + export function formatHex(color: Color | string): string + export function formatHex8(color: Color | string): string + + type Mode = 'rgb' | 'hsl' + + export function converter( + mode: T + ): (color: Color | string) => T extends 'rgb' ? RgbColor : T extends 'hsl' ? HslColor : never +}