-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #292 from Telegram-Mini-Apps/feature/sdk-3-0
New major release. SDK 2.0
- Loading branch information
Showing
630 changed files
with
26,249 additions
and
13,167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@tma.js/sdk-react": minor | ||
"@tma.js/sdk-solid": minor | ||
--- | ||
|
||
Remove the `DisplayGate` component. Rework all hooks, HOCs and the SDK provider to make bindings work a bit different way. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@tma.js/sdk": major | ||
--- | ||
|
||
Completely rework the package. In this release we have focused on improving the bundle size, writing more tests, providing new navigation features and fulfilling Mini Apps functionality |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@tma.js/react-router-integration": minor | ||
"@tma.js/solid-router-integration": minor | ||
--- | ||
|
||
Rework the integration utilities according to the changes done in the new major SDK version. Fix some known problems. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@tma.js/init-data-node": patch | ||
--- | ||
|
||
Change referred distributive files in the `package.json`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ coverage | |
# next.js | ||
.next/ | ||
out/ | ||
build | ||
dist | ||
|
||
# misc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* You can import any code from other packages here. There are currently 2 shortcuts: | ||
* | ||
* 1. "@packages/*". Provides access to "packages" directory: | ||
* import { postEvent } from '@packages/sdk/src/index.js'; | ||
* | ||
* 2. "@/*". Provides easy access to packages' index files: | ||
* import { postEvent } from '@/sdk'; | ||
*/ | ||
|
||
// import { initBackButton } from '@/sdk'; | ||
// | ||
// const bb = initBackButton(); | ||
// | ||
// // setDebug(true); | ||
// | ||
// bb.show(); | ||
// | ||
// // on('main_button_pressed', console.warn); | ||
|
||
|
||
import { setDebug } from '@packages/sdk/src/debug/debug.js'; | ||
import { postEvent } from '@packages/sdk/src/mini-apps/methods/postEvent.js'; | ||
// import { on } from '@packages/sdk/src/mini-apps/events/listening/on.js'; | ||
|
||
setDebug(true); | ||
|
||
postEvent('web_app_setup_back_button', { is_visible: true, }); | ||
postEvent('web_app_setup_settings_button', { is_visible: true, }); | ||
// on('back_button_pressed', console.warn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "NodeNext" | ||
}, | ||
"include": ["vite.config.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,28 @@ | ||
import { readFileSync } from 'node:fs'; | ||
import { resolve, dirname } from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import { defineConfig } from 'vite'; | ||
import tsconfigPaths from 'vite-tsconfig-paths'; | ||
|
||
// TODO: Add docs link for getServerOptions. | ||
|
||
/** | ||
* Returns Vite dev server options. | ||
*/ | ||
// function getServerOptions(): ServerOptions { | ||
// const dir = dirname(fileURLToPath(import.meta.url)); | ||
// | ||
// return { | ||
// port: 443, | ||
// https: { | ||
// cert: readFileSync(resolve(dir, '../../https-cert.pem')), | ||
// key: readFileSync(resolve(dir, '../../https-key.pem')), | ||
// }, | ||
// host: 'tma.internal', | ||
// }; | ||
// } | ||
const dir = dirname(fileURLToPath(import.meta.url)); | ||
|
||
export default defineConfig({ | ||
plugins: [tsconfigPaths()], | ||
// Uncomment this line in case, you would like to run Vite dev server using HTTPS. In this case, | ||
// you will need correct certificate, private key and DNS configuration for your custom domain. | ||
// For this purpose you could use mkcert: | ||
// https://github.com/FiloSottile/mkcert | ||
// server: getServerOptions(), | ||
server: { | ||
host: true, | ||
port: 443, | ||
https: { | ||
cert: readFileSync(resolve(dir, '../../https-cert.pem')), | ||
key: readFileSync(resolve(dir, '../../https-key.pem')), | ||
}, | ||
host: 'tma.internal', | ||
}, | ||
build: { | ||
outDir: 'dist', | ||
emptyOutDir: true, | ||
}, | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react/recommended' | ||
], | ||
overrides: [ | ||
{ | ||
env: { | ||
node: true | ||
}, | ||
files: [ | ||
'.eslintrc.{js,cjs}' | ||
], | ||
parserOptions: { | ||
'sourceType': 'script' | ||
} | ||
} | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module' | ||
}, | ||
plugins: [ | ||
'@typescript-eslint', | ||
'react' | ||
], | ||
rules: { | ||
'react/react-in-jsx-scope': 0, | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
*.pem |
Oops, something went wrong.