@symbiote-native/localization 3.0.0 → 3.0.2

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
@@ -12,13 +12,27 @@ depended on directly and never the `expo` meta-package, why the upstream JS is h
12
12
 
13
13
  ## Install
14
14
 
15
+ **New app:**
16
+
15
17
  ```bash
16
- npm install @symbiote-native/localization
18
+ npx @symbiote-native/cli new my-app --localization
19
+ ```
20
+
21
+ **Existing SymbioteNative app:**
22
+
23
+ ```bash
24
+ npx @symbiote-native/cli add --localization
17
25
  ```
18
26
 
19
- Scaffolding or extending a SymbioteNative app? `npx @symbiote-native/cli new --localization` (or
20
- `add --localization` in an existing app) installs and wires this for you — see
21
- [`@symbiote-native/cli`](../cli).
27
+ Either way: installs `@symbiote-native/localization` and wires the native autolinking
28
+ automatically — see [`@symbiote-native/cli`](../cli).
29
+
30
+ <details>
31
+ <summary>Manual install (no CLI — installing and wiring native autolinking by hand)</summary>
32
+
33
+ ```bash
34
+ npm install @symbiote-native/localization
35
+ ```
22
36
 
23
37
  Depends on `expo-localization` and `expo-modules-core` directly (regular dependencies, pinned to
24
38
  exact versions — never a caret range, since this package's `core/` is hand-ported against one
@@ -48,6 +62,8 @@ implementation: `examples/expo-react/ios/Podfile` and
48
62
  No platform permission string is needed — locale and calendar settings are read-only system
49
63
  state with no runtime permission prompt on either platform.
50
64
 
65
+ </details>
66
+
51
67
  ## Shape
52
68
 
53
69
  ```
@@ -4,6 +4,9 @@ import { useEffect, useMemo, useReducer } from 'react';
4
4
  import { addCalendarListener, getCalendars, } from '../../../core/index.js';
5
5
  export function useCalendars() {
6
6
  const [invalidationKey, invalidate] = useReducer((key) => key + 1, 0);
7
+ // invalidationKey is a pure invalidation signal, never read inside the memo — it exists only to
8
+ // force a recompute when the native listener fires, matching upstream's identical pattern.
9
+ // eslint-disable-next-line react-hooks/exhaustive-deps
7
10
  const calendars = useMemo(() => getCalendars(), [invalidationKey]);
8
11
  useEffect(() => {
9
12
  const subscription = addCalendarListener(invalidate);
@@ -6,6 +6,9 @@ import { useEffect, useMemo, useReducer } from 'react';
6
6
  import { addLocaleListener, getLocales } from '../../../core/index.js';
7
7
  export function useLocales() {
8
8
  const [invalidationKey, invalidate] = useReducer((key) => key + 1, 0);
9
+ // invalidationKey is a pure invalidation signal, never read inside the memo — it exists only to
10
+ // force a recompute when the native listener fires, matching upstream's identical pattern.
11
+ // eslint-disable-next-line react-hooks/exhaustive-deps
9
12
  const locales = useMemo(() => getLocales(), [invalidationKey]);
10
13
  useEffect(() => {
11
14
  const subscription = addLocaleListener(invalidate);
package/native-link.json CHANGED
@@ -7,6 +7,7 @@
7
7
  "className": "LocalizationModule",
8
8
  "nativeName": "ExpoLocalization"
9
9
  }
10
- ]
10
+ ],
11
+ "mainActivityConfigChanges": ["locale", "layoutDirection"]
11
12
  }
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbiote-native/localization",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "expo-localization wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Two independent synchronous getters (getLocales, getCalendars), each with its own native change listener and its own reactive hook per adapter.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -80,12 +80,12 @@
80
80
  "solid-js": ">=1.9.0",
81
81
  "svelte": ">=5.56.0",
82
82
  "vue": ">=3.5.0",
83
- "@symbiote-native/angular": "^3.0.0",
84
- "@symbiote-native/engine": "^1.0.0",
85
- "@symbiote-native/react": "^3.0.0",
86
- "@symbiote-native/solid": "^3.0.0",
87
- "@symbiote-native/svelte": "^3.0.0",
88
- "@symbiote-native/vue": "^3.0.0"
83
+ "@symbiote-native/angular": "^3.1.2",
84
+ "@symbiote-native/engine": "^1.3.1",
85
+ "@symbiote-native/react": "^3.0.4",
86
+ "@symbiote-native/solid": "^3.0.4",
87
+ "@symbiote-native/svelte": "^3.0.4",
88
+ "@symbiote-native/vue": "^3.0.4"
89
89
  },
90
90
  "peerDependenciesMeta": {
91
91
  "@symbiote-native/angular": {
@@ -133,13 +133,13 @@
133
133
  "solid-js": "^1.9.14",
134
134
  "svelte": "^5.56.0",
135
135
  "typescript": "~6.0.0",
136
- "@symbiote-native/angular": "3.0.0",
137
- "@symbiote-native/engine": "1.0.0",
138
- "@symbiote-native/react": "3.0.0",
139
- "@symbiote-native/solid": "3.0.0",
140
- "@symbiote-native/svelte": "3.0.0",
141
- "@symbiote-native/test-utils": "0.3.1",
142
- "@symbiote-native/vue": "3.0.0"
136
+ "@symbiote-native/angular": "3.1.2",
137
+ "@symbiote-native/engine": "1.3.1",
138
+ "@symbiote-native/react": "3.0.4",
139
+ "@symbiote-native/solid": "3.0.4",
140
+ "@symbiote-native/svelte": "3.0.4",
141
+ "@symbiote-native/test-utils": "0.4.4",
142
+ "@symbiote-native/vue": "3.0.4"
143
143
  },
144
144
  "scripts": {
145
145
  "typecheck": "tsc --build",
@@ -9,6 +9,9 @@ import {
9
9
 
10
10
  export function useCalendars(): Calendar[] {
11
11
  const [invalidationKey, invalidate] = useReducer((key: number) => key + 1, 0);
12
+ // invalidationKey is a pure invalidation signal, never read inside the memo — it exists only to
13
+ // force a recompute when the native listener fires, matching upstream's identical pattern.
14
+ // eslint-disable-next-line react-hooks/exhaustive-deps
12
15
  const calendars = useMemo(() => getCalendars(), [invalidationKey]);
13
16
 
14
17
  useEffect(() => {
@@ -7,6 +7,9 @@ import { addLocaleListener, getLocales, type Locale } from '../../../core';
7
7
 
8
8
  export function useLocales(): Locale[] {
9
9
  const [invalidationKey, invalidate] = useReducer((key: number) => key + 1, 0);
10
+ // invalidationKey is a pure invalidation signal, never read inside the memo — it exists only to
11
+ // force a recompute when the native listener fires, matching upstream's identical pattern.
12
+ // eslint-disable-next-line react-hooks/exhaustive-deps
10
13
  const locales = useMemo(() => getLocales(), [invalidationKey]);
11
14
 
12
15
  useEffect(() => {