i18n-keyless-react 1.9.2 → 1.9.4

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 (27) hide show
  1. package/dist/{packages/react/__tests__ → __tests__}/store.test.js +1 -1
  2. package/dist/index.d.ts +5 -0
  3. package/dist/{packages/react/index.js → index.js} +1 -0
  4. package/dist/package.json +31 -15
  5. package/package.json +1 -1
  6. package/dist/packages/react/index.d.ts +0 -4
  7. /package/dist/{packages/react/I18nKeylessText.d.ts → I18nKeylessText.d.ts} +0 -0
  8. /package/dist/{packages/react/I18nKeylessText.js → I18nKeylessText.js} +0 -0
  9. /package/dist/{packages/react/__tests__ → __tests__}/I18nKeylessText.test.d.ts +0 -0
  10. /package/dist/{packages/react/__tests__ → __tests__}/I18nKeylessText.test.js +0 -0
  11. /package/dist/{packages/react/__tests__ → __tests__}/__mocks__/store.d.ts +0 -0
  12. /package/dist/{packages/react/__tests__ → __tests__}/__mocks__/store.js +0 -0
  13. /package/dist/{packages/react/__tests__ → __tests__}/__mocks__/zustand.d.ts +0 -0
  14. /package/dist/{packages/react/__tests__ → __tests__}/__mocks__/zustand.js +0 -0
  15. /package/dist/{packages/react/__tests__ → __tests__}/setup.d.ts +0 -0
  16. /package/dist/{packages/react/__tests__ → __tests__}/setup.js +0 -0
  17. /package/dist/{packages/react/__tests__ → __tests__}/store.test.d.ts +0 -0
  18. /package/dist/{packages/react/api.d.ts → api.d.ts} +0 -0
  19. /package/dist/{packages/react/api.js → api.js} +0 -0
  20. /package/dist/{packages/react/my-pqueue.d.ts → my-pqueue.d.ts} +0 -0
  21. /package/dist/{packages/react/my-pqueue.js → my-pqueue.js} +0 -0
  22. /package/dist/{packages/react/store.d.ts → store.d.ts} +0 -0
  23. /package/dist/{packages/react/store.js → store.js} +0 -0
  24. /package/dist/{packages/react/utils.d.ts → utils.d.ts} +0 -0
  25. /package/dist/{packages/react/utils.js → utils.js} +0 -0
  26. /package/dist/{packages/react/vitest.config.d.ts → vitest.config.d.ts} +0 -0
  27. /package/dist/{packages/react/vitest.config.js → vitest.config.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, vi, beforeEach } from "vitest";
2
2
  import { act } from "@testing-library/react";
3
- import packageJson from "../../../package.json";
3
+ import packageJson from "../package.json";
4
4
  import { mockStore, mockStorage } from "./__mocks__/store";
5
5
  import { useI18nKeyless, init } from "../store";
6
6
  import { getTranslation, queue } from "i18n-keyless-core";
@@ -0,0 +1,5 @@
1
+ export { I18nKeylessText } from "./I18nKeylessText";
2
+ export { init, setCurrentLanguage, useCurrentLanguage } from "./store";
3
+ export { clearI18nKeylessStorage } from "./utils";
4
+ export type { I18nKeylessTextProps } from "./I18nKeylessText";
5
+ export { type I18nConfig, type Lang, type PrimaryLang, type Translations, type TranslationStore, type TranslationStoreState, type I18nKeylessRequestBody, type I18nKeylessResponse, type TranslationOptions, getTranslation, fetchAllTranslations, validateLanguage, queue, } from "i18n-keyless-core";
@@ -1,3 +1,4 @@
1
1
  export { I18nKeylessText } from "./I18nKeylessText";
2
2
  export { init, setCurrentLanguage, useCurrentLanguage } from "./store";
3
3
  export { clearI18nKeylessStorage } from "./utils";
4
+ export { getTranslation, fetchAllTranslations, validateLanguage, queue, } from "i18n-keyless-core";
package/dist/package.json CHANGED
@@ -1,24 +1,40 @@
1
1
  {
2
- "name": "i18n-keyless",
2
+ "name": "i18n-keyless-react",
3
3
  "private": false,
4
+ "version": "1.9.4",
4
5
  "type": "module",
5
- "version": "1.9.2",
6
- "workspaces": [
7
- "packages/*"
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "files": [
10
+ "dist"
8
11
  ],
9
12
  "scripts": {
10
- "build": "npm run build:core && npm run build:react",
11
- "build:core": "npm run build:lib --workspace=i18n-keyless-core",
12
- "build:react": "npm run build:lib --workspace=i18n-keyless-react",
13
- "clean": "npm run clean:core && npm run clean:react",
14
- "clean:core": "rm -rf packages/core/dist",
15
- "clean:react": "rm -rf packages/react/dist",
16
- "test": "npm run test --workspace=i18n-keyless-react",
17
- "test:watch": "npm run test:watch --workspace=i18n-keyless-react",
18
- "test:coverage": "npm run test:coverage --workspace=i18n-keyless-react"
13
+ "prepublishOnly": "rm -rf ./dist && tsc --project tsconfig.json && npm run test && npm pack",
14
+ "test": "vitest run",
15
+ "test:watch": "vitest",
16
+ "test:coverage": "vitest run --coverage"
17
+ },
18
+ "dependencies": {
19
+ "i18n-keyless-core": "latest",
20
+ "zustand": "^5.0.3"
21
+ },
22
+ "peerDependencies": {
23
+ "react": ">=18.0.0"
19
24
  },
20
25
  "devDependencies": {
21
- "typescript": "^5.5.3",
22
- "typescript-eslint": "^8.0.1"
26
+ "@eslint/js": "^9.9.0",
27
+ "@testing-library/jest-dom": "^6.6.3",
28
+ "@testing-library/react": "^16.2.0",
29
+ "@types/node": "^22.5.5",
30
+ "@types/react": "^19.0.8",
31
+ "@vitejs/plugin-react": "^4.3.4",
32
+ "@vitest/coverage-v8": "^3.1.1",
33
+ "eslint": "^9.9.0",
34
+ "eslint-plugin-react-hooks": "^5.1.0-rc.0",
35
+ "eslint-plugin-react-refresh": "^0.4.9",
36
+ "happy-dom": "^17.4.4",
37
+ "jsdom": "^26.0.0",
38
+ "vitest": "^3.1.1"
23
39
  }
24
40
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "i18n-keyless-react",
3
3
  "private": false,
4
- "version": "1.9.2",
4
+ "version": "1.9.4",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -1,4 +0,0 @@
1
- export { I18nKeylessText } from "./I18nKeylessText";
2
- export { init, setCurrentLanguage, useCurrentLanguage } from "./store";
3
- export { clearI18nKeylessStorage } from "./utils";
4
- export type { I18nKeylessTextProps } from "./I18nKeylessText";
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes