@symbiote-native/localization 1.0.0 → 3.0.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 +17 -9
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -16,6 +16,10 @@ depended on directly and never the `expo` meta-package, why the upstream JS is h
|
|
|
16
16
|
npm install @symbiote-native/localization
|
|
17
17
|
```
|
|
18
18
|
|
|
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).
|
|
22
|
+
|
|
19
23
|
Depends on `expo-localization` and `expo-modules-core` directly (regular dependencies, pinned to
|
|
20
24
|
exact versions — never a caret range, since this package's `core/` is hand-ported against one
|
|
21
25
|
specific native API shape and a newer resolve could silently drift the two apart). Never install
|
|
@@ -82,8 +86,8 @@ function LocalizationScreen() {
|
|
|
82
86
|
|
|
83
87
|
return (
|
|
84
88
|
<>
|
|
85
|
-
<
|
|
86
|
-
<
|
|
89
|
+
<text>{locales[0].languageTag}</text>
|
|
90
|
+
<text>{calendars[0].timeZone}</text>
|
|
87
91
|
</>
|
|
88
92
|
);
|
|
89
93
|
}
|
|
@@ -98,21 +102,25 @@ const locales = useLocales(); // Ref<Locale[]>
|
|
|
98
102
|
const calendars = useCalendars(); // Ref<Calendar[]>
|
|
99
103
|
</script>
|
|
100
104
|
<template>
|
|
101
|
-
<
|
|
102
|
-
<
|
|
105
|
+
<text>{{ locales[0].languageTag }}</text>
|
|
106
|
+
<text>{{ calendars[0].timeZone }}</text>
|
|
103
107
|
</template>
|
|
104
108
|
```
|
|
105
109
|
|
|
106
110
|
```svelte
|
|
107
111
|
<!-- Svelte -->
|
|
108
112
|
<script lang="ts">
|
|
109
|
-
import {
|
|
113
|
+
import {
|
|
114
|
+
useLocales,
|
|
115
|
+
useCalendars,
|
|
116
|
+
} from '@symbiote-native/localization/svelte';
|
|
110
117
|
|
|
111
118
|
const locales = useLocales(); // { readonly current: Locale[] }
|
|
112
119
|
const calendars = useCalendars(); // { readonly current: Calendar[] }
|
|
113
120
|
</script>
|
|
114
|
-
|
|
115
|
-
<
|
|
121
|
+
|
|
122
|
+
<text>{locales.current[0].languageTag}</text>
|
|
123
|
+
<text>{calendars.current[0].timeZone}</text>
|
|
116
124
|
```
|
|
117
125
|
|
|
118
126
|
```tsx
|
|
@@ -129,8 +137,8 @@ function LocalizationScreen() {
|
|
|
129
137
|
|
|
130
138
|
return (
|
|
131
139
|
<>
|
|
132
|
-
<
|
|
133
|
-
<
|
|
140
|
+
<text>{locales()[0].languageTag}</text>
|
|
141
|
+
<text>{calendars()[0].timeZone}</text>
|
|
134
142
|
</>
|
|
135
143
|
);
|
|
136
144
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/localization",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
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": "^
|
|
84
|
-
"@symbiote-native/engine": "^0.
|
|
85
|
-
"@symbiote-native/react": "^
|
|
86
|
-
"@symbiote-native/solid": "^
|
|
87
|
-
"@symbiote-native/svelte": "^
|
|
88
|
-
"@symbiote-native/vue": "^
|
|
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"
|
|
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": "
|
|
137
|
-
"@symbiote-native/engine": "0.
|
|
138
|
-
"@symbiote-native/react": "
|
|
139
|
-
"@symbiote-native/solid": "
|
|
140
|
-
"@symbiote-native/svelte": "
|
|
141
|
-
"@symbiote-native/test-utils": "0.3.
|
|
142
|
-
"@symbiote-native/vue": "
|
|
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"
|
|
143
143
|
},
|
|
144
144
|
"scripts": {
|
|
145
145
|
"typecheck": "tsc --build",
|