@sheet-i18n/react 1.7.4 → 1.7.5

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 CHANGED
@@ -8,7 +8,7 @@ This package provides tools to handle translations in React applications using c
8
8
 
9
9
  ## ✨ Package Introduction
10
10
 
11
- - **`I18nStore`**: _Core Store Creation Class_ for managing translation data.
11
+ - **`I18nStore`**: _Core Store Creation Class_ from `@sheet-i18n/core` for managing translation data.
12
12
  - **`createI18nContext`**: _React Context_ to generate providers and hooks for translation.
13
13
  - **`IntlProvider`**: _React Translation Provider_ for managing current locale.
14
14
  - **`useTranslation`**: _Client Side Translation Hook_ for easy access to translation messages on the client side.
@@ -52,7 +52,7 @@ this store will be used as a core translations module.
52
52
  import en from './en.json';
53
53
  import ko from './ko.json';
54
54
 
55
- import { I18nStore } from '@sheet-i18n/react';
55
+ import { I18nStore } from '@sheet-i18n/core';
56
56
 
57
57
  export const i18nStore = new I18nStore({
58
58
  supportedLocales: ['ko', 'en'],
@@ -127,6 +127,8 @@ const YourComponent = () => {
127
127
 
128
128
  The `I18nStore` manages translation states, ensuring consistency across locales.
129
129
 
130
+ Import it from `@sheet-i18n/core`, then pass the created store to `createI18nContext` from `@sheet-i18n/react`.
131
+
130
132
  #### Parameters:
131
133
 
132
134
  ### 🧠 I18nStore Configuration Options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheet-i18n/react",
3
- "version": "1.7.4",
3
+ "version": "1.7.5",
4
4
  "description": "i18n client logic based on react",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -13,11 +13,6 @@
13
13
  "types": "./dist/index.d.mts",
14
14
  "require": "./dist/index.js",
15
15
  "import": "./dist/index.mjs"
16
- },
17
- "./core": {
18
- "types": "./dist/core.d.mts",
19
- "require": "./dist/core.js",
20
- "import": "./dist/core.mjs"
21
16
  }
22
17
  },
23
18
  "publishConfig": {
@@ -42,10 +37,10 @@
42
37
  },
43
38
  "dependencies": {
44
39
  "react-intl": "^7.0.4",
45
- "@sheet-i18n/core": "1.7.0",
46
40
  "@sheet-i18n/shared-service": "0.2.0",
47
- "@sheet-i18n/typescript": "0.4.0",
48
41
  "@sheet-i18n/errors": "1.8.2",
42
+ "@sheet-i18n/core": "1.7.0",
43
+ "@sheet-i18n/typescript": "0.4.0",
49
44
  "@sheet-i18n/shared-utils": "1.8.3"
50
45
  },
51
46
  "peerDependencies": {
package/dist/core.d.mts DELETED
@@ -1 +0,0 @@
1
- export * from '@sheet-i18n/core';
package/dist/core.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from '@sheet-i18n/core';
package/dist/core.js DELETED
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
-
17
- // src/core.ts
18
- var core_exports = {};
19
- module.exports = __toCommonJS(core_exports);
20
- __reExport(core_exports, require("@sheet-i18n/core"), module.exports);
21
- // Annotate the CommonJS export names for ESM import in node:
22
- 0 && (module.exports = {
23
- ...require("@sheet-i18n/core")
24
- });
package/dist/core.mjs DELETED
@@ -1,2 +0,0 @@
1
- // src/core.ts
2
- export * from "@sheet-i18n/core";