all repos — sz-chrome-remote-cdp @ master

pi-browser-harness, patched to drive a Chrome on another host over CDP, with castle_cdp_search web search

src/schemas/common.ts (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 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"' },
);