@the-smithy/hearth 0.18.0 → 0.19.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/dist/next.d.ts +1 -1
- package/dist/next.js +2 -1
- package/package.json +2 -2
package/dist/next.d.ts
CHANGED
|
@@ -190,7 +190,7 @@ declare function createHearthNext(client: HearthCore, { tag, revalidate }?: Hear
|
|
|
190
190
|
* A donation form's server action, shaped for `useActionState(action, null)`. Export it from a "use server" file:
|
|
191
191
|
* export const donate = async (prev: FormResult | null, fd: FormData) => donateAction()(prev, fd);
|
|
192
192
|
* Fields: `amount` (dollars, or "custom" with `customAmount`), `fundraiser`, `name`, `email`, `anonymous`,
|
|
193
|
-
* `message
|
|
193
|
+
* `message`, `updates` (a checkbox: "Send me updates about this fundraiser", unticked by default). On success it redirects the donor to the payment page; afterwards they return to `returnPath`.
|
|
194
194
|
*/
|
|
195
195
|
donateAction: ({ returnPath }?: {
|
|
196
196
|
returnPath?: string;
|
package/dist/next.js
CHANGED
|
@@ -70,7 +70,7 @@ function createHearthNext(client, { tag = "hearth", revalidate = 3600 } = {}) {
|
|
|
70
70
|
* A donation form's server action, shaped for `useActionState(action, null)`. Export it from a "use server" file:
|
|
71
71
|
* export const donate = async (prev: FormResult | null, fd: FormData) => donateAction()(prev, fd);
|
|
72
72
|
* Fields: `amount` (dollars, or "custom" with `customAmount`), `fundraiser`, `name`, `email`, `anonymous`,
|
|
73
|
-
* `message
|
|
73
|
+
* `message`, `updates` (a checkbox: "Send me updates about this fundraiser", unticked by default). On success it redirects the donor to the payment page; afterwards they return to `returnPath`.
|
|
74
74
|
*/
|
|
75
75
|
donateAction: ({ returnPath = "/donate/thank-you" } = {}) => async (_prev, formData) => {
|
|
76
76
|
const h = await headers();
|
|
@@ -87,6 +87,7 @@ function createHearthNext(client, { tag = "hearth", revalidate = 3600 } = {}) {
|
|
|
87
87
|
name: text("name"),
|
|
88
88
|
email: text("email"),
|
|
89
89
|
anonymous: formData.get("anonymous") === "on" || formData.get("anonymous") === "true",
|
|
90
|
+
updates: formData.get("updates") === "on" || formData.get("updates") === "true",
|
|
90
91
|
message: text("message"),
|
|
91
92
|
returnUrl: `${proto}://${host}${safePath(returnPath)}`
|
|
92
93
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@the-smithy/hearth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Typed client for the Hearth Delivery API: content, SEO, forms and publish webhooks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"llms.md"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@the-smithy/hearth-schema": "^0.
|
|
52
|
+
"@the-smithy/hearth-schema": "^0.19.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"next": ">=15",
|