@tma.js/sdk 3.1.5 → 3.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,4 +28,37 @@ the Telegram Mini Apps ecosystem.
|
|
|
28
28
|
|
|
29
29
|
Before you begin using the SDK, we highly recommend familiarizing yourself with the Telegram Mini
|
|
30
30
|
Apps [documentation](https://docs.telegram-mini-apps.com/platform/about)
|
|
31
|
-
to grasp the fundamental concepts of the platform.
|
|
31
|
+
to grasp the fundamental concepts of the platform.
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# pnpm
|
|
37
|
+
pnpm i @tma.js/sdk
|
|
38
|
+
|
|
39
|
+
# yarn
|
|
40
|
+
yarn add @tma.js/sdk
|
|
41
|
+
|
|
42
|
+
# npm
|
|
43
|
+
npm i @tma.js/sdk
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Usage Example
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { init, backButton } from '@tma.js/sdk';
|
|
50
|
+
|
|
51
|
+
// Initialize all library dependencies.
|
|
52
|
+
init();
|
|
53
|
+
|
|
54
|
+
// Mount all required components used across the application.
|
|
55
|
+
// This will lead to components' state restoration.
|
|
56
|
+
backButton.mount();
|
|
57
|
+
backButton.onClick(() => {
|
|
58
|
+
window.history.back();
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Documentation
|
|
63
|
+
|
|
64
|
+
You can find complete documentation over the library [here](https://docs.telegram-mini-apps.com/packages/tma-js-sdk).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tma.js/sdk",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.6",
|
|
4
4
|
"description": "TypeScript Source Development Kit for Telegram Mini Apps client application.",
|
|
5
5
|
"author": "Vladislav Kibenko <wolfram.deus@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Telegram-Mini-Apps/tma.js#readme",
|