@tma.js/sdk 1.4.4 → 1.4.7

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.
Files changed (298) hide show
  1. package/README.md +2 -2
  2. package/dist/dts/bridge/env/index.d.ts +0 -1
  3. package/dist/dts/bridge/events/events.d.ts +16 -16
  4. package/dist/dts/bridge/methods/methods.d.ts +27 -27
  5. package/dist/dts/bridge/methods/popup.d.ts +1 -1
  6. package/dist/dts/index.d.ts +3 -3
  7. package/dist/dts/init-data/types.d.ts +3 -3
  8. package/dist/dts/launch-params/index.d.ts +1 -4
  9. package/dist/dts/launch-params/retrieveFromLocation.d.ts +2 -2
  10. package/dist/dts/launch-params/retrieveFromPerformance.d.ts +3 -4
  11. package/dist/dts/launch-params/retrieveFromUrl.d.ts +3 -2
  12. package/dist/dts/launch-params/retrieveLaunchData.d.ts +1 -0
  13. package/dist/dts/launch-params/retrieveLaunchParams.d.ts +6 -0
  14. package/dist/dts/launch-params/storage.d.ts +3 -5
  15. package/dist/dts/launch-params/types.d.ts +1 -1
  16. package/dist/dts/{launch-params → misc}/getFirstNavigationEntry.d.ts +1 -1
  17. package/dist/dts/misc/index.d.ts +3 -0
  18. package/dist/dts/{bridge/env → misc}/isIframe.d.ts +1 -1
  19. package/dist/dts/misc/isPageReload.d.ts +5 -0
  20. package/dist/dts/theme-params/types.d.ts +1 -1
  21. package/dist/index.cjs +1 -2
  22. package/dist/index.iife.js +1 -2
  23. package/dist/index.mjs +841 -866
  24. package/package.json +2 -3
  25. package/dist/dts/launch-params/computeLaunchData.d.ts +0 -6
  26. package/dist/dts/launch-params/computePageReload.d.ts +0 -6
  27. package/dist/dts/launch-params/retrieveCurrent.d.ts +0 -5
  28. package/dist/index.cjs.map +0 -1
  29. package/dist/index.iife.js.map +0 -1
  30. package/dist/index.mjs.map +0 -1
  31. package/src/__tests__/globals.ts +0 -39
  32. package/src/back-button/BackButton.ts +0 -90
  33. package/src/back-button/__tests__/BackButton.ts +0 -129
  34. package/src/back-button/index.ts +0 -2
  35. package/src/back-button/types.ts +0 -14
  36. package/src/bridge/__tests__/parseMessage.ts +0 -23
  37. package/src/bridge/__tests__/request.ts +0 -236
  38. package/src/bridge/env/__tests__/hasExternalNotify.ts +0 -15
  39. package/src/bridge/env/__tests__/hasWebviewProxy.ts +0 -15
  40. package/src/bridge/env/__tests__/isIframe.ts +0 -30
  41. package/src/bridge/env/hasExternalNotify.ts +0 -19
  42. package/src/bridge/env/hasWebviewProxy.ts +0 -19
  43. package/src/bridge/env/index.ts +0 -3
  44. package/src/bridge/env/isIframe.ts +0 -11
  45. package/src/bridge/errors/MethodUnsupportedError.ts +0 -13
  46. package/src/bridge/errors/ParameterUnsupportedError.ts +0 -13
  47. package/src/bridge/errors/index.ts +0 -2
  48. package/src/bridge/events/__tests__/createEmitter.ts +0 -143
  49. package/src/bridge/events/__tests__/off.ts +0 -34
  50. package/src/bridge/events/__tests__/on.ts +0 -49
  51. package/src/bridge/events/__tests__/onTelegramEvent.ts +0 -49
  52. package/src/bridge/events/__tests__/once.ts +0 -64
  53. package/src/bridge/events/__tests__/singletonEmitter.ts +0 -22
  54. package/src/bridge/events/__tests__/subscribe.ts +0 -49
  55. package/src/bridge/events/__tests__/unsubscribe.ts +0 -34
  56. package/src/bridge/events/createEmitter.ts +0 -108
  57. package/src/bridge/events/events.ts +0 -170
  58. package/src/bridge/events/index.ts +0 -9
  59. package/src/bridge/events/off.ts +0 -14
  60. package/src/bridge/events/on.ts +0 -19
  61. package/src/bridge/events/onTelegramEvent.ts +0 -81
  62. package/src/bridge/events/once.ts +0 -18
  63. package/src/bridge/events/parsers/__tests__/clipboardTextReceived.ts +0 -21
  64. package/src/bridge/events/parsers/__tests__/invoiceClosed.ts +0 -12
  65. package/src/bridge/events/parsers/__tests__/popupClosed.ts +0 -10
  66. package/src/bridge/events/parsers/__tests__/qrTextReceived.ts +0 -9
  67. package/src/bridge/events/parsers/__tests__/theme-changed.ts +0 -42
  68. package/src/bridge/events/parsers/__tests__/viewportChanged.ts +0 -49
  69. package/src/bridge/events/parsers/clipboardTextReceived.ts +0 -26
  70. package/src/bridge/events/parsers/customMethodInvoked.ts +0 -25
  71. package/src/bridge/events/parsers/index.ts +0 -9
  72. package/src/bridge/events/parsers/invoiceClosed.ts +0 -26
  73. package/src/bridge/events/parsers/phoneRequested.ts +0 -14
  74. package/src/bridge/events/parsers/popupClosed.ts +0 -19
  75. package/src/bridge/events/parsers/qrTextReceived.ts +0 -14
  76. package/src/bridge/events/parsers/theme-changed.ts +0 -58
  77. package/src/bridge/events/parsers/viewportChanged.ts +0 -33
  78. package/src/bridge/events/parsers/writeAccessRequested.ts +0 -14
  79. package/src/bridge/events/singletonEmitter.ts +0 -19
  80. package/src/bridge/events/subscribe.ts +0 -15
  81. package/src/bridge/events/unsubscribe.ts +0 -10
  82. package/src/bridge/index.ts +0 -7
  83. package/src/bridge/invokeCustomMethod.ts +0 -56
  84. package/src/bridge/methods/__tests__/createPostEvent.ts +0 -37
  85. package/src/bridge/methods/__tests__/postEvent.ts +0 -137
  86. package/src/bridge/methods/createPostEvent.ts +0 -40
  87. package/src/bridge/methods/custom-methods.ts +0 -68
  88. package/src/bridge/methods/haptic.ts +0 -52
  89. package/src/bridge/methods/index.ts +0 -6
  90. package/src/bridge/methods/methods.ts +0 -370
  91. package/src/bridge/methods/popup.ts +0 -53
  92. package/src/bridge/methods/postEvent.ts +0 -101
  93. package/src/bridge/parseMessage.ts +0 -28
  94. package/src/bridge/request.ts +0 -176
  95. package/src/classnames/__tests__/classNames.ts +0 -20
  96. package/src/classnames/__tests__/mergeClassNames.ts +0 -21
  97. package/src/classnames/classNames.ts +0 -34
  98. package/src/classnames/index.ts +0 -2
  99. package/src/classnames/mergeClassNames.ts +0 -60
  100. package/src/closing-behavior/ClosingBehavior.ts +0 -64
  101. package/src/closing-behavior/__tests__/ClosingBehavior.ts +0 -86
  102. package/src/closing-behavior/index.ts +0 -2
  103. package/src/closing-behavior/types.ts +0 -12
  104. package/src/cloud-storage/CloudStorage.ts +0 -138
  105. package/src/cloud-storage/index.ts +0 -1
  106. package/src/colors/__tests__/isColorDark.ts +0 -12
  107. package/src/colors/__tests__/isRGB.ts +0 -13
  108. package/src/colors/__tests__/isRGBShort.ts +0 -13
  109. package/src/colors/__tests__/toRGB.ts +0 -23
  110. package/src/colors/index.ts +0 -5
  111. package/src/colors/isColorDark.ts +0 -22
  112. package/src/colors/isRGB.ts +0 -9
  113. package/src/colors/isRGBShort.ts +0 -9
  114. package/src/colors/toRGB.ts +0 -49
  115. package/src/colors/types.ts +0 -9
  116. package/src/css/__tests__/bindMiniAppCSSVars.ts +0 -175
  117. package/src/css/__tests__/bindThemeCSSVars.ts +0 -52
  118. package/src/css/__tests__/bindViewportCSSVars.ts +0 -55
  119. package/src/css/__tests__/setCSSVar.ts +0 -14
  120. package/src/css/bindMiniAppCSSVars.ts +0 -51
  121. package/src/css/bindThemeCSSVars.ts +0 -31
  122. package/src/css/bindViewportCSSVars.ts +0 -36
  123. package/src/css/index.ts +0 -4
  124. package/src/css/setCSSVar.ts +0 -8
  125. package/src/event-emitter/EventEmitter.ts +0 -146
  126. package/src/event-emitter/__tests__/EventEmitter.ts +0 -145
  127. package/src/event-emitter/index.ts +0 -2
  128. package/src/event-emitter/types.ts +0 -60
  129. package/src/globals.ts +0 -38
  130. package/src/haptic-feedback/HapticFeedback.ts +0 -70
  131. package/src/haptic-feedback/__tests__/HapticFeedback.ts +0 -68
  132. package/src/haptic-feedback/index.ts +0 -1
  133. package/src/index.ts +0 -185
  134. package/src/init/catchCustomStyles.ts +0 -17
  135. package/src/init/creators/__tests__/createViewport.ts +0 -96
  136. package/src/init/creators/createBackButton.ts +0 -25
  137. package/src/init/creators/createClosingBehavior.ts +0 -24
  138. package/src/init/creators/createMainButton.ts +0 -51
  139. package/src/init/creators/createMiniApp.ts +0 -48
  140. package/src/init/creators/createRequestIdGenerator.ts +0 -13
  141. package/src/init/creators/createSettingsButton.ts +0 -25
  142. package/src/init/creators/createThemeParams.ts +0 -11
  143. package/src/init/creators/createViewport.ts +0 -94
  144. package/src/init/creators/index.ts +0 -8
  145. package/src/init/css/index.ts +0 -1
  146. package/src/init/css/processCSSVarsOption.ts +0 -55
  147. package/src/init/index.ts +0 -2
  148. package/src/init/init.ts +0 -134
  149. package/src/init/types.ts +0 -94
  150. package/src/init-data/InitData.ts +0 -96
  151. package/src/init-data/__tests__/InitData.ts +0 -98
  152. package/src/init-data/__tests__/chatParser.ts +0 -102
  153. package/src/init-data/__tests__/initDataParser.ts +0 -136
  154. package/src/init-data/__tests__/parseInitData.ts +0 -136
  155. package/src/init-data/__tests__/userParser.ts +0 -96
  156. package/src/init-data/chatParser.ts +0 -19
  157. package/src/init-data/index.ts +0 -6
  158. package/src/init-data/initDataParser.ts +0 -41
  159. package/src/init-data/parseInitData.ts +0 -10
  160. package/src/init-data/types.ts +0 -164
  161. package/src/init-data/userParser.ts +0 -45
  162. package/src/invoice/Invoice.ts +0 -123
  163. package/src/invoice/index.ts +0 -2
  164. package/src/invoice/types.ts +0 -11
  165. package/src/launch-params/__tests__/retrieveFromUrl.ts +0 -19
  166. package/src/launch-params/computeLaunchData.ts +0 -81
  167. package/src/launch-params/computePageReload.ts +0 -13
  168. package/src/launch-params/getFirstNavigationEntry.ts +0 -10
  169. package/src/launch-params/index.ts +0 -13
  170. package/src/launch-params/launchParamsParser.ts +0 -45
  171. package/src/launch-params/parseLaunchParams.ts +0 -10
  172. package/src/launch-params/retrieveCurrent.ts +0 -27
  173. package/src/launch-params/retrieveFromLocation.ts +0 -10
  174. package/src/launch-params/retrieveFromPerformance.ts +0 -18
  175. package/src/launch-params/retrieveFromUrl.ts +0 -19
  176. package/src/launch-params/retrieveLaunchData.ts +0 -30
  177. package/src/launch-params/serializeLaunchParams.ts +0 -37
  178. package/src/launch-params/storage.ts +0 -33
  179. package/src/launch-params/types.ts +0 -62
  180. package/src/logger/Logger.ts +0 -72
  181. package/src/logger/__tests__/Logger.ts +0 -107
  182. package/src/logger/index.ts +0 -1
  183. package/src/main-button/MainButton.ts +0 -239
  184. package/src/main-button/__tests__/MainButton.ts +0 -346
  185. package/src/main-button/index.ts +0 -2
  186. package/src/main-button/types.ts +0 -26
  187. package/src/mini-app/MiniApp.ts +0 -348
  188. package/src/mini-app/__tests__/MiniApp.ts +0 -140
  189. package/src/mini-app/contactParser.ts +0 -29
  190. package/src/mini-app/index.ts +0 -2
  191. package/src/mini-app/types.ts +0 -38
  192. package/src/misc/__tests__/isRecord.ts +0 -21
  193. package/src/misc/index.ts +0 -2
  194. package/src/misc/isRecord.ts +0 -7
  195. package/src/misc/isTMA.ts +0 -13
  196. package/src/navigation/HashNavigator/HashNavigator.ts +0 -220
  197. package/src/navigation/HashNavigator/__tests__/HashNavigator.ts +0 -144
  198. package/src/navigation/HashNavigator/__tests__/drop.ts +0 -42
  199. package/src/navigation/HashNavigator/__tests__/go.ts +0 -9
  200. package/src/navigation/HashNavigator/drop.ts +0 -36
  201. package/src/navigation/HashNavigator/go.ts +0 -28
  202. package/src/navigation/HashNavigator/index.ts +0 -2
  203. package/src/navigation/HashNavigator/types.ts +0 -41
  204. package/src/navigation/Navigator/Navigator.ts +0 -282
  205. package/src/navigation/Navigator/index.ts +0 -2
  206. package/src/navigation/Navigator/types.ts +0 -55
  207. package/src/navigation/ensurePrefix.ts +0 -9
  208. package/src/navigation/getHash.ts +0 -17
  209. package/src/navigation/index.ts +0 -4
  210. package/src/parsing/ArrayValueParser.ts +0 -79
  211. package/src/parsing/ParseError.ts +0 -27
  212. package/src/parsing/ParseSchemaFieldError.ts +0 -21
  213. package/src/parsing/ValueParser.ts +0 -71
  214. package/src/parsing/__tests__/ArrayValueParser.ts +0 -18
  215. package/src/parsing/__tests__/toRecord.ts +0 -10
  216. package/src/parsing/createValueParserGenerator.ts +0 -16
  217. package/src/parsing/index.ts +0 -10
  218. package/src/parsing/parseBySchema.ts +0 -65
  219. package/src/parsing/parsers/__tests__/array.ts +0 -39
  220. package/src/parsing/parsers/__tests__/boolean.ts +0 -31
  221. package/src/parsing/parsers/__tests__/date.ts +0 -25
  222. package/src/parsing/parsers/__tests__/json.ts +0 -80
  223. package/src/parsing/parsers/__tests__/number.ts +0 -23
  224. package/src/parsing/parsers/__tests__/rgb.ts +0 -22
  225. package/src/parsing/parsers/__tests__/searchParams.ts +0 -105
  226. package/src/parsing/parsers/__tests__/string.ts +0 -25
  227. package/src/parsing/parsers/array.ts +0 -9
  228. package/src/parsing/parsers/boolean.ts +0 -22
  229. package/src/parsing/parsers/date.ts +0 -11
  230. package/src/parsing/parsers/index.ts +0 -8
  231. package/src/parsing/parsers/json.ts +0 -17
  232. package/src/parsing/parsers/number.ts +0 -21
  233. package/src/parsing/parsers/rgb.ts +0 -10
  234. package/src/parsing/parsers/searchParams.ts +0 -24
  235. package/src/parsing/parsers/string.ts +0 -12
  236. package/src/parsing/toRecord.ts +0 -27
  237. package/src/parsing/types.ts +0 -32
  238. package/src/parsing/unexpectedTypeError.ts +0 -6
  239. package/src/popup/Popup.ts +0 -91
  240. package/src/popup/__tests__/Popup.ts +0 -130
  241. package/src/popup/__tests__/preparePopupParams.ts +0 -85
  242. package/src/popup/index.ts +0 -2
  243. package/src/popup/preparePopupParams.ts +0 -59
  244. package/src/popup/types.ts +0 -69
  245. package/src/qr-scanner/QRScanner.ts +0 -95
  246. package/src/qr-scanner/index.ts +0 -2
  247. package/src/qr-scanner/types.ts +0 -11
  248. package/src/settings-button/SettingsButton.ts +0 -85
  249. package/src/settings-button/index.ts +0 -2
  250. package/src/settings-button/types.ts +0 -15
  251. package/src/state/State.ts +0 -67
  252. package/src/state/index.ts +0 -2
  253. package/src/state/types.ts +0 -31
  254. package/src/storage.ts +0 -69
  255. package/src/supports/__tests__/supports.ts +0 -123
  256. package/src/supports/createSupportsFunc.ts +0 -18
  257. package/src/supports/createSupportsParamFunc.ts +0 -27
  258. package/src/supports/index.ts +0 -4
  259. package/src/supports/supports.ts +0 -84
  260. package/src/supports/types.ts +0 -1
  261. package/src/theme-params/ThemeParams.ts +0 -131
  262. package/src/theme-params/__tests__/keys.ts +0 -19
  263. package/src/theme-params/__tests__/parseThemeParams.ts +0 -29
  264. package/src/theme-params/__tests__/serializeThemeParams.ts +0 -29
  265. package/src/theme-params/__tests__/themeParamsParser.ts +0 -29
  266. package/src/theme-params/index.ts +0 -6
  267. package/src/theme-params/keys.ts +0 -24
  268. package/src/theme-params/parseThemeParams.ts +0 -10
  269. package/src/theme-params/requestThemeParams.ts +0 -13
  270. package/src/theme-params/serializeThemeParams.ts +0 -20
  271. package/src/theme-params/themeParamsParser.ts +0 -22
  272. package/src/theme-params/types.ts +0 -33
  273. package/src/timeout/TimeoutError.ts +0 -6
  274. package/src/timeout/__tests__/isTimeoutError.ts +0 -9
  275. package/src/timeout/__tests__/withTimeout.ts +0 -28
  276. package/src/timeout/index.ts +0 -4
  277. package/src/timeout/isTimeoutError.ts +0 -9
  278. package/src/timeout/sleep.ts +0 -10
  279. package/src/timeout/withTimeout.ts +0 -24
  280. package/src/types/index.ts +0 -4
  281. package/src/types/methods.ts +0 -18
  282. package/src/types/platform.ts +0 -14
  283. package/src/types/request-id.ts +0 -10
  284. package/src/types/utils.ts +0 -50
  285. package/src/utils/Utils.ts +0 -107
  286. package/src/utils/index.ts +0 -1
  287. package/src/version/__tests__/compareVersions.ts +0 -19
  288. package/src/version/compareVersions.ts +0 -28
  289. package/src/version/index.ts +0 -2
  290. package/src/version/types.ts +0 -4
  291. package/src/viewport/Viewport.ts +0 -171
  292. package/src/viewport/__tests__/isStableViewportPlatform.ts +0 -15
  293. package/src/viewport/__tests__/utils.ts +0 -12
  294. package/src/viewport/index.ts +0 -4
  295. package/src/viewport/isStableViewportPlatform.ts +0 -10
  296. package/src/viewport/requestViewport.ts +0 -23
  297. package/src/viewport/types.ts +0 -23
  298. package/src/viewport/utils.ts +0 -7
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  [sdk-code-link]: https://github.com/Telegram-Mini-Apps/tma.js/tree/master/packages/sdk
8
8
 
