@saykit/react 0.0.0-beta-20260330102339 → 0.0.0-beta-20260418085054
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/dist/client.d.mts +3 -4
- package/dist/client.mjs +1 -5
- package/dist/index.client.mjs +0 -5
- package/dist/index.d.mts +1 -2
- package/dist/index.server.mjs +0 -5
- package/dist/server.d.mts +3 -6
- package/dist/server.mjs +0 -3
- package/package.json +5 -5
package/dist/client.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as react from "react";
|
|
1
|
+
import * as _$react from "react";
|
|
2
2
|
import { PropsWithChildren } from "react";
|
|
3
3
|
import { ReadonlySay, Say } from "saykit";
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@ declare function SayProvider({
|
|
|
20
20
|
}: PropsWithChildren<{
|
|
21
21
|
locale: string;
|
|
22
22
|
messages: Say.Messages;
|
|
23
|
-
}>): react.FunctionComponentElement<react.ProviderProps<SayRef>>;
|
|
23
|
+
}>): _$react.FunctionComponentElement<_$react.ProviderProps<SayRef>>;
|
|
24
24
|
/**
|
|
25
25
|
* Get the current {@link Say} **client** instance.
|
|
26
26
|
* Must be called within a {@link SayProvider}.
|
|
@@ -30,5 +30,4 @@ declare function SayProvider({
|
|
|
30
30
|
*/
|
|
31
31
|
declare function useSay(): any;
|
|
32
32
|
//#endregion
|
|
33
|
-
export { SayProvider, useSay };
|
|
34
|
-
//# sourceMappingURL=client.d.mts.map
|
|
33
|
+
export { SayProvider, useSay };
|
package/dist/client.mjs
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
3
2
|
import { createContext, createElement, useContext, useState } from "react";
|
|
4
3
|
import { Say } from "saykit";
|
|
5
|
-
|
|
6
4
|
//#region src/runtime/client.ts
|
|
7
5
|
const SayContext = createContext({ current: null });
|
|
8
6
|
SayContext.displayName = "SayContext";
|
|
@@ -37,7 +35,5 @@ function useSay() {
|
|
|
37
35
|
if (!ref.current) throw new Error("'useSay' must be used within a 'SayProvider'");
|
|
38
36
|
return ref.current;
|
|
39
37
|
}
|
|
40
|
-
|
|
41
38
|
//#endregion
|
|
42
39
|
export { SayProvider, useSay };
|
|
43
|
-
//# sourceMappingURL=client.mjs.map
|
package/dist/index.client.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client"; import { useSay as GET_SAY } from "./client.mjs";import { Fragment, cloneElement, createElement, isValidElement } from "react";
|
|
2
|
-
|
|
3
2
|
//#region src/components/renderer.ts
|
|
4
3
|
function Renderer({ html, components }) {
|
|
5
4
|
function getComponent(tag) {
|
|
@@ -44,7 +43,6 @@ function Renderer({ html, components }) {
|
|
|
44
43
|
}
|
|
45
44
|
return createElement(Fragment, void 0, ...parseNode(html));
|
|
46
45
|
}
|
|
47
|
-
|
|
48
46
|
//#endregion
|
|
49
47
|
//#region src/types.ts
|
|
50
48
|
function resolveJsxSafePropKeys(props) {
|
|
@@ -53,7 +51,6 @@ function resolveJsxSafePropKeys(props) {
|
|
|
53
51
|
else result[key] = props[key];
|
|
54
52
|
return result;
|
|
55
53
|
}
|
|
56
|
-
|
|
57
54
|
//#endregion
|
|
58
55
|
//#region src/runtime/index.ts
|
|
59
56
|
function Say(props) {
|
|
@@ -87,7 +84,5 @@ function Say(props) {
|
|
|
87
84
|
}
|
|
88
85
|
_Say.Select = Select;
|
|
89
86
|
})(Say || (Say = {}));
|
|
90
|
-
|
|
91
87
|
//#endregion
|
|
92
88
|
export { Say };
|
|
93
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/index.d.mts
CHANGED
package/dist/index.server.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getSay as GET_SAY } from "./server.mjs";import { Fragment, cloneElement, createElement, isValidElement } from "react";
|
|
2
|
-
|
|
3
2
|
//#region src/components/renderer.ts
|
|
4
3
|
function Renderer({ html, components }) {
|
|
5
4
|
function getComponent(tag) {
|
|
@@ -44,7 +43,6 @@ function Renderer({ html, components }) {
|
|
|
44
43
|
}
|
|
45
44
|
return createElement(Fragment, void 0, ...parseNode(html));
|
|
46
45
|
}
|
|
47
|
-
|
|
48
46
|
//#endregion
|
|
49
47
|
//#region src/types.ts
|
|
50
48
|
function resolveJsxSafePropKeys(props) {
|
|
@@ -53,7 +51,6 @@ function resolveJsxSafePropKeys(props) {
|
|
|
53
51
|
else result[key] = props[key];
|
|
54
52
|
return result;
|
|
55
53
|
}
|
|
56
|
-
|
|
57
54
|
//#endregion
|
|
58
55
|
//#region src/runtime/index.ts
|
|
59
56
|
function Say(props) {
|
|
@@ -87,7 +84,5 @@ function Say(props) {
|
|
|
87
84
|
}
|
|
88
85
|
_Say.Select = Select;
|
|
89
86
|
})(Say || (Say = {}));
|
|
90
|
-
|
|
91
87
|
//#endregion
|
|
92
88
|
export { Say };
|
|
93
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/server.d.mts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import * as react from "react";
|
|
1
|
+
import * as _$react from "react";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { ReadonlySay, Say } from "saykit";
|
|
4
|
-
import "server-only";
|
|
5
|
-
|
|
6
4
|
//#region src/runtime/server.d.ts
|
|
7
5
|
/**
|
|
8
6
|
* Set the current {@link Say} **server** instance.
|
|
@@ -29,10 +27,9 @@ declare function getSay(): ReadonlySay;
|
|
|
29
27
|
declare function unstable_createWithSay(say: Say): <P extends object>(Component: (props: P & {
|
|
30
28
|
locale: string;
|
|
31
29
|
messages: Say.Messages;
|
|
32
|
-
}) => ReactNode, getLocale: (props: P) => string | Promise<string>) => (props: P) => Promise<react.FunctionComponentElement<P & {
|
|
30
|
+
}) => ReactNode, getLocale: (props: P) => string | Promise<string>) => (props: P) => Promise<_$react.FunctionComponentElement<P & {
|
|
33
31
|
locale: string;
|
|
34
32
|
messages: Say.Messages;
|
|
35
33
|
}>>;
|
|
36
34
|
//#endregion
|
|
37
|
-
export { getSay, setSay, unstable_createWithSay };
|
|
38
|
-
//# sourceMappingURL=server.d.mts.map
|
|
35
|
+
export { getSay, setSay, unstable_createWithSay };
|
package/dist/server.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { cache, createElement } from "react";
|
|
2
2
|
import { Say } from "saykit";
|
|
3
3
|
import "server-only";
|
|
4
|
-
|
|
5
4
|
//#region src/runtime/server.ts
|
|
6
5
|
const serverContext = cache(() => ({ current: null }));
|
|
7
6
|
/**
|
|
@@ -52,7 +51,5 @@ function unstable_createWithSay(say) {
|
|
|
52
51
|
};
|
|
53
52
|
};
|
|
54
53
|
}
|
|
55
|
-
|
|
56
54
|
//#endregion
|
|
57
55
|
export { getSay, setSay, unstable_createWithSay };
|
|
58
|
-
//# sourceMappingURL=server.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saykit/react",
|
|
3
|
-
"version": "0.0.0-beta-
|
|
3
|
+
"version": "0.0.0-beta-20260418085054",
|
|
4
4
|
"description": "React integration for saykit, i18n hooks and components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
"server-only": "^0.0.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@types/react": "^19.2.
|
|
50
|
-
"react": "^19.2.
|
|
51
|
-
"saykit": "^0.0.0-beta-
|
|
49
|
+
"@types/react": "^19.2.14",
|
|
50
|
+
"react": "^19.2.5",
|
|
51
|
+
"saykit": "^0.0.0-beta-20260418085054"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"react": "*",
|
|
55
|
-
"saykit": "0.0.0-beta-
|
|
55
|
+
"saykit": "0.0.0-beta-20260418085054"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"check": "tsc --noEmit",
|