mirror of
https://github.com/kmvan/x-prober.git
synced 2026-08-12 21:21:43 +08:00
remove zod
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import z from "zod";
|
||||
|
||||
type Percentage = `${number}%`;
|
||||
type Percentage = `${number}`; // 0-1
|
||||
type Decimals = `${number}`; // 用于 Chroma (0-0.4) 或 Alpha (0-1)
|
||||
type Hue = `${number}`; // Hue 角度 (0-360)
|
||||
|
||||
@@ -9,11 +7,9 @@ export type OklchColor =
|
||||
| `oklch(${Percentage} ${Decimals} ${Hue} / ${Percentage})`
|
||||
| `oklch(${Percentage} ${Decimals} ${Hue} / ${Decimals})`;
|
||||
|
||||
export const OklchObjectSchema = z.strictObject({
|
||||
a: z.number().min(0).max(1),
|
||||
c: z.number().min(0).max(0.4),
|
||||
h: z.number().min(0).max(360),
|
||||
l: z.number().min(0).max(100),
|
||||
});
|
||||
|
||||
export type OklchObject = z.infer<typeof OklchObjectSchema>;
|
||||
export type OklchObject = {
|
||||
a: number;
|
||||
c: number;
|
||||
h: number;
|
||||
l: number;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user