9
- [sdk-docs-link]: https://docs.telegram-mini-apps.com/packages/typescript/tma-js-sdk/about
9
+ [sdk-docs-link]: https://docs.telegram-mini-apps.com/packages/tma-js-sdk
10
10
 
11
11
  [sdk-npm-link]: https://npmjs.com/package/@tma.js/sdk
12
12
 
@@ -27,5 +27,5 @@ Mini Apps. It consists of several individual components, each responsible for a
27
27
  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
- Apps [documentation](https://docs.telegram-mini-apps.com/platform/about-platform)
30
+ Apps [documentation](https://docs.telegram-mini-apps.com/platform/about)
31
31
  to grasp the fundamental concepts of the platform.
@@ -1,3 +1,2 @@
1
1
  export * from './hasExternalNotify.js';
2
2
  export * from './hasWebviewProxy.js';
3
- export * from './isIframe.js';
@@ -3,69 +3,69 @@ import type { IsNever, Not } from '../../types/index.js';
3
3
  import type { ClipboardTextReceivedPayload, CustomMethodInvokedPayload, InvoiceClosedPayload, PhoneRequestedPayload, PopupClosedPayload, QrTextReceivedPayload, ThemeChangedPayload, ViewportChangedPayload, WriteAccessRequestedPayload } from './parsers/index.js';
4
4
  /**
5
5
  * Map where key is known event name, and value is its listener.
6
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events
6
+ * @see https://docs.telegram-mini-apps.com/platform/events
7
7
  */
8
8
  export interface MiniAppsEvents {
9
9
  /**
10
10
  * User clicked back button.
11
11
  * @since v6.1
12
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#back-button-pressed
12
+ * @see https://docs.telegram-mini-apps.com/platform/events#back-button-pressed
13
13
  */
14
14
  back_button_pressed: () => void;
15
15
  /**
16
16
  * Telegram application attempted to extract text from clipboard.
17
17
  * @param payload - event payload.
18
18
  * @since v6.4
19
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#clipboard-text-received
19
+ * @see https://docs.telegram-mini-apps.com/platform/events#clipboard-text-received
20
20
  */
21
21
  clipboard_text_received: (payload: ClipboardTextReceivedPayload) => void;
22
22
  /**
23
23
  * Custom method invocation completed.
24
24
  * @param payload - event payload.
25
25
  * @since v6.9
26
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#custom-method-invoked
26
+ * @see https://docs.telegram-mini-apps.com/platform/events#custom-method-invoked
27
27
  */
28
28
  custom_method_invoked: (payload: CustomMethodInvokedPayload) => void;
29
29
  /**
30
30
  * An invoice was closed.
31
31
  * @param payload - invoice close information.
32
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#invoice-closed
32
+ * @see https://docs.telegram-mini-apps.com/platform/events#invoice-closed
33
33
  */
34
34
  invoice_closed: (payload: InvoiceClosedPayload) => void;
35
35
  /**
36
36
  * User clicked the Main Button.
37
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#main-button-pressed
37
+ * @see https://docs.telegram-mini-apps.com/platform/events#main-button-pressed
38
38
  */
39
39
  main_button_pressed: () => void;
40
40
  /**
41
41
  * Application received phone access request status.
42
42
  * @param payload - event payload.
43
43
  * @since v6.9
44
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#phone-requested
44
+ * @see https://docs.telegram-mini-apps.com/platform/events#phone-requested
45
45
  */
46
46
  phone_requested: (payload: PhoneRequestedPayload) => void;
47
47
  /**
48
48
  * Popup was closed.
49
49
  * @param payload - event payload.
50
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#popup-closed
50
+ * @see https://docs.telegram-mini-apps.com/platform/events#popup-closed
51
51
  */
52
52
  popup_closed: (payload: PopupClosedPayload) => void;
53
53
  /**
54
54
  * Parent iframe requested current iframe reload.
55
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#reload-iframe
55
+ * @see https://docs.telegram-mini-apps.com/platform/events#reload-iframe
56
56
  */
57
57
  reload_iframe: () => void;
58
58
  /**
59
59
  * The QR scanner scanned some QR and extracted its content.
60
60
  * @param payload - event payload.
61
61
  * @since v6.4
62
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#qr-text-received
62
+ * @see https://docs.telegram-mini-apps.com/platform/events#qr-text-received
63
63
  */
64
64
  qr_text_received: (payload: QrTextReceivedPayload) => void;
65
65
  /**
66
66
  * QR scanner was closed.
67
67
  * @since v6.4
68
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#scan-qr-popup-closed
68
+ * @see https://docs.telegram-mini-apps.com/platform/events#scan-qr-popup-closed
69
69
  */
70
70
  scan_qr_popup_closed: () => void;
71
71
  /**
@@ -73,34 +73,34 @@ export interface MiniAppsEvents {
73
73
  * `<style/>` tag html content, a developer could use. The stylesheet described in the payload
74
74
  * will help the developer to stylize the app scrollbar (but he is still able to do it himself).
75
75
  * @param html - `style` tag inner HTML.
76
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#set-custom-style
76
+ * @see https://docs.telegram-mini-apps.com/platform/events#set-custom-style
77
77
  */
78
78
  set_custom_style: (html: string) => void;
79
79
  /**
80
80
  * Occurs when the Settings Button was pressed.
81
81
  * @since v6.1
82
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#settings-button-pressed
82
+ * @see https://docs.telegram-mini-apps.com/platform/events#settings-button-pressed
83
83
  */
84
84
  settings_button_pressed: () => void;
85
85
  /**
86
86
  * Occurs whenever theme settings are changed in the user's Telegram app
87
87
  * (including switching to night mode).
88
88
  * @param payload - event payload.
89
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#theme-changed
89
+ * @see https://docs.telegram-mini-apps.com/platform/events#theme-changed
90
90
  */
91
91
  theme_changed: (payload: ThemeChangedPayload) => void;
92
92
  /**
93
93
  * Occurs whenever the viewport has been changed. For example, when the user started
94
94
  * dragging the application or called the expansion method.
95
95
  * @param payload - event payload.
96
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#viewport-changed
96
+ * @see https://docs.telegram-mini-apps.com/platform/events#viewport-changed
97
97
  */
98
98
  viewport_changed: (payload: ViewportChangedPayload) => void;
99
99
  /**
100
100
  * Application received write access request status.
101
101
  * @param payload - event payload.
102
102
  * @since v6.9
103
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/events#write-access-requested
103
+ * @see https://docs.telegram-mini-apps.com/platform/events#write-access-requested
104
104
  */
105
105
  write_access_requested: (payload: WriteAccessRequestedPayload) => void;
106
106
  }
@@ -17,13 +17,13 @@ interface CreateParams<Params = undefined, VersionedParam extends UnionKeys<Para
17
17
  }
18
18
  /**
19
19
  * Describes list of events and their parameters that could be posted by Bridge.
20
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods
20
+ * @see https://docs.telegram-mini-apps.com/platform/methods
21
21
  */
22
22
  export interface MiniAppsMethods {
23
23
  /**
24
24
  * Notifies parent iframe about the current frame is ready. This method is only used in the Web
25
25
  * version of Telegram. As a result, Mini App will receive `set_custom_style` event.
26
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#iframe-ready
26
+ * @see https://docs.telegram-mini-apps.com/platform/methods#iframe-ready
27
27
  */
28
28
  iframe_ready: CreateParams<{
29
29
  /**
@@ -33,18 +33,18 @@ export interface MiniAppsMethods {
33
33
  } | undefined>;
34
34
  /**
35
35
  * Notifies parent iframe about the current iframe is going to reload.
36
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#iframe-will-reload
36
+ * @see https://docs.telegram-mini-apps.com/platform/methods#iframe-will-reload
37
37
  */
38
38
  iframe_will_reload: CreateParams;
39
39
  /**
40
40
  * Closes Mini App.
41
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-close
41
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-close
42
42
  */
43
43
  web_app_close: CreateParams;
44
44
  /**
45
45
  * Closes a QR scanner. The Telegram application creates `scan_qr_popup_closed` event.
46
46
  * @since v6.4
47
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-close-scan-qr-popup
47
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-close-scan-qr-popup
48
48
  */
49
49
  web_app_close_scan_qr_popup: CreateParams;
50
50
  /**
@@ -54,7 +54,7 @@ export interface MiniAppsMethods {
54
54
  * To get more information, take a look at `web_app_data` field in the
55
55
  * class [Message](https://core.telegram.org/bots/api#message).
56
56
  *
57
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-data-send
57
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-data-send
58
58
  */
59
59
  web_app_data_send: CreateParams<{
60
60
  /**
@@ -64,20 +64,20 @@ export interface MiniAppsMethods {
64
64
  }>;
65
65
  /**
66
66
  * Expands the Mini App.
67
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-expand
67
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-expand
68
68
  */
69
69
  web_app_expand: CreateParams;
70
70
  /**
71
71
  * Invokes custom method.
72
72
  * @since v6.9
73
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-invoke-custom-method
73
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-invoke-custom-method
74
74
  */
75
75
  web_app_invoke_custom_method: CreateParams<AnyInvokeCustomMethodParams>;
76
76
  /**
77
77
  * Opens an invoice by its specified slug. More information about invoices in
78
78
  * this [documentation](https://core.telegram.org/bots/payments).
79
79
  * @since v6.1
80
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-open-invoice
80
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-open-invoice
81
81
  */
82
82
  web_app_open_invoice: CreateParams<{
83
83
  /**
@@ -87,7 +87,7 @@ export interface MiniAppsMethods {
87
87
  }>;
88
88
  /**
89
89
  * Opens link in the default browser. Mini App will not be closed.
90
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-open-link
90
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-open-link
91
91
  */
92
92
  web_app_open_link: CreateParams<{
93
93
  /**
@@ -104,7 +104,7 @@ export interface MiniAppsMethods {
104
104
  /**
105
105
  * Opens a new popup. When user closes the popup, Telegram creates the `popup_closed` event.
106
106
  * @since v6.2
107
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-open-popup
107
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-open-popup
108
108
  */
109
109
  web_app_open_popup: CreateParams<PopupParams>;
110
110
  /**
@@ -112,7 +112,7 @@ export interface MiniAppsMethods {
112
112
  * the `scan_qr_popup_closed` event. When the scanner reads QR, Telegram creates the
113
113
  * `qr_text_received` event.
114
114
  * @since v6.4
115
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-open-scan-qr-popup
115
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-open-scan-qr-popup
116
116
  */
117
117
  web_app_open_scan_qr_popup: CreateParams<{
118
118
  /**
@@ -124,7 +124,7 @@ export interface MiniAppsMethods {
124
124
  * Opens the Telegram link by its pathname and query parameters. The link will be opened in the
125
125
  * Telegram app, Mini App will be closed.
126
126
  * @since v6.1
127
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-open-tg-link
127
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-open-tg-link
128
128
  */
129
129
  web_app_open_tg_link: CreateParams<{
130
130
  /**
@@ -137,7 +137,7 @@ export interface MiniAppsMethods {
137
137
  * Reads text from the clipboard. The method accepts a request identifier which is used to
138
138
  * appropriately retrieve the method execution result from the `clipboard_text_received` event.
139
139
  * @since v6.4
140
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-read-text-from-clipboard
140
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-read-text-from-clipboard
141
141
  */
142
142
  web_app_read_text_from_clipboard: CreateParams<{
143
143
  /**
@@ -149,36 +149,36 @@ export interface MiniAppsMethods {
149
149
  /**
150
150
  * Notifies Telegram about current application is ready to be shown. This method will make
151
151
  * Telegram to remove application loader and display Mini App.
152
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-ready
152
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-ready
153
153
  */
154
154
  web_app_ready: CreateParams;
155
155
  /**
156
156
  * Requests access to current user's phone.
157
157
  * @since v6.9
158
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-request-phone
158
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-request-phone
159
159
  */
160
160
  web_app_request_phone: CreateParams;
161
161
  /**
162
162
  * Requests current theme from Telegram. As a result, Telegram will create `theme_changed` event.
163
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-request-theme
163
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-request-theme
164
164
  */
165
165
  web_app_request_theme: CreateParams;
166
166
  /**
167
167
  * Requests current viewport information from Telegram. As a result, Telegram will create
168
168
  * `viewport_changed` event.
169
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-request-viewport
169
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-request-viewport
170
170
  */
171
171
  web_app_request_viewport: CreateParams;
172
172
  /**
173
173
  * Requests write message access to current user.
174
174
  * @since v6.9
175
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-rqeuest-write-access
175
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-rqeuest-write-access
176
176
  */
177
177
  web_app_request_write_access: CreateParams;
178
178
  /**
179
179
  * Updates the Mini App background color.
180
180
  * @since v6.1
181
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-set-background-color
181
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-set-background-color
182
182
  */
183
183
  web_app_set_background_color: CreateParams<{
184
184
  /**
@@ -189,7 +189,7 @@ export interface MiniAppsMethods {
189
189
  /**
190
190
  * Updates the Mini App header color.
191
191
  * @since v6.1
192
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-set-header-color
192
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-set-header-color
193
193
  */
194
194
  web_app_set_header_color: CreateParams<{
195
195
  /**
@@ -206,7 +206,7 @@ export interface MiniAppsMethods {
206
206
  /**
207
207
  * Updates the Back Button settings.
208
208
  * @since v6.1
209
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-setup-back-button
209
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-setup-back-button
210
210
  */
211
211
  web_app_setup_back_button: CreateParams<{
212
212
  /**
@@ -216,7 +216,7 @@ export interface MiniAppsMethods {
216
216
  }>;
217
217
  /**
218
218
  * Updates current closing behavior.
219
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-setup-closing-behavior
219
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-setup-closing-behavior
220
220
  */
221
221
  web_app_setup_closing_behavior: CreateParams<{
222
222
  /**
@@ -226,7 +226,7 @@ export interface MiniAppsMethods {
226
226
  }>;
227
227
  /**
228
228
  * Updates the Main Button settings.
229
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-setup-main-button
229
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-setup-main-button
230
230
  */
231
231
  web_app_setup_main_button: CreateParams<{
232
232
  /**
@@ -258,7 +258,7 @@ export interface MiniAppsMethods {
258
258
  /**
259
259
  * Updates current state of Settings Button.
260
260
  * @since v6.10
261
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-setup-settings-button
261
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-setup-settings-button
262
262
  */
263
263
  web_app_setup_settings_button: CreateParams<{
264
264
  /**
@@ -272,7 +272,7 @@ export interface MiniAppsMethods {
272
272
  * the user to choose a specific chat, then opens that chat and inserts the bot's username and
273
273
  * the specified inline query in the input field.
274
274
  * @since v6.7
275
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-switch-inline-query
275
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-switch-inline-query
276
276
  */
277
277
  web_app_switch_inline_query: CreateParams<{
278
278
  /**
@@ -288,7 +288,7 @@ export interface MiniAppsMethods {
288
288
  /**
289
289
  * Generates haptic feedback event.
290
290
  * @since v6.1
291
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#web-app-trigger-haptic-feedback
291
+ * @see https://docs.telegram-mini-apps.com/platform/methods#web-app-trigger-haptic-feedback
292
292
  */
293
293
  web_app_trigger_haptic_feedback: CreateParams<AnyHapticFeedbackParams>;
294
294
  }
@@ -17,7 +17,7 @@ export interface PopupParams {
17
17
  }
18
18
  /**
19
19
  * Describes the native popup button.
20
- * @see https://docs.telegram-mini-apps.com/platform/apps-communication/methods#popupbutton
20
+ * @see https://docs.telegram-mini-apps.com/platform/methods#popupbutton
21
21
  */
22
22
  export type PopupButton = {
23
23
  /**
@@ -1,5 +1,5 @@
1
1
  export { BackButton, type BackButtonEventName, type BackButtonEventListener, } from './back-button/index.js';
2
- export { createPostEvent, isIframe, invokeCustomMethod, on, off, once, parseMessage, postEvent, request, subscribe, unsubscribe, MethodUnsupportedError, ParameterUnsupportedError, type HeaderColorKey, type InvoiceStatus, type ImpactHapticFeedbackStyle, type MiniAppsMethodName, type MiniAppsEventName, type MiniAppsEventParams, type MiniAppsEventListener, type MiniAppsGlobalEventListener, type MiniAppsEmptyMethodName, type MiniAppsMethodAcceptParams, type MiniAppsMethodParams, type MiniAppsNonEmptyMethodName, type MiniAppsMethods, type MiniAppsEventEmitter, type MiniAppsEventHasParams, type MiniAppsEvents, type NotificationHapticFeedbackType, type PhoneRequestedStatus, type PostEvent, type RequestOptions, type RequestOptionsAdvanced, type SwitchInlineQueryChatType, type WriteAccessRequestedStatus, } from './bridge/index.js';
2
+ export { createPostEvent, invokeCustomMethod, on, off, once, parseMessage, postEvent, request, subscribe, unsubscribe, MethodUnsupportedError, ParameterUnsupportedError, type HeaderColorKey, type InvoiceStatus, type ImpactHapticFeedbackStyle, type MiniAppsMethodName, type MiniAppsEventName, type MiniAppsEventParams, type MiniAppsEventListener, type MiniAppsGlobalEventListener, type MiniAppsEmptyMethodName, type MiniAppsMethodAcceptParams, type MiniAppsMethodParams, type MiniAppsNonEmptyMethodName, type MiniAppsMethods, type MiniAppsEventEmitter, type MiniAppsEventHasParams, type MiniAppsEvents, type NotificationHapticFeedbackType, type PhoneRequestedStatus, type PostEvent, type RequestOptions, type RequestOptionsAdvanced, type SwitchInlineQueryChatType, type WriteAccessRequestedStatus, } from './bridge/index.js';
3
3
  export { classNames, mergeClassNames } from './classnames/index.js';
4
4
  export { ClosingBehavior, type ClosingBehaviorEventListener, type ClosingBehaviorEventName, type ClosingBehaviorEvents, } from './closing-behavior/index.js';
5
5
  export { CloudStorage } from './cloud-storage/index.js';
@@ -9,10 +9,10 @@ export { HapticFeedback } from './haptic-feedback/index.js';
9
9
  export { init, type InitOptions, type InitResult, } from './init/index.js';
10
10
  export { chatParser, InitData, initDataParser, parseInitData, userParser, type Chat, type ChatType, type InitDataParsed, type User, } from './init-data/index.js';
11
11
  export { Invoice, type InvoiceEvents, type InvoiceEventListener, type InvoiceEventName, } from './invoice/index.js';
12
- export { launchParamsParser, parseLaunchParams, retrieveLaunchData, serializeLaunchParams, type LaunchParams, type LaunchData, } from './launch-params/index.js';
12
+ export { launchParamsParser, parseLaunchParams, retrieveLaunchData, retrieveLaunchParams, serializeLaunchParams, type LaunchParams, type LaunchData, } from './launch-params/index.js';
13
13
  export { MainButton, type MainButtonParams, type MainButtonProps, type MainButtonEvents, type MainButtonEventName, type MainButtonEventListener, } from './main-button/index.js';
14
14
  export { MiniApp, type MiniAppHeaderColor, type MiniAppEventName, type MiniAppEventListener, type MiniAppEvents, type MiniAppProps, } from './mini-app/index.js';
15
- export { isTMA, isRecord } from './misc/index.js';
15
+ export { isTMA, isRecord, isIframe, isPageReload, } from './misc/index.js';
16
16
  export { getHash, HashNavigator, Navigator, type NavigationEntry, type NavigatorConEntry, type NavigatorOptions, type HashNavigatorOptions, type HashNavigatorEventsMap, type HashNavigatorEventListener, type HashNavigatorEventName, } from './navigation/index.js';
17
17
  export { boolean, searchParams, string, rgb, array, date, json, number, ParseError, ParseSchemaFieldError, } from './parsing/index.js';
18
18
  export { Popup, type PopupEventName, type PopupEventListener, type PopupEvents, type OpenPopupOptions, type OpenPopupOptionsButton, } from './popup/index.js';
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export type ChatType = 'sender' | 'private' | 'group' | 'supergroup' | 'channel' | string;
5
5
  /**
6
- * Describes Telegram Mini Apps [User](https://docs.telegram-mini-apps.com/platform/launch-parameters/init-data#user) type.
6
+ * Describes Telegram Mini Apps [User](https://docs.telegram-mini-apps.com/platform/init-data#user) type.
7
7
  */
8
8
  export interface User {
9
9
  /**
@@ -51,7 +51,7 @@ export interface User {
51
51
  username?: string;
52
52
  }
53
53
  /**
54
- * Describes Telegram Mini Apps [Chat](https://docs.telegram-mini-apps.com/platform/launch-parameters/init-data#chat) type.
54
+ * Describes Telegram Mini Apps [Chat](https://docs.telegram-mini-apps.com/platform/init-data#chat) type.
55
55
  */
56
56
  export interface Chat {
57
57
  /**
@@ -77,7 +77,7 @@ export interface Chat {
77
77
  username?: string;
78
78
  }
79
79
  /**
80
- * Describes Telegram Mini Apps [InitData](https://docs.telegram-mini-apps.com/platform/launch-parameters/init-data#parameters-list)
80
+ * Describes Telegram Mini Apps [InitData](https://docs.telegram-mini-apps.com/platform/init-data#parameters-list)
81
81
  * type.
82
82
  */
83
83
  export interface InitDataParsed {
@@ -1,13 +1,10 @@
1
- export * from './computeLaunchData.js';
2
- export * from './computePageReload.js';
3
- export * from './getFirstNavigationEntry.js';
4
1
  export * from './launchParamsParser.js';
5
2
  export * from './parseLaunchParams.js';
6
- export * from './retrieveCurrent.js';
7
3
  export * from './retrieveFromLocation.js';
8
4
  export * from './retrieveFromPerformance.js';
9
5
  export * from './retrieveFromUrl.js';
10
6
  export * from './retrieveLaunchData.js';
7
+ export * from './retrieveLaunchParams.js';
11
8
  export * from './serializeLaunchParams.js';
12
9
  export * from './storage.js';
13
10
  export * from './types.js';
@@ -1,6 +1,6 @@
1
1
  import type { LaunchParams } from './types.js';
2
2
  /**
3
- * Attempts to extract launch parameters from the current window location hash.
4
- * @throws {Error} window.location.hash contains invalid data.
3
+ * @returns Launch parameters from the current window location hash.
4
+ * @throws Error if function was unable to extract launch parameters from the window location hash.
5
5
  */
6
6
  export declare function retrieveFromLocation(): LaunchParams;
@@ -1,8 +1,7 @@
1
1
  import type { LaunchParams } from './types.js';
2
2
  /**
3
- * Attempts to read launch parameters using window.performance data.
4
- * @throws {Error} Unable to get first navigation entry.
5
- * @throws {Error} First navigation entry does not contain hash part.
6
- * @throws {TypeError} Unable to parse value.
3
+ * @returns Launch parameters based on the first navigation entry.
4
+ * @throws Error if function was unable to extract launch parameters from the navigation
5
+ * entry.
7
6
  */
8
7
  export declare function retrieveFromPerformance(): LaunchParams;
@@ -1,6 +1,7 @@
1
- import type { LaunchParams } from '../launch-params/types.js';
1
+ import type { LaunchParams } from './types.js';
2
2
  /**
3
- * Retrieves launch parameters from the specified URL.
4
3
  * @param url - URL to extract launch parameters from.
4
+ * @returns Launch parameters from the specified URL.
5
+ * @throws Error if function was unable to extract launch parameters from the passed URL.
5
6
  */
6
7
  export declare function retrieveFromUrl(url: string): LaunchParams;
@@ -2,5 +2,6 @@ import type { LaunchData } from './types.js';
2
2
  /**
3
3
  * Returns launch data information. Function ignores passed options in case, it was already
4
4
  * called. It caches the last returned value.
5
+ * @deprecated Use `retrieveLaunchParams` and `isPageReload` functions separately where required.
5
6
  */
6
7
  export declare function retrieveLaunchData(): LaunchData;
@@ -0,0 +1,6 @@
1
+ import type { LaunchParams } from './types.js';
2
+ /**
3
+ * @returns Launch parameters from any known source.
4
+ * @throws Error if extraction was unsuccessful.
5
+ */
6
+ export declare function retrieveLaunchParams(): LaunchParams;
@@ -1,11 +1,9 @@
1
1
  import type { LaunchParams } from './types.js';
2
2
  /**
3
- * Attempts to extract launch parameters directly from the session storage.
4
- * @returns Launch parameters in case, they were stored before or null, if there is no launch
5
- * parameters key in the session storage.
6
- * @throws {Error} Data stored in the session storage is invalid.
3
+ * @returns Launch parameters stored in the session storage.
4
+ * @throws Error if function was unable to extract launch parameters from the window location hash.
7
5
  */
8
- export declare function retrieveFromStorage(): LaunchParams | null;
6
+ export declare function retrieveFromStorage(): LaunchParams;
9
7
  /**
10
8
  * Saves specified launch parameters in the session storage.
11
9
  * @param value - launch params to save.
@@ -3,7 +3,7 @@ import type { ThemeParamsParsed } from '../theme-params/index.js';
3
3
  import type { Platform } from '../types/index.js';
4
4
  /**
5
5
  * Telegram Mini Apps launch parameters.
6
- * @see https://docs.telegram-mini-apps.com/platform/launch-parameters/common-information
6
+ * @see https://docs.telegram-mini-apps.com/platform/launch-parameters
7
7
  */
8
8
  export interface LaunchParams {
9
9
  /**
@@ -3,4 +3,4 @@
3
3
  * @returns First navigation entry or null, in case performance functionality is not supported
4
4
  * or navigation entry was not found.
5
5
  */
6
- export declare function getFirstNavigationEntry(): PerformanceNavigationTiming | null;
6
+ export declare function getFirstNavigationEntry(): PerformanceNavigationTiming | undefined;
@@ -1,2 +1,5 @@
1
+ export * from './getFirstNavigationEntry.js';
2
+ export * from './isIframe.js';
3
+ export * from './isPageReload.js';
1
4
  export * from './isRecord.js';
2
5
  export * from './isTMA.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Returns true in case, current environment is iframe.
3
2
  * @see https://stackoverflow.com/a/326076
3
+ * @returns True, if current environment is iframe.
4
4
  */
5
5
  export declare function isIframe(): boolean;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @returns True, if current page was reloaded.
3
+ * @see https://stackoverflow.com/a/36444134/11894710
4
+ */
5
+ export declare function isPageReload(): boolean;
@@ -2,7 +2,7 @@ import type { RGB } from '../colors/index.js';
2
2
  import type { StateEvents } from '../state/index.js';
3
3
  export type ThemeParamsKey = 'accentTextColor' | 'backgroundColor' | 'buttonColor' | 'buttonTextColor' | 'destructiveTextColor' | 'headerBackgroundColor' | 'hintColor' | 'linkColor' | 'secondaryBackgroundColor' | 'sectionBackgroundColor' | 'sectionHeaderTextColor' | 'subtitleTextColor' | 'textColor';
4
4
  /**
5
- * Application [theme parameters](https://docs.telegram-mini-apps.com/platform/functionality/theming).
5
+ * Application [theme parameters](https://docs.telegram-mini-apps.com/platform/theming).
6
6
  * Defines palette used by the Telegram application.
7
7
  */
8
8
  export interface ThemeParamsParsed {