@verbaly/react 0.7.0 → 0.8.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 +57 -57
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,57 +1,57 @@
1
- <p align="center">
2
- <img src="https://raw.githubusercontent.com/AronSoto/verbaly/develop/assets/logo-light.png" alt="Verbaly" width="300" />
3
- </p>
4
-
5
- <p align="center"><em>React bindings for Verbaly — hooks over the reactive core.</em></p>
6
-
7
- <p align="center">
8
- <a href="https://www.npmjs.com/package/@verbaly/react"><img src="https://img.shields.io/npm/v/@verbaly/react?logo=npm&color=cb3837" alt="npm version" /></a>
9
- <a href="https://github.com/AronSoto/verbaly/blob/develop/LICENSE"><img src="https://img.shields.io/npm/l/@verbaly/react?color=blue" alt="Apache-2.0" /></a>
10
- </p>
11
-
12
- ---
13
-
14
- React hooks for [Verbaly](https://github.com/AronSoto/verbaly) — a thin layer (React 18/19) over the reactive core via `useSyncExternalStore`.
15
-
16
- ## Install
17
-
18
- ```bash
19
- pnpm add verbaly @verbaly/react
20
- ```
21
-
22
- ```tsx
23
- import { VerbalyProvider, useT, useLocale } from '@verbaly/react';
24
- import { verbaly } from 'virtual:verbaly';
25
-
26
- <VerbalyProvider instance={verbaly}>
27
- <App />
28
- </VerbalyProvider>;
29
-
30
- function Inbox() {
31
- const t = useT();
32
- return <p>{t('inbox', { count: 3 })}</p>;
33
- }
34
- ```
35
-
36
- ### Rich text — `<Trans>`
37
-
38
- Write the source text in place — the compiler extracts it (key, catalogs, props):
39
-
40
- ```tsx
41
- import { Trans } from '@verbaly/react';
42
-
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" /> }} />
47
- ```
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
-
51
- 📖 Docs: **https://verbaly-web.vercel.app/docs/frameworks**
52
-
53
- > ⚠️ Early development (`0.x`) — API not stable yet.
54
-
55
- ## License
56
-
57
- [Apache-2.0](https://github.com/AronSoto/verbaly/blob/develop/LICENSE) © Aron Soto
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/AronSoto/verbaly/develop/assets/logo-light.png" alt="Verbaly" width="300" />
3
+ </p>
4
+
5
+ <p align="center"><em>React bindings for Verbaly — hooks over the reactive core.</em></p>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/@verbaly/react"><img src="https://img.shields.io/npm/v/@verbaly/react?logo=npm&color=cb3837" alt="npm version" /></a>
9
+ <a href="https://github.com/AronSoto/verbaly/blob/develop/LICENSE"><img src="https://img.shields.io/npm/l/@verbaly/react?color=blue" alt="Apache-2.0" /></a>
10
+ </p>
11
+
12
+ ---
13
+
14
+ React hooks for [Verbaly](https://github.com/AronSoto/verbaly) — a thin layer (React 18/19) over the reactive core via `useSyncExternalStore`.
15
+
16
+ ## Install
17
+
18
+ ```bash
19
+ pnpm add verbaly @verbaly/react
20
+ ```
21
+
22
+ ```tsx
23
+ import { VerbalyProvider, useT, useLocale } from '@verbaly/react';
24
+ import { verbaly } from 'virtual:verbaly';
25
+
26
+ <VerbalyProvider instance={verbaly}>
27
+ <App />
28
+ </VerbalyProvider>;
29
+
30
+ function Inbox() {
31
+ const t = useT();
32
+ return <p>{t('inbox', { count: 3 })}</p>;
33
+ }
34
+ ```
35
+
36
+ ### Rich text — `<Trans>`
37
+
38
+ Write the source text in place — the compiler extracts it (key, catalogs, props):
39
+
40
+ ```tsx
41
+ import { Trans } from '@verbaly/react';
42
+
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" /> }} />
47
+ ```
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
+
51
+ 📖 Docs: **https://verbaly-web.vercel.app/docs/frameworks**
52
+
53
+ > ⚠️ Early development (`0.x`) — API not stable yet.
54
+
55
+ ## License
56
+
57
+ [Apache-2.0](https://github.com/AronSoto/verbaly/blob/develop/LICENSE) © Aron Soto
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verbaly/react",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "React bindings for Verbaly — hooks over the reactive core.",
5
5
  "keywords": [
6
6
  "i18n",
@@ -15,7 +15,7 @@
15
15
  "url": "git+https://github.com/AronSoto/verbaly.git",
16
16
  "directory": "packages/react"
17
17
  },
18
- "homepage": "https://github.com/AronSoto/verbaly#readme",
18
+ "homepage": "https://verbaly-web.vercel.app/docs/frameworks",
19
19
  "bugs": {
20
20
  "url": "https://github.com/AronSoto/verbaly/issues"
21
21
  },
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": "^18.0.0 || ^19.0.0",
46
- "verbaly": "^0.7.0"
46
+ "verbaly": "^0.8.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.7.0"
54
+ "verbaly": "0.8.0"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "tsup",