@tma.sh/sdk 0.1.1 → 0.1.2

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.
@@ -10,7 +10,7 @@ export interface TMAClient {
10
10
  *
11
11
  * @example
12
12
  * ```typescript
13
- * import { createTMA } from '@tma/sdk';
13
+ * import { createTMA } from '@tma.sh/sdk';
14
14
  *
15
15
  * const tma = createTMA();
16
16
  * const { jwt, user } = await tma.auth.validate(initData, projectId);
@@ -14,7 +14,7 @@ declare global {
14
14
  *
15
15
  * @example
16
16
  * ```tsx
17
- * import { useTelegramAuth } from '@tma/sdk/react';
17
+ * import { useTelegramAuth } from '@tma.sh/sdk/react';
18
18
  *
19
19
  * function App() {
20
20
  * const { user, jwt, isLoading, error } = useTelegramAuth({
@@ -41,7 +41,7 @@ export interface RequireUserOptions {
41
41
  * @example
42
42
  * ```ts
43
43
  * import { Hono } from 'hono';
44
- * import { requireUser } from '@tma/sdk/server';
44
+ * import { requireUser } from '@tma.sh/sdk/server';
45
45
  *
46
46
  * const app = new Hono();
47
47
  * app.use('/api/*', requireUser());
@@ -37,7 +37,7 @@ export interface TypedKV {
37
37
  *
38
38
  * @example
39
39
  * ```ts
40
- * import { createKV } from '@tma/sdk/server';
40
+ * import { createKV } from '@tma.sh/sdk/server';
41
41
  *
42
42
  * const kv = createKV(c.env.KV);
43
43
  * await kv.set('user:123', { name: 'Alice' });
@@ -19,7 +19,7 @@ declare global {
19
19
  * @example
20
20
  * ```svelte
21
21
  * <script>
22
- * import { createTelegramAuth } from '@tma/sdk/svelte';
22
+ * import { createTelegramAuth } from '@tma.sh/sdk/svelte';
23
23
  *
24
24
  * const auth = createTelegramAuth({ projectId: 'my-project' });
25
25
  * </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tma.sh/sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "SDK for Telegram Mini Apps on TMA -- auth, KV storage, and framework bindings",
6
6
  "license": "MIT",
@@ -26,6 +26,22 @@
26
26
  "types": "./dist/bot/index.d.ts"
27
27
  }
28
28
  },
29
+ "typesVersions": {
30
+ "*": {
31
+ "svelte": [
32
+ "dist/svelte/index.d.ts"
33
+ ],
34
+ "react": [
35
+ "dist/react/index.d.ts"
36
+ ],
37
+ "server": [
38
+ "dist/server/index.d.ts"
39
+ ],
40
+ "bot": [
41
+ "dist/bot/index.d.ts"
42
+ ]
43
+ }
44
+ },
29
45
  "files": [
30
46
  "dist"
31
47
  ],