{"_id":"@ademax/tg-web-app","_rev":"5-73d117067764d1527fa91f51c0ce57d4","name":"@ademax/tg-web-app","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@ademax/tg-web-app","version":"0.1.0","license":"MIT","_id":"@ademax/tg-web-app@0.1.0","maintainers":[{"name":"ademax","email":"lopas1902@gmail.com"}],"dist":{"shasum":"83ffbcfbc68fbfc1c845ef130af70f8f5c6dbcd3","tarball":"https://registry.npmjs.org/@ademax/tg-web-app/-/tg-web-app-0.1.0.tgz","fileCount":18,"integrity":"sha512-f0F6y32kvp/b2BEUH0ri891LbPitBs8jvY9OIwezK8BJLzukYi6BSgJEduOxOwXfooD25U3qA882vHMgtU79QQ==","signatures":[{"sig":"MEQCICfz/TQfmRMrrYOd2I+W7Urv9JT+/iX3C3NN/voO+OniAiAhyNnMlGH+ZYPCeFkY1ShPjVYyG1G9Kr6tOwRF4yR9jw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4876},"main":"dist/index.js","types":"dist/index.d.ts","private":false,"scripts":{"build":"tsc -p tsconfig.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"ademax","email":"lopas1902@gmail.com"},"_npmVersion":"11.6.2","description":"TypeScript helpers and types for Telegram Mini Apps (WebApp)","directories":{},"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/tg-web-app_0.1.0_1768105145392_0.9519376800508386","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@ademax/tg-web-app","version":"0.2.0","license":"MIT","_id":"@ademax/tg-web-app@0.2.0","maintainers":[{"name":"ademax","email":"lopas1902@gmail.com"}],"dist":{"shasum":"93fa53eab4fa7283612e6f488141b8a50ac11667","tarball":"https://registry.npmjs.org/@ademax/tg-web-app/-/tg-web-app-0.2.0.tgz","fileCount":27,"integrity":"sha512-2xt1tAV39vd2u8tKuKJFi4rEZc1S5mg1p6GXTQIu0TAhgBcRq7j2rGB7XI4F7lWH3gDr/GdJgNxUZYjgHiTEjA==","signatures":[{"sig":"MEQCIEdH5wKqYXJN1w3U/L0x5UulNmpyD7y4xPiLZ5tdcAlWAiALUSAlsylZKbvjsqCt+cJ9mAfO5j2qCHAQiIeQW3/FVw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17306},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"651821b487315b986c7e0f005c92e13fff4d492b","private":false,"scripts":{"build":"tsc -p tsconfig.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"ademax","email":"lopas1902@gmail.com"},"_npmVersion":"11.6.2","description":"TypeScript helpers and types for Telegram Mini Apps (WebApp)","directories":{},"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/tg-web-app_0.2.0_1768110020118_0.7722313646545076","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@ademax/tg-web-app","version":"0.2.1","license":"MIT","_id":"@ademax/tg-web-app@0.2.1","maintainers":[{"name":"ademax","email":"lopas1902@gmail.com"}],"dist":{"shasum":"7f9e2530710bb05e1871e8c5f8e91bd86fe7c2c0","tarball":"https://registry.npmjs.org/@ademax/tg-web-app/-/tg-web-app-0.2.1.tgz","fileCount":27,"integrity":"sha512-GMaTKleFFs23ZaVUAOYQ94JbuByC9p4Fc7m3DEc7XLymk857oPuJUpiqXA+ttynrQSWxWd+68OTajQQ6UN5tDA==","signatures":[{"sig":"MEQCIBxOArjRXfOKpjAfj37HSQqoajZsEbrTnnCYOx+ayrWgAiA3DT86Z1XGQZNnbABmSo6ZqQ9afquykmIdhU4tbv23sw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17291},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"221578b067bac4d7c727b3acc2e57e635b84a575","private":false,"scripts":{"build":"tsc -p tsconfig.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"ademax","email":"lopas1902@gmail.com"},"_npmVersion":"11.6.2","description":"TypeScript helpers and types for Telegram Mini Apps (WebApp)","directories":{},"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/tg-web-app_0.2.1_1768110138813_0.5418870755445022","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@ademax/tg-web-app","version":"0.2.2","license":"MIT","_id":"@ademax/tg-web-app@0.2.2","maintainers":[{"name":"ademax","email":"lopas1902@gmail.com"}],"dist":{"shasum":"5c83d702b07737742e5441706c8b0c00c4270fd9","tarball":"https://registry.npmjs.org/@ademax/tg-web-app/-/tg-web-app-0.2.2.tgz","fileCount":27,"integrity":"sha512-EtEtKvaEqkQnDH6m5plgtpsSJJN75e/4NtwSbfR5cq7IsKl+yW5o0NbdM72c0vffHAXnaCa71qpxEowgf+uWWg==","signatures":[{"sig":"MEUCIQDtlvSmXrfghsHil1BN91hPHIhZJnQ26N+AmrhDQtn7+QIgdCwm9Y0Mpythdnee7qSqNg+bTPGXPEE3vUdn1C+nyqI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17346},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"30b71c9e5da082879d3e4c64b438fbd597760f4f","private":false,"scripts":{"build":"tsc -p tsconfig.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"ademax","email":"lopas1902@gmail.com"},"_npmVersion":"11.6.2","description":"TypeScript helpers and types for Telegram Mini Apps (WebApp)","directories":{},"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/tg-web-app_0.2.2_1768110341875_0.22674225549808158","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@ademax/tg-web-app","version":"0.3.0","description":"TypeScript helpers and types for Telegram Mini Apps (WebApp)","license":"MIT","private":false,"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.json","prepublishOnly":"npm run build"},"devDependencies":{"typescript":"^5.9.3"},"gitHead":"8bf679f4aed108522e8f056e16241f398e785a4b","_id":"@ademax/tg-web-app@0.3.0","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-vl/bBKads20PdBX2QXkYo+veHFJA7gxw7TqqIrb/NksBPgjHkOyN5fTlt3PvubCp8ABR/r84gP4p7keetvVXQg==","shasum":"a796d5cd66a1ae102f71a5192f2b621455c369bf","tarball":"https://registry.npmjs.org/@ademax/tg-web-app/-/tg-web-app-0.3.0.tgz","fileCount":27,"unpackedSize":17346,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGRmkY0RpvHB+DR0zM8UG+KTB0YP3c6YFppeiIfE/VTWAiEA1RzLmE5qq71olIRg/2yzG3q94ggWUu99tp8b6SGKu+s="}]},"_npmUser":{"name":"ademax","email":"lopas1902@gmail.com"},"directories":{},"maintainers":[{"name":"ademax","email":"lopas1902@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tg-web-app_0.3.0_1768110483946_0.15850243517837215"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-11T04:19:05.327Z","modified":"2026-01-11T05:48:04.270Z","0.1.0":"2026-01-11T04:19:05.539Z","0.2.0":"2026-01-11T05:40:20.257Z","0.2.1":"2026-01-11T05:42:18.964Z","0.2.2":"2026-01-11T05:45:42.022Z","0.3.0":"2026-01-11T05:48:04.096Z"},"license":"MIT","description":"TypeScript helpers and types for Telegram Mini Apps (WebApp)","maintainers":[{"name":"ademax","email":"lopas1902@gmail.com"}],"readme":"# @ademax/tg-web-app\n\nTypeScript helpers and typings for Telegram Mini Apps (Telegram WebApp API).\n\nThis package provides:\n- global TypeScript typings for `window.Telegram.WebApp`\n- reusable runtime helpers (for example `useTelegram`)\n- strongly typed interfaces for Telegram WebApp API\n\nThe package is designed to be simple to use and easy to extend in the future.\n\n---\n\n## Installation\n\n```bash\nnpm install @ademax/tg-web-app\n```\n\n---\n\n## Enabling global typings\n\nTo enable global typing for `window.Telegram`, add the package to the `types` section of your `tsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"types\": [\"@ademax/tg-web-app\"]\n  }\n}\n```\n\nAfter that, `window.Telegram.WebApp` will be available with full TypeScript support across your project.\n\nExample:\n\n```ts\nwindow.Telegram.WebApp.ready();\n```\n\nThis approach is recommended if you rely on global access to the Telegram WebApp object and do not want to import anything explicitly in your code.\n\n---\n\n## Runtime API\n\nThe package also exports runtime helpers that can be imported directly.\n\nExample:\n\n```ts\nimport { useTelegram } from \"@ademax/tg-web-app\";\n\nconst { webApp } = useTelegram();\n\nwebApp.ready();\n```\n\nImporting any runtime API automatically includes all related TypeScript typings.\n\n---\n\n## Type exports\n\nAll core Telegram WebApp interfaces are exported and can be used directly in your code:\n\n```ts\nimport type {\n    IWebApp,\n    IWebAppInitData,\n    IWebAppUser,\n    IWebAppChat,\n    TChatType\n} from \"@ademax/tg-web-app\";\n```\n\nThis allows you to use Telegram WebApp types explicitly in your application code.\n\n---\n\n## Notes\n\n- The package is safe to import in browser environments.\n- Global typings are included automatically when the package is listed in `compilerOptions.types`.\n- No JavaScript code is executed just by enabling global typings.\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}