@verbaly/react 0.5.0 → 0.7.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 (2) hide show
  1. package/README.md +7 -3
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -35,15 +35,19 @@ function Inbox() {
35
35
 
36
36
  ### Rich text — `<Trans>`
37
37
 
38
- Interpolate elements with named tags in the message:
38
+ Write the source text in place — the compiler extracts it (key, catalogs, props):
39
39
 
40
40
  ```tsx
41
41
  import { Trans } from '@verbaly/react';
42
42
 
43
- // message: Read the <terms>terms</terms> first
44
- <Trans id="agree" components={{ terms: <a href="/terms" /> }} />;
43
+ // you write:
44
+ <Trans>Read the <a href="/terms">terms</a> before continuing</Trans>
45
+ // the compiler rewrites it to:
46
+ <Trans id="x7Ka9q2f" components={{ "a": <a href="/terms" /> }} />
45
47
  ```
46
48
 
49
+ Runtime-first still works — pass `id` (+ `values`/`components`) yourself and nothing is touched. JSX whitespace rules apply: a line break between an element and text renders no space (use `{' '}`).
50
+
47
51
  📖 Docs: **https://verbaly-web.vercel.app/docs/frameworks**
48
52
 
49
53
  > ⚠️ Early development (`0.x`) — API not stable yet.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verbaly/react",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "React bindings for Verbaly — hooks over the reactive core.",
5
5
  "keywords": [
6
6
  "i18n",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": "^18.0.0 || ^19.0.0",
46
- "verbaly": "^0.5.0"
46
+ "verbaly": "^0.7.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/react": "^19.2.17",
@@ -51,7 +51,7 @@
51
51
  "happy-dom": "^20.10.6",
52
52
  "react": "^19.2.7",
53
53
  "react-dom": "^19.2.7",
54
- "verbaly": "0.5.0"
54
+ "verbaly": "0.7.0"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "tsup",