feat: establish shared color channel and text input protocols
This commit is contained in:
@@ -22,3 +22,22 @@ const alpha: ColorAreaOptions = { xChannel: "alpha" };
|
||||
const foreign: ColorValue = { space: "rgb", r: 0, g: 0, b: 0, alpha: 1 };
|
||||
void alpha;
|
||||
void foreign;
|
||||
|
||||
import type { ColorChannelOptions } from "../../packages/vue/src/components/color/channel";
|
||||
import type { ColorTextOptions } from "../../packages/vue/src/components/color/text";
|
||||
const alphaField: ColorTextOptions = { channel: "alpha", locale: "de-DE" };
|
||||
const hueSlider: ColorChannelOptions = { channel: "hue", colorSpace: "hsb" };
|
||||
// @ts-expect-error slider channel is required
|
||||
const missingChannel: ColorChannelOptions = {};
|
||||
// @ts-expect-error unknown field channel
|
||||
const invalidChannel: ColorTextOptions = { channel: "opacity" };
|
||||
const invalidSpace: ColorChannelOptions = {
|
||||
channel: "hue",
|
||||
// @ts-expect-error no arbitrary color space
|
||||
colorSpace: "oklch",
|
||||
};
|
||||
void alphaField;
|
||||
void hueSlider;
|
||||
void missingChannel;
|
||||
void invalidChannel;
|
||||
void invalidSpace;
|
||||
|
||||
Reference in New Issue
Block a user