remix-validated-form 4.6.7 → 4.6.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,17 +1,18 @@
1
- $ vite build
2
- vite v2.9.15 building for production...
3
- transforming...
4
- ✓ 291 modules transformed.
5
- rendering chunks...
6
- dist/remix-validated-form.cjs.js  32.76 KiB / gzip: 11.39 KiB
7
- dist/remix-validated-form.cjs.js.map 168.68 KiB
8
- dist/remix-validated-form.es.js  67.07 KiB / gzip: 15.71 KiB
9
- dist/remix-validated-form.es.js.map 166.22 KiB
10
- No name was provided for external module 'react' in output.globals – guessing 'React'
11
- No name was provided for external module '@remix-run/react' in output.globals – guessing 'react'
12
- dist/remix-validated-form.umd.js  32.95 KiB / gzip: 11.46 KiB
13
- dist/remix-validated-form.umd.js.map 168.64 KiB
14
- 
15
- [vite:dts] Start generate declaration files...
16
- [vite:dts] Declaration files built in 1834ms.
17
- 
1
+ $ tsup
2
+ CLI Building entry: src/index.ts
3
+ CLI Using tsconfig: tsconfig.json
4
+ CLI tsup v6.5.0
5
+ CLI Using tsup config: /Users/aaronpettengill/dev/remix-validated-form/packages/remix-validated-form/tsup.config.ts
6
+ CLI Target: es2019
7
+ CLI Cleaning output folder
8
+ ESM Build start
9
+ CJS Build start
10
+ ESM dist/index.esm.js 56.19 KB
11
+ ESM dist/index.esm.js.map 120.98 KB
12
+ ESM ⚡️ Build success in 26ms
13
+ CJS dist/index.cjs.js 58.82 KB
14
+ CJS dist/index.cjs.js.map 121.12 KB
15
+ CJS ⚡️ Build success in 26ms
16
+ DTS Build start
17
+ DTS ⚡️ Build success in 1562ms
18
+ DTS dist/index.d.ts 11.67 KB
package/dist/index.cjs.js CHANGED
@@ -200,7 +200,7 @@ var hydratable = {
200
200
 
201
201
  // src/internal/state/createFormStore.ts
202
202
  var import_tiny_invariant2 = __toESM(require("tiny-invariant"));
203
- var import_zustand = __toESM(require("zustand"));
203
+ var import_zustand = require("zustand");
204
204
  var import_immer = require("zustand/middleware/immer");
205
205
 
206
206
  // src/internal/logic/requestSubmit.ts
@@ -1001,7 +1001,7 @@ var createFormState = (set, get2) => ({
1001
1001
  }
1002
1002
  }
1003
1003
  });
1004
- var useRootFormStore = (0, import_zustand.default)()(
1004
+ var useRootFormStore = (0, import_zustand.create)()(
1005
1005
  (0, import_immer.immer)((set, get2) => ({
1006
1006
  forms: {},
1007
1007
  form: (formId) => {
@@ -1584,6 +1584,7 @@ function ValidatedForm({
1584
1584
  const handleSubmit = async (e, target, nativeEvent) => {
1585
1585
  startSubmit();
1586
1586
  const submitter = nativeEvent.submitter;
1587
+ const formMethod = (submitter == null ? void 0 : submitter.formMethod) || method;
1587
1588
  const formDataToValidate = getDataFromForm(e.currentTarget);
1588
1589
  if (submitter == null ? void 0 : submitter.name) {
1589
1590
  formDataToValidate.append(submitter.name, submitter.value);
@@ -1608,11 +1609,11 @@ function ValidatedForm({
1608
1609
  return;
1609
1610
  }
1610
1611
  if (fetcher)
1611
- fetcher.submit(submitter || e.currentTarget);
1612
+ fetcher.submit(submitter || e.currentTarget, { method: formMethod });
1612
1613
  else
1613
1614
  submit(submitter || target, {
1614
1615
  replace: replace2,
1615
- method: (submitter == null ? void 0 : submitter.formMethod) || method
1616
+ method: formMethod
1616
1617
  });
1617
1618
  }
1618
1619
  };