diff options
Diffstat (limited to 'src/schemas')
| -rw-r--r-- | src/schemas/common.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/schemas/common.ts b/src/schemas/common.ts new file mode 100644 index 0000000..00323c2 --- /dev/null +++ b/src/schemas/common.ts @@ -0,0 +1,11 @@ +import { Type } from "typebox"; + +export const Coords = Type.Object({ + x: Type.Number({ description: "X coordinate in CSS pixels from left edge of viewport" }), + y: Type.Number({ description: "Y coordinate in CSS pixels from top edge of viewport" }), +}); + +export const MouseButton = Type.Union( + [Type.Literal("left"), Type.Literal("right"), Type.Literal("middle")], + { description: 'Mouse button: "left", "right", or "middle"' }, +); |
