@ichaingo/translation 1.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 ADDED
@@ -0,0 +1,11 @@
1
+ # translation
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build translation` to build the library.
8
+
9
+ ## Running unit tests
10
+
11
+ Run `nx test translation` to execute the unit tests via [Vitest](https://vitest.dev/).
@@ -0,0 +1,7 @@
1
+ export interface TranslationProps {
2
+ value: string;
3
+ parentKey?: string;
4
+ params?: Record<string, string | number>;
5
+ }
6
+ export default function Translation({ value, parentKey, params }: TranslationProps): string;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAC,MAAM,CAAC,CAAC;CACxC;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,SAAc,EAAE,MAAW,EAAE,EAAE,gBAAgB,UAG3F"}
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ import { useTranslations as r } from "next-intl";
2
+ function e({ value: t, parentKey: n = "", params: o = {} }) {
3
+ return r(n)(`${t}`, o);
4
+ }
5
+ export {
6
+ e as default
7
+ };
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@ichaingo/translation",
3
+ "version": "1.1.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ "./package.json": "./package.json",
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "default": "./dist/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "!**/*.tsbuildinfo"
19
+ ],
20
+ "dependencies": {
21
+ "next-intl": "^4.3.4"
22
+ },
23
+ "peerDependencies": {
24
+ "react": "^19.1.0"
25
+ }
26
+ }