diff --git a/.changeset/happy-balloons-appear.md b/.changeset/happy-balloons-appear.md new file mode 100644 index 000000000..009ea91be --- /dev/null +++ b/.changeset/happy-balloons-appear.md @@ -0,0 +1,5 @@ +--- +"@tma.js/sdk": patch +--- + +Save raw colors instead of computed ones when calling MiniApp's color setters. diff --git a/apps/docs/platform/authorizing-user.md b/apps/docs/platform/authorizing-user.md index 3186b8c0e..720d23d4d 100644 --- a/apps/docs/platform/authorizing-user.md +++ b/apps/docs/platform/authorizing-user.md @@ -9,7 +9,7 @@ First of all, it is required to begin with the transmitting init data from the c using this code: ```typescript -import { retrieveRawInitData } from '@telegram-apps/sdk' +import { retrieveRawInitData } from '@tma.js/sdk' const initDataRaw = retrieveRawInitData() @@ -37,7 +37,7 @@ authorizes the user. The Node.js example uses [express](https://www.npmjs.com/package/express) to process HTTP requests. ```typescript -import { validate, parse, type InitData } from '@telegram-apps/init-data-node'; +import { validate, parse, type InitData } from '@tma.js/init-data-node'; import express, { type ErrorRequestHandler, type RequestHandler, diff --git a/apps/docs/platform/events.md b/apps/docs/platform/events.md index 6ea4d39d0..505432f5e 100644 --- a/apps/docs/platform/events.md +++ b/apps/docs/platform/events.md @@ -78,13 +78,13 @@ type and assign it to all 3 paths. ## Listening to Events Handling all possible environments for a developer's application can be challenging. To simplify -this process, the community developed the [@telegram-apps/sdk](../packages/telegram-apps-sdk/2-x) +this process, the community developed the [@tma.js/sdk](../packages/tma-js-sdk) package, which greatly eases integration. Here's how to use it: ```ts -import { on } from '@telegram-apps/sdk'; +import { on } from '@tma.js/sdk'; // Start listening to "viewport_changed" event. Returned value // is a function, which removes this event listener. @@ -97,7 +97,7 @@ removeListener(); ``` You can learn more about calling methods in the -package's [documentation](../packages/telegram-apps-bridge/events.md#listening-to-events). +package's [documentation](../packages/tma-js-bridge/events.md#listening-to-events). ## Available Events diff --git a/apps/docs/platform/init-data.md b/apps/docs/platform/init-data.md index 132ec010f..3c4468c71 100644 --- a/apps/docs/platform/init-data.md +++ b/apps/docs/platform/init-data.md @@ -15,10 +15,10 @@ and init data specifically. ## Retrieving To extract init data, a developer can use the `retrieveLaunchParams` function -from [@telegram-apps/sdk](../packages/telegram-apps-sdk/2-x). +from [@tma.js/sdk](../packages/tma-js-sdk). ```typescript -import { retrieveLaunchParams } from '@telegram-apps/sdk'; +import { retrieveLaunchParams } from '@tma.js/sdk'; const { initDataRaw, initData } = retrieveLaunchParams(); ``` @@ -52,7 +52,7 @@ carried out on the server side. Here is how a developer could send init data to server: ```typescript -import { retrieveLaunchParams } from '@telegram-apps/sdk'; +import { retrieveLaunchParams } from '@tma.js/sdk'; const { initDataRaw } = retrieveLaunchParams(); @@ -82,7 +82,7 @@ and used in the future code execution. > [!TIP] > To avoid possible problems related to the init data validation process, we recommend utilizing > well-established and tested packages: -> - For Node: [@telegram-apps/init-data-node](../packages/telegram-apps-init-data-node) +> - For Node: [@tma.js/init-data-node](../packages/tma-js-init-data-node) > - For GoLang: [init-data-golang](../packages/init-data-golang.md) ### Using Telegram Bot Token diff --git a/apps/docs/platform/methods.md b/apps/docs/platform/methods.md index d76725621..4f833810b 100644 --- a/apps/docs/platform/methods.md +++ b/apps/docs/platform/methods.md @@ -79,19 +79,19 @@ window.external.notify(data); ## Calling Methods Handling all possible environments for a developer's application can be challenging. To simplify -this process, the community developed the [@telegram-apps/sdk](../packages/telegram-apps-sdk/2-x) +this process, the community developed the [@tma.js/sdk](../packages/tma-js-sdk) package, which greatly eases integration. Here's how to use it: ```ts -import { postEvent } from '@telegram-apps/sdk'; +import { postEvent } from '@tma.js/sdk'; postEvent('web_app_set_header_color', { color_key: 'bg_color' }); ``` You can learn more about calling methods in the -package's [documentation](../packages/telegram-apps-bridge/events.md#calling-methods). +package's [documentation](../packages/tma-js-bridge/events.md#calling-methods). ## Available Methods diff --git a/apps/docs/platform/sticky-app.md b/apps/docs/platform/sticky-app.md index 26dd6d0b8..48be508e2 100644 --- a/apps/docs/platform/sticky-app.md +++ b/apps/docs/platform/sticky-app.md @@ -6,7 +6,7 @@ Starting from the Mini Apps version **7.7**, you are able to prevent the applica closing due to swipe down by using a special method. - [Mini Apps method](methods.md#web-app-setup-swipe-behavior) -- [@telegram-apps/sdk component](../packages/telegram-apps-sdk/2-x/components/swipe-behavior.md) +- [@tma.js/sdk component](../packages/tma-js-sdk/features/swipe-behavior) ::: @@ -74,7 +74,7 @@ Here is the HTML and CSS you can use: My application goes here. - +