@wuchale/jsx 0.6.0 → 0.6.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wuchale/jsx",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Protobuf-like i18n from plain code: JSX adapter",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "tsc --watch",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@sveltejs/acorn-typescript": "^1.0.5",
|
|
73
73
|
"acorn": "^8.15.0",
|
|
74
74
|
"acorn-jsx": "^5.3.2",
|
|
75
|
-
"wuchale": "^0.15.
|
|
75
|
+
"wuchale": "^0.15.1"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@types/estree-jsx": "^1.0.5",
|
|
@@ -11,4 +11,6 @@ export { setLocale }
|
|
|
11
11
|
/**
|
|
12
12
|
* @param {{ [locale: string]: import('wuchale/runtime').CatalogModule }} catalogs
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export const get = catalogs => catalogs[locale()]
|
|
15
|
+
// same function, because solid-js can use them anywhere
|
|
16
|
+
export default get
|
package/src/loaders/solidjs.js
CHANGED
|
@@ -9,7 +9,9 @@ import { createStore } from 'solid-js/store'
|
|
|
9
9
|
|
|
10
10
|
const [store, setStore] = createStore({})
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// two exports. can be the same because solid-js can use them anywhere unlike react
|
|
13
|
+
export const get = registerLoaders(key, loadCatalog, loadIDs, {
|
|
13
14
|
get: loadID => store[loadID],
|
|
14
15
|
set: setStore,
|
|
15
16
|
})
|
|
17
|
+
export default get
|