@symbiote-native/localization 0.3.0 → 2.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 +22 -6
- package/package.json +27 -15
package/README.md
CHANGED
|
@@ -82,8 +82,8 @@ function LocalizationScreen() {
|
|
|
82
82
|
|
|
83
83
|
return (
|
|
84
84
|
<>
|
|
85
|
-
<
|
|
86
|
-
<
|
|
85
|
+
<text>{locales[0].languageTag}</text>
|
|
86
|
+
<text>{calendars[0].timeZone}</text>
|
|
87
87
|
</>
|
|
88
88
|
);
|
|
89
89
|
}
|
|
@@ -98,11 +98,27 @@ const locales = useLocales(); // Ref<Locale[]>
|
|
|
98
98
|
const calendars = useCalendars(); // Ref<Calendar[]>
|
|
99
99
|
</script>
|
|
100
100
|
<template>
|
|
101
|
-
<
|
|
102
|
-
<
|
|
101
|
+
<text>{{ locales[0].languageTag }}</text>
|
|
102
|
+
<text>{{ calendars[0].timeZone }}</text>
|
|
103
103
|
</template>
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
+
```svelte
|
|
107
|
+
<!-- Svelte -->
|
|
108
|
+
<script lang="ts">
|
|
109
|
+
import {
|
|
110
|
+
useLocales,
|
|
111
|
+
useCalendars,
|
|
112
|
+
} from '@symbiote-native/localization/svelte';
|
|
113
|
+
|
|
114
|
+
const locales = useLocales(); // { readonly current: Locale[] }
|
|
115
|
+
const calendars = useCalendars(); // { readonly current: Calendar[] }
|
|
116
|
+
</script>
|
|
117
|
+
|
|
118
|
+
<text>{locales.current[0].languageTag}</text>
|
|
119
|
+
<text>{calendars.current[0].timeZone}</text>
|
|
120
|
+
```
|
|
121
|
+
|
|
106
122
|
```tsx
|
|
107
123
|
// Solid — an accessor per getter; call it to read, so a component body that runs once still
|
|
108
124
|
// re-renders the leaf that reads it.
|
|
@@ -117,8 +133,8 @@ function LocalizationScreen() {
|
|
|
117
133
|
|
|
118
134
|
return (
|
|
119
135
|
<>
|
|
120
|
-
<
|
|
121
|
-
<
|
|
136
|
+
<text>{locales()[0].languageTag}</text>
|
|
137
|
+
<text>{calendars()[0].timeZone}</text>
|
|
122
138
|
</>
|
|
123
139
|
);
|
|
124
140
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/localization",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "2.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": {
|
|
@@ -13,6 +13,18 @@
|
|
|
13
13
|
"url": "https://github.com/OneEyed1366/symbiote-native/issues"
|
|
14
14
|
},
|
|
15
15
|
"author": "Andrey Prokopenko <psevdoproger@gmail.com>",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"react-native",
|
|
18
|
+
"symbiote-native",
|
|
19
|
+
"expo-localization",
|
|
20
|
+
"react",
|
|
21
|
+
"vue",
|
|
22
|
+
"svelte",
|
|
23
|
+
"solid",
|
|
24
|
+
"angular",
|
|
25
|
+
"locale",
|
|
26
|
+
"calendar"
|
|
27
|
+
],
|
|
16
28
|
"type": "module",
|
|
17
29
|
"main": "./build/core/index.js",
|
|
18
30
|
"module": "./build/core/index.js",
|
|
@@ -61,19 +73,19 @@
|
|
|
61
73
|
"expo-modules-core": "57.0.5"
|
|
62
74
|
},
|
|
63
75
|
"peerDependencies": {
|
|
64
|
-
"@symbiote-native/angular": ">=0.6.2",
|
|
65
|
-
"@symbiote-native/engine": ">=0.1.7",
|
|
66
|
-
"@symbiote-native/react": ">=0.2.8",
|
|
67
|
-
"@symbiote-native/solid": ">=0.0.1",
|
|
68
|
-
"@symbiote-native/svelte": ">=0.1.0",
|
|
69
|
-
"@symbiote-native/vue": ">=0.3.8",
|
|
70
76
|
"@angular/core": ">=20",
|
|
71
77
|
"@vue/runtime-core": "^3.5.13",
|
|
72
78
|
"react": ">=19.0.0",
|
|
73
79
|
"react-native": ">=0.86",
|
|
74
80
|
"solid-js": ">=1.9.0",
|
|
75
81
|
"svelte": ">=5.56.0",
|
|
76
|
-
"vue": ">=3.5.0"
|
|
82
|
+
"vue": ">=3.5.0",
|
|
83
|
+
"@symbiote-native/angular": "^2.0.0",
|
|
84
|
+
"@symbiote-native/engine": "^0.5.0",
|
|
85
|
+
"@symbiote-native/react": "^2.0.0",
|
|
86
|
+
"@symbiote-native/solid": "^2.0.0",
|
|
87
|
+
"@symbiote-native/svelte": "^2.0.0",
|
|
88
|
+
"@symbiote-native/vue": "^2.0.0"
|
|
77
89
|
},
|
|
78
90
|
"peerDependenciesMeta": {
|
|
79
91
|
"@symbiote-native/angular": {
|
|
@@ -121,13 +133,13 @@
|
|
|
121
133
|
"solid-js": "^1.9.14",
|
|
122
134
|
"svelte": "^5.56.0",
|
|
123
135
|
"typescript": "~6.0.0",
|
|
124
|
-
"@symbiote-native/angular": "0.
|
|
125
|
-
"@symbiote-native/engine": "0.
|
|
126
|
-
"@symbiote-native/react": "0.
|
|
127
|
-
"@symbiote-native/solid": "0.
|
|
128
|
-
"@symbiote-native/svelte": "0.
|
|
129
|
-
"@symbiote-native/test-utils": "0.
|
|
130
|
-
"@symbiote-native/vue": "0.
|
|
136
|
+
"@symbiote-native/angular": "2.0.0",
|
|
137
|
+
"@symbiote-native/engine": "0.5.0",
|
|
138
|
+
"@symbiote-native/react": "2.0.0",
|
|
139
|
+
"@symbiote-native/solid": "2.0.0",
|
|
140
|
+
"@symbiote-native/svelte": "2.0.0",
|
|
141
|
+
"@symbiote-native/test-utils": "0.3.0",
|
|
142
|
+
"@symbiote-native/vue": "2.0.0"
|
|
131
143
|
},
|
|
132
144
|
"scripts": {
|
|
133
145
|
"typecheck": "tsc --build",
|