feat: establish shared color channel and text input protocols

This commit is contained in:
maoyingjie
2026-10-25 14:20:12 +08:00
parent 6b8501456d
commit a042f5c44c
19 changed files with 1389 additions and 3 deletions
+19
View File
@@ -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;