@air-jam/sdk 0.1.0
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.
- package/README.md +87 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/chunk-XSXI3RIS.js +72 -0
- package/dist/chunk-XSXI3RIS.js.map +1 -0
- package/dist/index.cjs +3514 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1529 -0
- package/dist/index.d.ts +1529 -0
- package/dist/index.js +3366 -0
- package/dist/index.js.map +1 -0
- package/dist/protocol.cjs +85 -0
- package/dist/protocol.cjs.map +1 -0
- package/dist/protocol.d.cts +242 -0
- package/dist/protocol.d.ts +242 -0
- package/dist/protocol.js +3 -0
- package/dist/protocol.js.map +1 -0
- package/package.json +81 -0
- package/src/AirJamClient.ts +775 -0
- package/src/audio/audio-manager.ts +395 -0
- package/src/audio/hooks.tsx +140 -0
- package/src/audio/index.ts +3 -0
- package/src/audio/volume-store.ts +77 -0
- package/src/components/air-jam-overlay.tsx +456 -0
- package/src/components/controller-shell.tsx +329 -0
- package/src/components/qr-scanner-dialog.tsx +373 -0
- package/src/components/ui/alert.tsx +66 -0
- package/src/components/ui/avatar.tsx +46 -0
- package/src/components/ui/badge.tsx +47 -0
- package/src/components/ui/button.tsx +61 -0
- package/src/components/ui/card.tsx +92 -0
- package/src/components/ui/slider.tsx +61 -0
- package/src/components/ui/tabs.tsx +64 -0
- package/src/components/volume-controls.tsx +93 -0
- package/src/constants.ts +45 -0
- package/src/context/air-jam-context.tsx +478 -0
- package/src/context/index.ts +2 -0
- package/src/context/socket-manager.ts +98 -0
- package/src/events.ts +151 -0
- package/src/hooks/use-air-jam-controller.ts +608 -0
- package/src/hooks/use-air-jam-host.ts +624 -0
- package/src/hooks/use-air-jam-shell.ts +343 -0
- package/src/hooks/use-fullscreen.ts +108 -0
- package/src/hooks/use-get-input.ts +97 -0
- package/src/hooks/use-send-signal.ts +164 -0
- package/src/index.ts +33 -0
- package/src/internal/input-manager.ts +362 -0
- package/src/protocol.ts +331 -0
- package/src/state/connection-store.ts +84 -0
- package/src/styles.css +128 -0
- package/src/types/browser.ts +42 -0
- package/src/utils/cn.ts +4 -0
- package/src/utils/ids.ts +31 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/mode.ts +13 -0
- package/src/utils/network-ip.ts +145 -0
- package/src/utils/url-builder.ts +170 -0
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@air-jam/sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "The core SDK for building Air Jam games and controllers",
|
|
5
|
+
"private": false,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/vucinatim/air-jam.git",
|
|
11
|
+
"directory": "packages/sdk"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/vucinatim/air-jam#readme",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"air-jam",
|
|
16
|
+
"game",
|
|
17
|
+
"multiplayer",
|
|
18
|
+
"sdk",
|
|
19
|
+
"react",
|
|
20
|
+
"typescript",
|
|
21
|
+
"controller",
|
|
22
|
+
"mobile-controller",
|
|
23
|
+
"real-time",
|
|
24
|
+
"socket.io",
|
|
25
|
+
"gaming"
|
|
26
|
+
],
|
|
27
|
+
"main": "./dist/index.cjs",
|
|
28
|
+
"module": "./dist/index.js",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"import": "./dist/index.js",
|
|
34
|
+
"require": "./dist/index.cjs"
|
|
35
|
+
},
|
|
36
|
+
"./protocol": {
|
|
37
|
+
"types": "./dist/protocol.d.ts",
|
|
38
|
+
"import": "./dist/protocol.js",
|
|
39
|
+
"require": "./dist/protocol.cjs"
|
|
40
|
+
},
|
|
41
|
+
"./styles.css": "./src/styles.css"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist",
|
|
45
|
+
"src"
|
|
46
|
+
],
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "tsup",
|
|
49
|
+
"typecheck": "tsc --noEmit",
|
|
50
|
+
"dev": "tsup --watch"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
54
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
55
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
56
|
+
"class-variance-authority": "^0.7.1",
|
|
57
|
+
"clsx": "^2.1.1",
|
|
58
|
+
"howler": "^2.2.4",
|
|
59
|
+
"html5-qrcode": "^2.3.8",
|
|
60
|
+
"lucide-react": "^0.554.0",
|
|
61
|
+
"nanoid": "^5.1.6",
|
|
62
|
+
"qrcode": "^1.5.4",
|
|
63
|
+
"socket.io-client": "^4.8.1",
|
|
64
|
+
"tailwind-merge": "^2.5.5",
|
|
65
|
+
"zod": "^4.2.1",
|
|
66
|
+
"zustand": "^5.0.3"
|
|
67
|
+
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"react": "^19.2.0",
|
|
70
|
+
"react-dom": "^19.2.0"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@types/howler": "^2.2.12",
|
|
74
|
+
"@types/qrcode": "^1.5.5",
|
|
75
|
+
"@types/react": "^19.2.5",
|
|
76
|
+
"@types/react-dom": "^19.2.3",
|
|
77
|
+
"tailwindcss": "^4.1.17",
|
|
78
|
+
"tsup": "^8.5.1",
|
|
79
|
+
"typescript": "~5.9.3"
|
|
80
|
+
}
|
|
81
|
+
}
|