@react-text-game/core 0.3.0 → 0.4.1

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.
Files changed (44) hide show
  1. package/README.md +98 -1
  2. package/dist/game.d.ts.map +1 -1
  3. package/dist/game.js +2 -0
  4. package/dist/game.js.map +1 -1
  5. package/dist/i18n/constants.d.ts +21 -0
  6. package/dist/i18n/constants.d.ts.map +1 -0
  7. package/dist/i18n/constants.js +21 -0
  8. package/dist/i18n/constants.js.map +1 -0
  9. package/dist/i18n/hooks/index.d.ts +13 -0
  10. package/dist/i18n/hooks/index.d.ts.map +1 -0
  11. package/dist/i18n/hooks/index.js +13 -0
  12. package/dist/i18n/hooks/index.js.map +1 -0
  13. package/dist/i18n/hooks/useGameTranslation.d.ts +81 -0
  14. package/dist/i18n/hooks/useGameTranslation.d.ts.map +1 -0
  15. package/dist/i18n/hooks/useGameTranslation.js +102 -0
  16. package/dist/i18n/hooks/useGameTranslation.js.map +1 -0
  17. package/dist/i18n/index.d.ts +69 -0
  18. package/dist/i18n/index.d.ts.map +1 -0
  19. package/dist/i18n/index.js +69 -0
  20. package/dist/i18n/index.js.map +1 -0
  21. package/dist/i18n/init.d.ts +62 -0
  22. package/dist/i18n/init.d.ts.map +1 -0
  23. package/dist/i18n/init.js +114 -0
  24. package/dist/i18n/init.js.map +1 -0
  25. package/dist/i18n/types.d.ts +54 -0
  26. package/dist/i18n/types.d.ts.map +1 -0
  27. package/dist/i18n/types.js +2 -0
  28. package/dist/i18n/types.js.map +1 -0
  29. package/dist/i18n/utils.d.ts +55 -0
  30. package/dist/i18n/utils.d.ts.map +1 -0
  31. package/dist/i18n/utils.js +75 -0
  32. package/dist/i18n/utils.js.map +1 -0
  33. package/dist/index.d.ts +2 -2
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/options.d.ts +2 -0
  36. package/dist/options.d.ts.map +1 -1
  37. package/dist/options.js +2 -0
  38. package/dist/options.js.map +1 -1
  39. package/dist/tests/game.test.js.map +1 -1
  40. package/dist/tests/i18n.test.d.ts +2 -0
  41. package/dist/tests/i18n.test.d.ts.map +1 -0
  42. package/dist/tests/i18n.test.js +590 -0
  43. package/dist/tests/i18n.test.js.map +1 -0
  44. package/package.json +17 -6
package/package.json CHANGED
@@ -1,17 +1,19 @@
1
1
  {
2
2
  "name": "@react-text-game/core",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "A powerful React-based text game engine with reactive state management, passage-based navigation, and persistent save system for building interactive narrative experiences",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "repository": "github:laruss/react-text-game",
9
- "homepage": "https://laruss.github.io/react-text-game/",
9
+ "homepage": "https://reacttextgame.dev/",
10
10
  "private": false,
11
11
  "type": "module",
12
12
  "scripts": {
13
13
  "dev": "tsc --watch & tsc-alias --watch",
14
14
  "build": "tsc && tsc-alias",
15
+ "check-types": "tsc --noEmit",
16
+ "lint": "eslint .",
15
17
  "prepack": "rm -rf dist && bun run build",
16
18
  "test-pack": "npm pack --dry-run && bunx publint"
17
19
  },
@@ -25,12 +27,14 @@
25
27
  "dist"
26
28
  ],
27
29
  "dependencies": {
28
- "valtio": "^2.1.8",
29
- "jsonpath-plus": "^10.3.0",
30
+ "consola": "^3.4.2",
31
+ "crypto-js": "^4.2.0",
30
32
  "dexie": "^4.2.0",
31
33
  "dexie-react-hooks": "^4.2.0",
32
- "crypto-js": "^4.2.0",
33
- "consola": "^3.4.2"
34
+ "i18next": "^25.6.0",
35
+ "jsonpath-plus": "^10.3.0",
36
+ "react-i18next": "^16.1.0",
37
+ "valtio": "^2.1.8"
34
38
  },
35
39
  "peerDependencies": {
36
40
  "react": "^18.0.0 || ^19.0.0",
@@ -41,6 +45,9 @@
41
45
  "@types/bun": "^1.2.23",
42
46
  "@types/crypto-js": "^4.2.2",
43
47
  "@types/node": "^24.6.2",
48
+ "@types/react": "^19.0.9",
49
+ "@types/react-dom": "^19.0.3",
50
+ "eslint": "^9.37.0",
44
51
  "tsc-alias": "^1.8.16"
45
52
  },
46
53
  "imports": {
@@ -57,6 +64,10 @@
57
64
  },
58
65
  "./passages": {
59
66
  "types": "./dist/passages/types/index.d.ts"
67
+ },
68
+ "./i18n": {
69
+ "types": "./dist/i18n/index.d.ts",
70
+ "import": "./dist/i18n/index.js"
60
71
  }
61
72
  }
62
73
  }