{"_id":"@carohauta/pong-mini","name":"@carohauta/pong-mini","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@carohauta/pong-mini","version":"1.0.0","description":"A tiny Pong game","type":"module","exports":{".":{"types":"./dist/pong.d.ts","import":"./dist/pong.js"},"./react":{"types":"./dist/PongGame.d.ts","import":"./dist/PongGame.js"},"./styles.css":"./src/styles.css"},"scripts":{"dev":"node dev-server.js","build":"tsc -p tsconfig.json","build:watch":"tsc -w -p tsconfig.json"},"style":"./src/styles.css","devDependencies":{"typescript":"^5.6.3","@types/react":"^18.2.0"},"peerDependencies":{"react":">=16.8.0"},"keywords":["pong","game","embed","widget","canvas","react"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/carohauta/pong-mini.git"},"publishConfig":{"access":"public"},"_id":"@carohauta/pong-mini@1.0.0","gitHead":"fbd6e33e7bcf323160c2df1fd4e021747df4567c","bugs":{"url":"https://github.com/carohauta/pong-mini/issues"},"homepage":"https://github.com/carohauta/pong-mini#readme","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Rov7Y1R9d22VlZmHnVHIECl24CEgi9Iwlcu+iaAoyzg9bJt0Vo1kgIqKbKsn5Sr9AqS9DrHYCXP1+opm+z+lOw==","shasum":"ded8f891fae9710cef87fe37fbb244ddb1745dee","tarball":"https://registry.npmjs.org/@carohauta/pong-mini/-/pong-mini-1.0.0.tgz","fileCount":8,"unpackedSize":20269,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCZo85+sINQkyaNDVOaWsb7OJAaOghWzh0UKT81d2JggwIhAMaD7lkSxOwF4sXV6eH+gxOXTp7yMlRJb26QizL9nfin"}]},"_npmUser":{"name":"carohauta","email":"caro.hauta@gmail.com"},"directories":{},"maintainers":[{"name":"carohauta","email":"caro.hauta@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pong-mini_1.0.0_1759342431902_0.6463002203950752"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-01T18:13:51.841Z","1.0.0":"2025-10-01T18:13:52.094Z","modified":"2025-10-01T18:13:52.326Z"},"maintainers":[{"name":"carohauta","email":"caro.hauta@gmail.com"}],"description":"A tiny Pong game","homepage":"https://github.com/carohauta/pong-mini#readme","keywords":["pong","game","embed","widget","canvas","react"],"repository":{"type":"git","url":"git+https://github.com/carohauta/pong-mini.git"},"bugs":{"url":"https://github.com/carohauta/pong-mini/issues"},"license":"MIT","readme":"# Pong Mini\n\nInstall\n\n```bash\nnpm install @carohauta/pong-mini\n```\n\n## Vanilla HTML/JS Usage\n\n```html\n<link\n  rel=\"stylesheet\"\n  href=\"/node_modules/@carohauta/pong-mini/src/styles.css\"\n/>\n<div id=\"pong-slot\" style=\"max-width:480px\"></div>\n<script type=\"module\">\n  import { createPong } from \"@carohauta/pong-mini\";\n  const slot = document.getElementById(\"pong-slot\");\n  const pong = createPong(slot, {\n    responsive: true,\n    maxWidth: 480,\n    shadow: false,\n  });\n  pong.start();\n  // pong.reset(); pong.destroy();\n  // const scores = pong.getScores();\n  // window.addEventListener('visibilitychange', () => document.hidden ? pong.stop() : pong.start());\n</script>\n```\n\n## React Usage\n\n```tsx\nimport { PongGame } from \"@carohauta/pong-mini/react\";\nimport \"@carohauta/pong-mini/styles.css\";\n\nfunction App() {\n  return (\n    <PongGame\n      options={{ responsive: true, shadow: false, maxWidth: 600 }}\n      onScoresChange={(scores) => console.log(scores)}\n    />\n  );\n}\n```\n","readmeFilename":"README.MD","_rev":"1-190bf9afefc2e24f619b4a652b0c32cc"}