first commit
This commit is contained in:
23
shims/ant-computer-use-input/index.ts
Normal file
23
shims/ant-computer-use-input/index.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
export type ComputerUseInputAPI = {
|
||||
moveMouse(x: number, y: number, smooth?: boolean): Promise<void>
|
||||
mouseLocation(): Promise<{ x: number; y: number }>
|
||||
key(key: string, action?: 'press' | 'release' | 'click'): Promise<void>
|
||||
keys(keys: string[]): Promise<void>
|
||||
leftClick(): Promise<void>
|
||||
rightClick(): Promise<void>
|
||||
doubleClick(): Promise<void>
|
||||
middleClick(): Promise<void>
|
||||
dragMouse(x: number, y: number): Promise<void>
|
||||
scroll(x: number, y: number): Promise<void>
|
||||
type(text: string): Promise<void>
|
||||
}
|
||||
|
||||
export type ComputerUseInput =
|
||||
| ({ isSupported: false } & Partial<ComputerUseInputAPI>)
|
||||
| ({ isSupported: true } & ComputerUseInputAPI)
|
||||
|
||||
const unsupported: ComputerUseInput = {
|
||||
isSupported: false,
|
||||
}
|
||||
|
||||
export default unsupported
|
||||
6
shims/ant-computer-use-input/package.json
Normal file
6
shims/ant-computer-use-input/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "@ant/computer-use-input",
|
||||
"version": "0.0.0-restored",
|
||||
"type": "module",
|
||||
"main": "./index.ts"
|
||||
}
|
||||
Reference in New Issue
Block a user