@react-text-game/core 0.2.2 → 0.4.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.
Files changed (76) hide show
  1. package/README.md +100 -1
  2. package/dist/game.d.ts.map +1 -1
  3. package/dist/game.js +15 -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 +69 -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/saves/hooks/useLoadGame.d.ts +3 -0
  40. package/dist/saves/hooks/useLoadGame.d.ts.map +1 -1
  41. package/dist/saves/hooks/useLoadGame.js +23 -1
  42. package/dist/saves/hooks/useLoadGame.js.map +1 -1
  43. package/dist/saves/index.d.ts +1 -0
  44. package/dist/saves/index.d.ts.map +1 -1
  45. package/dist/saves/index.js +1 -0
  46. package/dist/saves/index.js.map +1 -1
  47. package/dist/saves/migrations/EXAMPLE.d.ts +113 -0
  48. package/dist/saves/migrations/EXAMPLE.d.ts.map +1 -0
  49. package/dist/saves/migrations/EXAMPLE.js +304 -0
  50. package/dist/saves/migrations/EXAMPLE.js.map +1 -0
  51. package/dist/saves/migrations/index.d.ts +41 -0
  52. package/dist/saves/migrations/index.d.ts.map +1 -0
  53. package/dist/saves/migrations/index.js +40 -0
  54. package/dist/saves/migrations/index.js.map +1 -0
  55. package/dist/saves/migrations/registry.d.ts +72 -0
  56. package/dist/saves/migrations/registry.d.ts.map +1 -0
  57. package/dist/saves/migrations/registry.js +174 -0
  58. package/dist/saves/migrations/registry.js.map +1 -0
  59. package/dist/saves/migrations/runner.d.ts +45 -0
  60. package/dist/saves/migrations/runner.d.ts.map +1 -0
  61. package/dist/saves/migrations/runner.js +139 -0
  62. package/dist/saves/migrations/runner.js.map +1 -0
  63. package/dist/saves/migrations/types.d.ts +182 -0
  64. package/dist/saves/migrations/types.d.ts.map +1 -0
  65. package/dist/saves/migrations/types.js +2 -0
  66. package/dist/saves/migrations/types.js.map +1 -0
  67. package/dist/tests/game.test.js.map +1 -1
  68. package/dist/tests/i18n.test.d.ts +2 -0
  69. package/dist/tests/i18n.test.d.ts.map +1 -0
  70. package/dist/tests/i18n.test.js +590 -0
  71. package/dist/tests/i18n.test.js.map +1 -0
  72. package/dist/tests/migrations.test.d.ts +2 -0
  73. package/dist/tests/migrations.test.d.ts.map +1 -0
  74. package/dist/tests/migrations.test.js +602 -0
  75. package/dist/tests/migrations.test.js.map +1 -0
  76. package/package.json +17 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-text-game/core",
3
- "version": "0.2.2",
3
+ "version": "0.4.0",
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",
@@ -12,9 +12,10 @@
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
- "test-pack": "npm pack --dry-run && bunx publint",
17
- "publish": "npm whoami && npm publish"
18
+ "test-pack": "npm pack --dry-run && bunx publint"
18
19
  },
19
20
  "author": "laruss",
20
21
  "publishConfig": {
@@ -26,12 +27,14 @@
26
27
  "dist"
27
28
  ],
28
29
  "dependencies": {
29
- "valtio": "^2.1.8",
30
- "jsonpath-plus": "^10.3.0",
30
+ "consola": "^3.4.2",
31
+ "crypto-js": "^4.2.0",
31
32
  "dexie": "^4.2.0",
32
33
  "dexie-react-hooks": "^4.2.0",
33
- "crypto-js": "^4.2.0",
34
- "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"
35
38
  },
36
39
  "peerDependencies": {
37
40
  "react": "^18.0.0 || ^19.0.0",
@@ -42,6 +45,9 @@
42
45
  "@types/bun": "^1.2.23",
43
46
  "@types/crypto-js": "^4.2.2",
44
47
  "@types/node": "^24.6.2",
48
+ "@types/react": "^19.0.9",
49
+ "@types/react-dom": "^19.0.3",
50
+ "eslint": "^9.37.0",
45
51
  "tsc-alias": "^1.8.16"
46
52
  },
47
53
  "imports": {
@@ -58,6 +64,10 @@
58
64
  },
59
65
  "./passages": {
60
66
  "types": "./dist/passages/types/index.d.ts"
67
+ },
68
+ "./i18n": {
69
+ "types": "./dist/i18n/index.d.ts",
70
+ "import": "./dist/i18n/index.js"
61
71
  }
62
72
  }
63
73
  }