@saykit/react 0.0.0-beta-20260906064714 → 0.0.0-beta-20260911005306
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/index.mjs +6 -3
- package/dist/index.server.mjs +6 -3
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -56,14 +56,17 @@ function resolveValuePropKeys(props) {
|
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/runtime/index.ts
|
|
58
58
|
function Say(props) {
|
|
59
|
-
if (!("id" in props)) throw new Error("'Say' is a macro and must be used with the relevant saykit plugin", { cause: /* @__PURE__ */ new Error("The 'id' property is required for a descriptor") });
|
|
59
|
+
if (!("id" in props) && !("message" in props)) throw new Error("'Say' is a macro and must be used with the relevant saykit plugin", { cause: /* @__PURE__ */ new Error("The 'id' property is required for a descriptor") });
|
|
60
60
|
const say = GET_SAY();
|
|
61
|
-
const { id, whitespace, ...rest } = props;
|
|
61
|
+
const { id, message, whitespace, ...rest } = props;
|
|
62
62
|
const values = resolveValuePropKeys(rest);
|
|
63
63
|
return createElement(Renderer, {
|
|
64
|
-
html: say.call({
|
|
64
|
+
html: say.call(message === void 0 ? {
|
|
65
65
|
...rest,
|
|
66
66
|
id
|
|
67
|
+
} : {
|
|
68
|
+
...rest,
|
|
69
|
+
message
|
|
67
70
|
}),
|
|
68
71
|
whitespace,
|
|
69
72
|
components(tag) {
|
package/dist/index.server.mjs
CHANGED
|
@@ -56,14 +56,17 @@ function resolveValuePropKeys(props) {
|
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/runtime/index.ts
|
|
58
58
|
function Say(props) {
|
|
59
|
-
if (!("id" in props)) throw new Error("'Say' is a macro and must be used with the relevant saykit plugin", { cause: /* @__PURE__ */ new Error("The 'id' property is required for a descriptor") });
|
|
59
|
+
if (!("id" in props) && !("message" in props)) throw new Error("'Say' is a macro and must be used with the relevant saykit plugin", { cause: /* @__PURE__ */ new Error("The 'id' property is required for a descriptor") });
|
|
60
60
|
const say = GET_SAY();
|
|
61
|
-
const { id, whitespace, ...rest } = props;
|
|
61
|
+
const { id, message, whitespace, ...rest } = props;
|
|
62
62
|
const values = resolveValuePropKeys(rest);
|
|
63
63
|
return createElement(Renderer, {
|
|
64
|
-
html: say.call({
|
|
64
|
+
html: say.call(message === void 0 ? {
|
|
65
65
|
...rest,
|
|
66
66
|
id
|
|
67
|
+
} : {
|
|
68
|
+
...rest,
|
|
69
|
+
message
|
|
67
70
|
}),
|
|
68
71
|
whitespace,
|
|
69
72
|
components(tag) {
|
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-20260911005306",
|
|
4
4
|
"description": "React integration for saykit, i18n hooks and components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"jsdom": "^29.1.1",
|
|
54
54
|
"react": "^19.2.8",
|
|
55
55
|
"react-dom": "^19.2.8",
|
|
56
|
-
"saykit": "^0.0.0-beta-
|
|
56
|
+
"saykit": "^0.0.0-beta-20260911005306"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"react": "*",
|
|
60
|
-
"saykit": "0.0.0-beta-
|
|
60
|
+
"saykit": "0.0.0-beta-20260911005306"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"check": "tsc --noEmit",
|