From 4d8cee5e0c0f4cc95269597f3e97c0ae4ec60f7f Mon Sep 17 00:00:00 2001 From: Vladislav Kibenko Date: Sat, 6 Jul 2024 18:39:02 +0300 Subject: [PATCH] @tma.js -> @telegram-apps --- README.md | 6 ++-- package.json | 4 +-- pnpm-lock.yaml | 36 +++++++++++----------- src/components/App.jsx | 4 +-- src/components/DisplayData/DisplayData.jsx | 4 +-- src/components/Link/Link.jsx | 2 +- src/components/RGB/RGB.jsx | 4 +-- src/components/Root.jsx | 6 ++-- src/pages/InitDataPage/InitDataPage.jsx | 4 +-- src/pages/LaunchParamsPage.jsx | 2 +- src/pages/ThemeParamsPage.jsx | 2 +- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index e54d0d4..37549b6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Mini Apps platform using the following technologies and libraries: - [Solid](https://solidjs.com/) - [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript) - [TON Connect](https://docs.ton.org/develop/dapps/ton-connect/overview) -- [@tma.js SDK](https://docs.telegram-mini-apps.com/packages/tma-js-sdk) +- [@telegram-apps SDK](https://docs.telegram-mini-apps.com/packages/telegram-apps-sdk) - [Vite](https://vitejs.dev/) > This boilerplate was created using [pnpm](https://pnpm.io/). Therefore, it is required to use @@ -68,7 +68,7 @@ VITE ready in 275 ms To view the application, you need to open the `Local` link (`http://localhost:5173/solidjs-js-template` in this example) in your browser. -It is important to note that some libraries in this template, such as `@tma.js/sdk-solid`, are not +It is important to note that some libraries in this template, such as `@telegram-apps/sdk-solid`, are not intended for use outside of Telegram. Nevertheless, they appear to function properly. This is because the `src/mockEnv.js` file, which is @@ -240,5 +240,5 @@ project's information. ## Useful Links - [Platform documentation](https://docs.telegram-mini-apps.com/) -- [@tma.js/sdk-solid documentation](https://docs.telegram-mini-apps.com/packages/tma-js-sdk-solid) +- [@telegram-apps/sdk-solid documentation](https://docs.telegram-mini-apps.com/packages/telegram-apps-sdk-solid) - [Telegram developers community chat](https://t.me/devs) diff --git a/package.json b/package.json index 7b8872d..a040f7b 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ }, "dependencies": { "@solidjs/router": "^0.13.3", - "@tma.js/sdk-solid": "^2.1.3", - "@tma.js/solid-router-integration": "^3.0.0", + "@telegram-apps/sdk-solid": "^1.0.0", + "@telegram-apps/solid-router-integration": "^1.0.0", "@tonconnect/ui": "^2.0.2", "eruda": "^3.0.1", "solid-js": "^1.8.17" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 54b79b7..563b7a0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,12 +11,12 @@ importers: '@solidjs/router': specifier: ^0.13.3 version: 0.13.3(solid-js@1.8.17) - '@tma.js/sdk-solid': - specifier: ^2.1.3 - version: 2.1.3(solid-js@1.8.17) - '@tma.js/solid-router-integration': - specifier: ^3.0.0 - version: 3.0.0(@solidjs/router@0.13.3(solid-js@1.8.17))(@tma.js/sdk@2.1.0)(solid-js@1.8.17) + '@telegram-apps/sdk-solid': + specifier: ^1.0.0 + version: 1.0.0(solid-js@1.8.17) + '@telegram-apps/solid-router-integration': + specifier: ^1.0.0 + version: 1.0.0(@solidjs/router@0.13.3(solid-js@1.8.17))(@telegram-apps/sdk@1.0.0)(solid-js@1.8.17) '@tonconnect/ui': specifier: ^2.0.2 version: 2.0.2 @@ -1038,19 +1038,19 @@ packages: peerDependencies: solid-js: ^1.8.6 - '@tma.js/sdk-solid@2.1.3': - resolution: {integrity: sha512-VC+uXKW5PEP+dkMYLMOFwZ5QMkXKgo7uL+pulUX9mzpOi5FqPpv8Wvpf6gjdmmzwgcIzJLcOVRtNQj9WmIqIpA==} + '@telegram-apps/sdk-solid@1.0.0': + resolution: {integrity: sha512-OTcPkVTotiXZp7koJwSyOuNcKVUVFZqhOhOzE1e/qZWoGY3UsGldQ2lU8aAyiP/zUZW7fleixaNtbvgmFEw4xg==} peerDependencies: solid-js: ^1.0.0 - '@tma.js/sdk@2.1.0': - resolution: {integrity: sha512-jCHkqoNlEECBCf8ZjoSlHS5Yvs9Z4IrhI0BuJ88i9/RBhmUy/GF87cIQbLUFb5P+4BvsKCLtAM6HPtVVdAkVMQ==} + '@telegram-apps/sdk@1.0.0': + resolution: {integrity: sha512-lnmYrmti4hF1AuVVflkgHpVSsnwhPnukuc2sM5AZ4eKVM6ZMzPpeZtHyEdft5GqxgmePhN8+sTJuQRbvqCJvjQ==} - '@tma.js/solid-router-integration@3.0.0': - resolution: {integrity: sha512-DXOU82ZMwtWI6PQk4P+3LxoHzzOqklZw6KqCGrX5t4tYrG3P3DyUFCCbbrn8iXu4wxsncOujn9W/IEMgRW4BVA==} + '@telegram-apps/solid-router-integration@1.0.0': + resolution: {integrity: sha512-+FHBsJzqPXwWFVIJxXf8ZADCcSLHlayUZKMfwEvPNUrTpDM8Px5FrLHew2NRIB0q0+eT2rKzyycn9IFR8RzkUg==} peerDependencies: '@solidjs/router': ^0.13.1 - '@tma.js/sdk': 2.1.0 + '@telegram-apps/sdk': ^1.0.0 solid-js: ^1.8.16 '@tonconnect/isomorphic-eventsource@0.0.2': @@ -3069,17 +3069,17 @@ snapshots: dependencies: solid-js: 1.8.17 - '@tma.js/sdk-solid@2.1.3(solid-js@1.8.17)': + '@telegram-apps/sdk-solid@1.0.0(solid-js@1.8.17)': dependencies: - '@tma.js/sdk': 2.1.0 + '@telegram-apps/sdk': 1.0.0 solid-js: 1.8.17 - '@tma.js/sdk@2.1.0': {} + '@telegram-apps/sdk@1.0.0': {} - '@tma.js/solid-router-integration@3.0.0(@solidjs/router@0.13.3(solid-js@1.8.17))(@tma.js/sdk@2.1.0)(solid-js@1.8.17)': + '@telegram-apps/solid-router-integration@1.0.0(@solidjs/router@0.13.3(solid-js@1.8.17))(@telegram-apps/sdk@1.0.0)(solid-js@1.8.17)': dependencies: '@solidjs/router': 0.13.3(solid-js@1.8.17) - '@tma.js/sdk': 2.1.0 + '@telegram-apps/sdk': 1.0.0 solid-js: 1.8.17 '@tonconnect/isomorphic-eventsource@0.0.2': diff --git a/src/components/App.jsx b/src/components/App.jsx index 3435222..d179ad9 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -7,8 +7,8 @@ import { useMiniApp, useThemeParams, useViewport, -} from '@tma.js/sdk-solid'; -import { createRouter } from '@tma.js/solid-router-integration'; +} from '@telegram-apps/sdk-solid'; +import { createRouter } from '@telegram-apps/solid-router-integration'; import { createEffect, For, onCleanup } from 'solid-js'; import { routes } from '@/navigation/routes.jsx'; diff --git a/src/components/DisplayData/DisplayData.jsx b/src/components/DisplayData/DisplayData.jsx index 25aae34..c467362 100644 --- a/src/components/DisplayData/DisplayData.jsx +++ b/src/components/DisplayData/DisplayData.jsx @@ -1,4 +1,4 @@ -import { isRGB } from '@tma.js/sdk-solid'; +import { isRGB } from '@telegram-apps/sdk-solid'; import { For, Match, Switch } from 'solid-js'; import { RGB } from '@/components/RGB/RGB.jsx'; @@ -8,7 +8,7 @@ import './DisplayData.css'; /** * @typedef {object} DisplayDataRow * @property {string} title - * @property {string | boolean | import('solid-js').JSXElement | import('@tma.js/sdk-solid').RGB} [value] + * @property {string | boolean | import('solid-js').JSXElement | import('@telegram-apps/sdk-solid').RGB} [value] */ /** diff --git a/src/components/Link/Link.jsx b/src/components/Link/Link.jsx index 2059479..420bde3 100644 --- a/src/components/Link/Link.jsx +++ b/src/components/Link/Link.jsx @@ -1,5 +1,5 @@ import { A } from '@solidjs/router'; -import { classNames, useUtils } from '@tma.js/sdk-solid'; +import { classNames, useUtils } from '@telegram-apps/sdk-solid'; import './Link.css'; diff --git a/src/components/RGB/RGB.jsx b/src/components/RGB/RGB.jsx index 7a87093..58f3bfc 100644 --- a/src/components/RGB/RGB.jsx +++ b/src/components/RGB/RGB.jsx @@ -1,4 +1,4 @@ -import { classNames } from '@tma.js/sdk-solid'; +import { classNames } from '@telegram-apps/sdk-solid'; import { splitProps } from 'solid-js'; import './RGB.css'; @@ -6,7 +6,7 @@ import './RGB.css'; /** * @typedef RGBProps * @extends {import('solid-js').JSX.IntrinsicElements['span']} - * @property {import('@tma.js/sdk-solid').RGB} color + * @property {import('@telegram-apps/sdk-solid').RGB} color */ /** diff --git a/src/components/Root.jsx b/src/components/Root.jsx index 22b3cd1..ff97879 100644 --- a/src/components/Root.jsx +++ b/src/components/Root.jsx @@ -1,4 +1,4 @@ -import { retrieveLaunchParams, SDKProvider } from '@tma.js/sdk-solid'; +import { retrieveLaunchParams, SDKProvider } from '@telegram-apps/sdk-solid'; import { ErrorBoundary, Switch, Match } from 'solid-js'; import { App } from '@/components/App.jsx'; @@ -22,7 +22,7 @@ function Inner() { ); -}; +} /** * @returns {Node | JSX.ArrayElement | string | number | boolean} @@ -55,4 +55,4 @@ export function Root() { ); -}; +} diff --git a/src/pages/InitDataPage/InitDataPage.jsx b/src/pages/InitDataPage/InitDataPage.jsx index ecf3318..c0f2c68 100644 --- a/src/pages/InitDataPage/InitDataPage.jsx +++ b/src/pages/InitDataPage/InitDataPage.jsx @@ -1,4 +1,4 @@ -import { retrieveLaunchParams, useInitData } from '@tma.js/sdk-solid'; +import { retrieveLaunchParams, useInitData } from '@telegram-apps/sdk-solid'; import { createMemo, Show } from 'solid-js'; import { DisplayData } from '@/components/DisplayData/DisplayData.jsx'; @@ -8,7 +8,7 @@ import { Page } from '@/components/Page/Page.jsx'; import './InitDataPage.css'; /** - * @param {import('@tma.js/sdk-solid').User} [user] + * @param {import('@telegram-apps/sdk-solid').User} [user] * @returns {DisplayDataRow[]} */ function getUserRows(user) { diff --git a/src/pages/LaunchParamsPage.jsx b/src/pages/LaunchParamsPage.jsx index f739107..c2827b1 100644 --- a/src/pages/LaunchParamsPage.jsx +++ b/src/pages/LaunchParamsPage.jsx @@ -1,4 +1,4 @@ -import { retrieveLaunchParams } from '@tma.js/sdk-solid'; +import { retrieveLaunchParams } from '@telegram-apps/sdk-solid'; import { DisplayData } from '@/components/DisplayData/DisplayData.jsx'; import { Link } from '@/components/Link/Link.jsx'; diff --git a/src/pages/ThemeParamsPage.jsx b/src/pages/ThemeParamsPage.jsx index 81845c4..403de7e 100644 --- a/src/pages/ThemeParamsPage.jsx +++ b/src/pages/ThemeParamsPage.jsx @@ -1,4 +1,4 @@ -import { useThemeParams } from '@tma.js/sdk-solid'; +import { useThemeParams } from '@telegram-apps/sdk-solid'; import { DisplayData } from '@/components/DisplayData/DisplayData.jsx'; import { Link } from '@/components/Link/Link.jsx';