react-form-action 0.4.2 → 1.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.
Files changed (2) hide show
  1. package/dist/client.mjs +1 -1
  2. package/package.json +5 -5
package/dist/client.mjs CHANGED
@@ -1 +1 @@
1
- "use client";import a from"react";import{useFormState as u}from"react-dom";import{useFormStatus as p}from"react-dom";function e({children:t}){return t(p())}function d(t){return{type:"initial",data:t,error:null,validationError:null}}function E({children:t,action:o,initialData:i,permalink:n,...s}){let[r,m]=u(o,d(i),n);return a.createElement("form",{action:m,...s},a.createElement(e,null,({pending:l})=>t({...r,isPending:l,isInitial:r.type==="initial",isInvalid:r.type==="invalid",isFailure:r.type==="failure",isSuccess:r.type==="success"})))}export{E as Form,e as FormStatus,d as initial};
1
+ "use client";import a from"react";import{useActionState as u}from"react";import{useFormStatus as p}from"react-dom";function e({children:t}){return t(p())}function d(t){return{type:"initial",data:t,error:null,validationError:null}}function E({children:t,action:o,initialData:i,permalink:n,...s}){let[r,l]=u(o,d(i),n);return a.createElement("form",{action:l,...s},a.createElement(e,null,({pending:m})=>t({...r,isPending:m,isInitial:r.type==="initial",isInvalid:r.type==="invalid",isFailure:r.type==="failure",isSuccess:r.type==="success"})))}export{E as Form,e as FormStatus,d as initial};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-form-action",
3
- "version": "0.4.2",
3
+ "version": "1.0.0",
4
4
  "description": "State management helpers for the react form actions.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,14 +42,14 @@
42
42
  "author": "Miroslav Petrik",
43
43
  "license": "MIT",
44
44
  "peerDependencies": {
45
- "react": ">=18.2",
46
- "react-dom": ">=18.2",
45
+ "react": ">=18.3",
46
+ "react-dom": ">=18.3",
47
47
  "zod": "^3",
48
48
  "zod-form-data": "^2"
49
49
  },
50
50
  "devDependencies": {
51
- "@types/react": "^18.2.37",
52
- "@types/react-dom": "^18.2.15",
51
+ "@types/react": "^18.3.5",
52
+ "@types/react-dom": "^18.3.0",
53
53
  "next": "^14.0.2",
54
54
  "react-render-prop-type": "^0.1.0",
55
55
  "tsup": "^7.2.0",