{"_id":"@avilabs/ghost-cursor-playwright","_rev":"2-7c870eb4b7a530fb39e6df354b9963f7","name":"@avilabs/ghost-cursor-playwright","dist-tags":{"latest":"2.1.5"},"versions":{"2.0.5":{"name":"@avilabs/ghost-cursor-playwright","version":"2.0.5","description":"Move your mouse like a human in playwright or generate realistic movements on any 2D plane","main":"lib/cursor.js","types":"lib/cursor.d.ts","keywords":["bezier-curve","mouse-movement","botting"],"author":{"name":"reaz & avilabs"},"license":"MIT","scripts":{"build":"npx tsc"},"dependencies":{"@types/trusted-types":"^2.0.7","bezier-js":"^4.1.1","playwright-core":"^1.19.2","trusted-types":"^2.0.0"},"devDependencies":{"@types/bezier-js":"^4.1.0","@types/node":"^16.11.11","typescript":"^4.5.2"},"repository":{"type":"git","url":"git+https://github.com/avilabss/ghost-cursor-playwright.git"},"bugs":{"url":"https://github.com/avilabss/ghost-cursor-playwright/issues"},"homepage":"https://github.com/avilabss/ghost-cursor-playwright#readme","_id":"@avilabs/ghost-cursor-playwright@2.0.5","gitHead":"33731c5c24ecd408d74521b43429ac96b1e664b2","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-rQ2NqOJYfiEi5uHQJ0EIMxwoB9ngyRDgcWRibGTeq6hoGclBWpu4RpziXIBfFca/MlmdLh9sDQmwpJKnSJmRwg==","shasum":"e3a9acaa1c6c5ce0e765ac62b74a5dfbee4cbd51","tarball":"https://registry.npmjs.org/@avilabs/ghost-cursor-playwright/-/ghost-cursor-playwright-2.0.5.tgz","fileCount":14,"unpackedSize":46229,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGW8w3+MYQOMuOPFEHiMUolaHn7z0ry3+nhVKnNMMJlrAiBGm3zFs4QHCarXr859gHQ9q/l21jGyJsZzBYd416pFfw=="}]},"_npmUser":{"name":"avilabs","email":"mail.avinashsah@gmail.com"},"directories":{},"maintainers":[{"name":"avilabs","email":"mail.avinashsah@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ghost-cursor-playwright_2.0.5_1702205688087_0.28701020483408857"},"_hasShrinkwrap":false},"2.1.5":{"name":"@avilabs/ghost-cursor-playwright","version":"2.1.5","description":"Move your mouse like a human in playwright or generate realistic movements on any 2D plane","main":"lib/cursor.js","types":"lib/cursor.d.ts","keywords":["bezier-curve","mouse-movement","botting"],"author":{"name":"reaz & avilabs"},"license":"MIT","scripts":{"build":"npx tsc"},"dependencies":{"@types/trusted-types":"^2.0.7","bezier-js":"^4.1.1","playwright-core":"^1.19.2","trusted-types":"^2.0.0"},"devDependencies":{"@types/bezier-js":"^4.1.0","@types/node":"^16.11.11","typescript":"^4.5.2"},"repository":{"type":"git","url":"git+https://github.com/avilabss/ghost-cursor-playwright.git"},"bugs":{"url":"https://github.com/avilabss/ghost-cursor-playwright/issues"},"homepage":"https://github.com/avilabss/ghost-cursor-playwright#readme","_id":"@avilabs/ghost-cursor-playwright@2.1.5","gitHead":"dc0e724682a6cd1227efbf658792c61f39a8b160","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-3T8cjvS0bzuc6h9zfi6hb1BVJeXgaDh0KZVHY68CwrmLR3oW0/TJFi1YFalYs9mtKRjN+J9mvw+z5TiK4ECkWw==","shasum":"c863da1223618369f2d060fca7278463a6a7106f","tarball":"https://registry.npmjs.org/@avilabs/ghost-cursor-playwright/-/ghost-cursor-playwright-2.1.5.tgz","fileCount":14,"unpackedSize":45769,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKJXWBrfuNikys4bUzd2uRQ78YnzpyV8zEwOU8P8r9swIhAIKPbU8R8rxNsMzBBswmg9NEJQYU5OMCrAmvRFAqBZ0p"}]},"_npmUser":{"name":"avilabs","email":"mail.avinashsah@gmail.com"},"directories":{},"maintainers":[{"name":"avilabs","email":"mail.avinashsah@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ghost-cursor-playwright_2.1.5_1702271761186_0.9033284536259714"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-10T10:54:48.087Z","2.0.5":"2023-12-10T10:54:48.265Z","modified":"2023-12-11T05:16:01.621Z","2.1.5":"2023-12-11T05:16:01.417Z"},"maintainers":[{"name":"avilabs","email":"mail.avinashsah@gmail.com"}],"description":"Move your mouse like a human in playwright or generate realistic movements on any 2D plane","homepage":"https://github.com/avilabss/ghost-cursor-playwright#readme","keywords":["bezier-curve","mouse-movement","botting"],"repository":{"type":"git","url":"git+https://github.com/avilabss/ghost-cursor-playwright.git"},"author":{"name":"reaz & avilabs"},"bugs":{"url":"https://github.com/avilabss/ghost-cursor-playwright/issues"},"license":"MIT","readme":"# ghost-cursor-playwright\n\nModification of actual ghost-cursor for puppeteer, with more functionality and rewrite to work well with playwright.\nNote! target elements rendered in the DOM will be scrolled vertically and horizontally to be visible in viewport\n\n### Download\n\n```shell\nnpm i @avilabs/ghost-cursor-playwright\n```\n\n### How to import\n\n```typescript\nimport { createCursor } from 'ghost-cursor-playwright'\nor\nconst { createCursor } = require('ghost-cursor-playwright')\n```\n\n### How to use\n\nCreate amd attach cursor to page\n\n```typescript\nconst cursor = await createCursor(page)\n```\n\nmanipulate the cursor via:\n\n```typescript\ncursor.actions.move(target: string | BoundingBox | Vector, moveOptions?: moveOptions): Promise<void>;\n\ntype moveOptions = {\n\tpaddingPercentage?: number;\n\twaitForSelector?: number;\n\twaitBeforeMove?: [number, number];\n};\n\n\ncursor.actions.click(clickOptions?: clickOptions, moveOptions?: moveOptions): Promise<void>;\n\ntype clickOptions = {\n\ttarget?: string | BoundingBox | Vector;\n\twaitBeforeClick?: [number, number];\n\twaitBetweenClick?: [number, number];\n\tdoubleClick?: boolean;\n};\n// if target is given then cursor will use move function before click\n// if target is JS path string, then function will check if for sure is on correct target (sometimes rendered objects are covered in viewport by menu bar or dialogs etc.), if false will proceed fallback to native click\n\n\n// Optionally, you may also choose to move cursor randomly\ncursor.performRandomMove()\n\n```\n\nutil functions\n\n```typescript\n// actual position of cursor is mounted on window.mousePos, its value can be retrieve by\n  cursor.getActualPosOfMouse(): Promise<Vector>;\n\n// actual target of cursor is mounted on window.mouseTarget, to compare target under cursor with given JS PATH selector use:\n  cursor.compareTargetOfMouse(selector: string): Promise<boolean>\n\n// random Vector of element\n  cursor.getElemBoundingBox(selector: string): Promise<BoundingBox>\n  cursor.getRandomPointInsideElem(elemBoundingBox: BoundingBox, paddingPercentage?): Vector\n\n// random Vector of viewport\n  cursor.getRandomPointOnViewport(paddingPercentage?): Promise<Vector>\n```\n","readmeFilename":"README.md"}