@apiteam/twa-bridge 7.0.0-beta.1 → 7.0.0-beta.11

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 CHANGED
@@ -1,56 +1,56 @@
1
- ## SDK
2
- [![npm version](https://img.shields.io/npm/v/@apiteam/twa-bridge)](https://www.npmjs.com/package/@apiteam/twa-bridge)
3
-
4
- npm package for [Telegram Web Apps (TWA)](https://core.telegram.org/bots/webapps) SDK.
5
-
6
- ```
7
- npm i @apiteam/twa-bridge
8
- ```
9
-
10
- ### Motivation
11
- Telegram distributes SDK via [link](https://core.telegram.org/bots/webapps#initializing-web-apps). It's kinda old fashion way to work with a library:
12
-
13
- ```html
14
- <html lang="en">
15
- <head>
16
- <title>TWA</title>
17
- <meta charset="UTF-8">
18
- <script src="https://telegram.org/js/telegram-web-app.js"></script>
19
- <script>
20
- window.Telegram.WebApp.showPopup({ message: 'message' });
21
- </script>
22
- </head>
23
- <body></body>
24
- </html>
25
- ```
26
-
27
- This package allows to work with SDK as with a npm package:
28
-
29
- ```js
30
- import { bridgeOpenPopup } from '@apiteam/twa-bridge/solid'
31
-
32
- bridgeOpenPopup({ message: 'message' })
33
- ```
34
-
35
- And yes, it supports TS.
36
-
37
- ### Solid
38
- ```js
39
- import { createIsViewportChanged } from '@apiteam/twa-bridge/solid'
40
-
41
- const viewport = createIsViewportChanged()
42
- ```
43
-
44
- ### Errors
45
-
46
- | ID | Description |
47
- | --- | ----------------------------------------------------------------- |
48
- | 1 | Method not supported |
49
- | 2 | Ooof! Something is wrong. Init data is missing |
50
- | 3 | Title too long, maximum length 64 characters |
51
- | 4 | Your message is too short, at least 1 character |
52
- | 5 | Your message is too long, maximum 256 characters |
53
- | 6 | You are passing too few buttons, at least 1 button |
54
- | 7 | You are passing too many buttons, maximum 3 buttons |
55
- | 8 | The button text ignores the following values: "ok, close, cancel" |
1
+ ## SDK
2
+ [![npm version](https://img.shields.io/npm/v/@apiteam/twa-bridge)](https://www.npmjs.com/package/@apiteam/twa-bridge)
3
+
4
+ npm package for [Telegram Web Apps (TWA)](https://core.telegram.org/bots/webapps) SDK.
5
+
6
+ ```
7
+ npm i @apiteam/twa-bridge
8
+ ```
9
+
10
+ ### Motivation
11
+ Telegram distributes SDK via [link](https://core.telegram.org/bots/webapps#initializing-web-apps). It's kinda old fashion way to work with a library:
12
+
13
+ ```html
14
+ <html lang="en">
15
+ <head>
16
+ <title>TWA</title>
17
+ <meta charset="UTF-8">
18
+ <script src="https://telegram.org/js/telegram-web-app.js"></script>
19
+ <script>
20
+ window.Telegram.WebApp.showPopup({ message: 'message' });
21
+ </script>
22
+ </head>
23
+ <body></body>
24
+ </html>
25
+ ```
26
+
27
+ This package allows to work with SDK as with a npm package:
28
+
29
+ ```js
30
+ import { bridgeOpenPopup } from '@apiteam/twa-bridge/solid'
31
+
32
+ bridgeOpenPopup({ message: 'message' })
33
+ ```
34
+
35
+ And yes, it supports TS.
36
+
37
+ ### Solid
38
+ ```js
39
+ import { createIsViewportChanged } from '@apiteam/twa-bridge/solid'
40
+
41
+ const viewport = createIsViewportChanged()
42
+ ```
43
+
44
+ ### Errors
45
+
46
+ | ID | Description |
47
+ | --- | ----------------------------------------------------------------- |
48
+ | 1 | Method not supported |
49
+ | 2 | Ooof! Something is wrong. Init data is missing |
50
+ | 3 | Title too long, maximum length 64 characters |
51
+ | 4 | Your message is too short, at least 1 character |
52
+ | 5 | Your message is too long, maximum 256 characters |
53
+ | 6 | You are passing too few buttons, at least 1 button |
54
+ | 7 | You are passing too many buttons, maximum 3 buttons |
55
+ | 8 | The button text ignores the following values: "ok, close, cancel" |
56
56
  | 9 | EDIT_MESSAGE
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
- {
2
- "name": "@apiteam/twa-bridge",
3
- "version": "7.0.0-beta.1",
4
- "description": "Telegram bridge",
5
- "license": "MIT",
6
- "types": "index.ts",
7
- "author": {
8
- "name": "Egor Kytyukov",
9
- "url": "https://vk.com/xuserz"
10
- },
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/APITEAMRU/twa-bridge"
14
- },
15
- "contributors": [],
16
- "keywords": [
17
- "twa-sdk",
18
- "telegram sdk",
19
- "telegram",
20
- "tg",
21
- "telegram module"
22
- ]
1
+ {
2
+ "name": "@apiteam/twa-bridge",
3
+ "version": "7.0.0-beta.11",
4
+ "description": "Telegram bridge",
5
+ "license": "MIT",
6
+ "types": "index.ts",
7
+ "author": {
8
+ "name": "Egor Kytyukov",
9
+ "url": "https://vk.com/xuserz"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/APITEAMRU/twa-bridge"
14
+ },
15
+ "contributors": [],
16
+ "keywords": [
17
+ "twa-sdk",
18
+ "telegram sdk",
19
+ "telegram",
20
+ "tg",
21
+ "telegram module"
22
+ ]
23
23
  }