Skip to content

Commit

Permalink
Merge pull request #189 from Telegram-Mini-Apps/feature/stable-sdk
Browse files Browse the repository at this point in the history
Feature/stable sdk
  • Loading branch information
heyqbnk authored Nov 26, 2023
2 parents eb0b193 + 60c23a8 commit f5e7dff
Show file tree
Hide file tree
Showing 755 changed files with 14,406 additions and 5,313 deletions.
6 changes: 6 additions & 0 deletions .changeset/angry-peas-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@tma.js/sdk-react": major
"@tma.js/sdk-solid": major
---

The first packages major releases. Their implementation was simplified as much as possible. Moreover, they look more similar now.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-students-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tma.js/sdk": major
---

The first package major release. This time, it was fully reworked. All other @tma.js packages were moved to this package.
5 changes: 5 additions & 0 deletions .changeset/quiet-trains-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tma.js/solid-router-integration": patch
---

The first package major version. It now references @tma.js/sdk for utilities.
5 changes: 5 additions & 0 deletions .changeset/thick-wasps-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tma.js/init-data-node": major
---

The first package major release. Just setting a stable version.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ yarn-error.log*
.idea
.docusaurus

# App for local development
apps/.local
# Apps for local development.
apps-local

apps/docs/.vitepress/cache
apps/docs/.vitepress/dist
113 changes: 87 additions & 26 deletions apps/docs/.vitepress/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,79 @@ function prefixed(value: string): string {

export const packagesNavItem = {
text: 'Packages',
link: prefixed('/typescript/tma-js-bridge'),
link: prefixed('/typescript/tma-js-sdk/about'),
};

export const packagesSidebar = {
[prefixed('/')]: [
{
text: 'TypeScript',
items: [
{ text: '@tma.js/bridge', link: prefixed('/typescript/tma-js-bridge') },
{
text: '@tma.js/init-data',
collapsed: true,
items: [
{ text: 'About', link: prefixed('/typescript/tma-js-init-data/about') },
{ text: 'InitData', link: prefixed('/typescript/tma-js-init-data/init-data') },
{ text: 'Chat', link: prefixed('/typescript/tma-js-init-data/chat') },
{ text: 'User', link: prefixed('/typescript/tma-js-init-data/user') },
],
},
{
text: '@tma.js/launch-params',
link: prefixed('/typescript/tma-js-launch-params'),
},
{ text: '@tma.js/theme-params', link: prefixed('/typescript/tma-js-theme-params') },
{ text: '@tma.js/navigation', link: prefixed('/typescript/tma-js-navigation') },
{
text: '@tma.js/sdk',
collapsed: true,
link: prefixed('/typescript/tma-js-sdk/about'),
items: [
{ text: 'About', link: prefixed('/typescript/tma-js-sdk/about') },
{
text: 'Initialization',
link: prefixed('/typescript/tma-js-sdk/init'),
},
{
text: 'Methods and events',
link: prefixed('/typescript/tma-js-sdk/methods-and-events'),
},
{
text: 'Launch parameters',
link: prefixed('/typescript/tma-js-sdk/launch-parameters'),
},
{
text: 'Theme parameters',
link: prefixed('/typescript/tma-js-sdk/theme-parameters'),
},
{
text: 'Init data',
collapsed: true,
items: [
{
text: 'About',
link: prefixed('/typescript/tma-js-sdk/init-data/about'),
},
{
text: 'InitData',
link: prefixed('/typescript/tma-js-sdk/init-data/init-data')
},
{
text: 'Chat',
link: prefixed('/typescript/tma-js-sdk/init-data/chat')
},
{
text: 'User',
link: prefixed('/typescript/tma-js-sdk/init-data/user')
},
],
},
{
text: 'Navigation',
link: prefixed('/typescript/tma-js-sdk/navigation'),
},
{
text: 'Components',
collapsed: true,
items: [
{
text: 'About components',
link: prefixed('/typescript/tma-js-sdk/components/about'),
},
{
text: 'BackButton',
link: prefixed('/typescript/tma-js-sdk/components/back-button'),
},
{
text: 'ClosingBehavior',
link: prefixed('/typescript/tma-js-sdk/components/closing-behaviour'),
link: prefixed('/typescript/tma-js-sdk/components/closing-behavior'),
},
{
text: 'CloudStorage',
link: prefixed('/typescript/tma-js-sdk/components/cloud-storage'),
},
{
text: 'HapticFeedback',
Expand All @@ -54,10 +86,18 @@ export const packagesSidebar = {
text: 'InitData',
link: prefixed('/typescript/tma-js-sdk/components/init-data'),
},
{
text: 'Invoice',
link: prefixed('/typescript/tma-js-sdk/components/invoice'),
},
{
text: 'MainButton',
link: prefixed('/typescript/tma-js-sdk/components/main-button'),
},
{
text: 'MiniApp',
link: prefixed('/typescript/tma-js-sdk/components/mini-app'),
},
{
text: 'Popup',
link: prefixed('/typescript/tma-js-sdk/components/popup'),
Expand All @@ -71,13 +111,12 @@ export const packagesSidebar = {
link: prefixed('/typescript/tma-js-sdk/components/theme-params'),
},
{
text: 'Viewport',
link: prefixed('/typescript/tma-js-sdk/components/viewport'),
text: 'Utils',
link: prefixed('/typescript/tma-js-sdk/components/utils'),
},
// TODO: Rename?
{
text: 'WebApp',
link: prefixed('/typescript/tma-js-sdk/components/web-app'),
text: 'Viewport',
link: prefixed('/typescript/tma-js-sdk/components/viewport'),
},
],
},
Expand All @@ -99,5 +138,27 @@ export const packagesSidebar = {
{ text: 'init-data-golang', link: prefixed('/golang/init-data-golang') },
],
},
{
text: 'Deprecated',
items: [
{ text: '@tma.js/bridge', link: prefixed('/typescript/tma-js-bridge') },
{
text: '@tma.js/init-data',
collapsed: true,
items: [
{ text: 'About', link: prefixed('/typescript/tma-js-init-data/about') },
{ text: 'InitData', link: prefixed('/typescript/tma-js-init-data/init-data') },
{ text: 'Chat', link: prefixed('/typescript/tma-js-init-data/chat') },
{ text: 'User', link: prefixed('/typescript/tma-js-init-data/user') },
],
},
{
text: '@tma.js/launch-params',
link: prefixed('/typescript/tma-js-launch-params'),
},
{ text: '@tma.js/theme-params', link: prefixed('/typescript/tma-js-theme-params') },
{ text: '@tma.js/navigation', link: prefixed('/typescript/tma-js-navigation') },
],
},
],
};
13 changes: 3 additions & 10 deletions apps/docs/packages/node/tma-js-init-data-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ The package provides utilities to work with the initialization data of Telegram
server side. To learn more about the initialization data and its usage, please refer to
the [documentation](../../platform/launch-parameters/common-information.md).

::: info
This package extends the functionality of [@tma.js/init-data](../typescript/tma-js-init-data/about.md), including all
its types and utilities. Therefore, there is no need to install both packages separately.
:::

## Installation

::: code-group
Expand All @@ -31,14 +26,12 @@ yarn add @tma.js/init-data-node
```
:::

## Usage

### Parsing
## Parsing

You can learn more about parsing utilities in [@tma.js/init-data](../typescript/tma-js-init-data/about.md#parsing)
You can learn more about parsing utilities in [@tma.js/sdk](../typescript/tma-js-sdk/init-data/about#parsing)
documentation.

### Validation
## Validation

To validate the signature of the initialization data, the `validate` function is used. It expects
the initialization data to be passed in raw format (search parameters) and throws an error in
Expand Down
5 changes: 5 additions & 0 deletions apps/docs/packages/typescript/tma-js-bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ and saving their time.
Developers can utilize this package to create their software development kit (SDK), as it offers the
utmost level of control over cross-application communication.

::: danger
This project has been deprecated. All its functionality was moved to
the [@tma.js/sdk](./tma-js-sdk/about.md) package.
:::

## Installation

::: code-group
Expand Down
7 changes: 6 additions & 1 deletion apps/docs/packages/typescript/tma-js-init-data/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@

The package provides utilities to work with the initialization data of Telegram Mini Apps on the
client side. To learn more about the initialization data and its usage, please refer to
the [documentation](../../../platform/launch-parameters/common-information.md).
the [documentation](../../../platform/launch-parameters/init-data.md).

::: danger
This project has been deprecated. All its functionality was moved to
the [@tma.js/sdk](../tma-js-sdk/about.md) package.
:::

## Installation

Expand Down
5 changes: 5 additions & 0 deletions apps/docs/packages/typescript/tma-js-launch-params.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
Provides utilities to work with Telegram Mini
Apps [launch parameters](../../platform/launch-parameters/common-information.md).

::: danger
This project has been deprecated. All its functionality was moved to
the [@tma.js/sdk](./tma-js-sdk/about.md) package.
:::

## Installation

::: code-group
Expand Down
5 changes: 5 additions & 0 deletions apps/docs/packages/typescript/tma-js-navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ outline: [2, 3]

Package for manipulating Mini App navigation on the Telegram Mini Apps platform.

::: danger
This project has been deprecated. All its functionality was moved to
the [@tma.js/sdk](./tma-js-sdk/about.md) package.
:::

## Installation

::: code-group
Expand Down
Loading

0 comments on commit f5e7dff

Please sign in to comment.