kotori 5.0.6 → 5.0.9

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 (2) hide show
  1. package/README.md +12 -3
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -2,7 +2,16 @@
2
2
  <img src="logo.webp" alt="kotori i18n logo">
3
3
  </p>
4
4
 
5
- Strongly-typed, modular i18n for React. Variables are inferred directly from your strings — no codegen, no JSON, no schema files.
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/kotori"><img src="https://img.shields.io/npm/v/kotori?color=crimson" alt="NPM Version"></a>
7
+ <img src="https://img.shields.io/badge/dependencies-0-success" alt="Dependencies">
8
+ <a href="https://github.com/tylim88/Kotori/blob/main/LICENSE"><img src="https://img.shields.io/github/license/tylim88/Kotori?color=blue" alt="License"></a>
9
+ <img src="https://img.shields.io/badge/bundle%20size-0.28kB-emerald" alt="Bundle Size">
10
+ </p>
11
+
12
+ <p align="center">
13
+ 🕊️ Kotori is a zero-config, fully type-safe, and modular internationalization library for React that compiles down to just 0.28kB. No JSON, no external CLI tools, no codegen—just live type inference from your strings.
14
+ </p>
6
15
 
7
16
  ```ts
8
17
  const { dict, t } = kotori({
@@ -69,14 +78,14 @@ export const { useT, dict, setLanguage, t } = kotori({
69
78
  })
70
79
 
71
80
  // you can define your dicts in the same file or separate them by component, it's up to you
72
- const intro = dict({
81
+ export const intro = dict({
73
82
  en: 'my name is {{name}}, I am {{age}} years old.',
74
83
  zh: '我叫{{name}},我今年{{age}}岁了。',
75
84
  ja: '私の名前は{{name}}で、{{age}}歳です。',
76
85
  ms: 'nama saya {{name}}, saya berumur {{age}} tahun.',
77
86
  })
78
87
 
79
- const time = dict({
88
+ export const time = dict({
80
89
  en: 'time {{time}}',
81
90
  zh: '时间 {{time}}',
82
91
  ja: '時間 {{time}}',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kotori",
3
- "description": "Strongly-typed and composable internationalization library for React",
4
- "version": "5.0.6",
3
+ "description": "0.28kB Strongly-typed and tree-shakeable internationalization library for React",
4
+ "version": "5.0.9",
5
5
  "scripts": {
6
6
  "setup": "rm -rf node_modules && npm i && git init && husky",
7
7
  "prepublishOnly": "npm i && npx tsc && npm run build",