@conform-to/dom 1.0.3 → 1.0.4

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/form.d.ts CHANGED
@@ -90,10 +90,6 @@ export type FormOptions<Schema, FormError = string[], FormValue = Schema> = {
90
90
  submitter: HTMLInputElement | HTMLButtonElement | null;
91
91
  formData: FormData;
92
92
  }) => Submission<Schema, FormError, FormValue>;
93
- /**
94
- * To schedule when an intent should be dispatched.
95
- */
96
- onSchedule?: (callback: () => void) => void;
97
93
  };
98
94
  export type SubscriptionSubject = {
99
95
  [key in 'error' | 'initialValue' | 'value' | 'key' | 'valid' | 'dirty']?: SubscriptionScope;
package/form.js CHANGED
@@ -485,14 +485,12 @@ function createFormContext(options) {
485
485
  };
486
486
  }
487
487
  function createFormControl(type) {
488
- var _latestOptions$onSche;
489
- var schedule = (_latestOptions$onSche = latestOptions.onSchedule) !== null && _latestOptions$onSche !== void 0 ? _latestOptions$onSche : callback => callback();
490
488
  var control = function control() {
491
489
  var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
492
- return schedule(() => dispatch({
490
+ return dispatch({
493
491
  type,
494
492
  payload
495
- }));
493
+ });
496
494
  };
497
495
  return Object.assign(control, {
498
496
  getButtonProps() {
package/form.mjs CHANGED
@@ -481,14 +481,12 @@ function createFormContext(options) {
481
481
  };
482
482
  }
483
483
  function createFormControl(type) {
484
- var _latestOptions$onSche;
485
- var schedule = (_latestOptions$onSche = latestOptions.onSchedule) !== null && _latestOptions$onSche !== void 0 ? _latestOptions$onSche : callback => callback();
486
484
  var control = function control() {
487
485
  var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
488
- return schedule(() => dispatch({
486
+ return dispatch({
489
487
  type,
490
488
  payload
491
- }));
489
+ });
492
490
  };
493
491
  return Object.assign(control, {
494
492
  getButtonProps() {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A set of opinionated helpers built on top of the Constraint Validation API",
4
4
  "homepage": "https://conform.guide",
5
5
  "license": "MIT",
6
- "version": "1.0.3",
6
+ "version": "1.0.4",
7
7
  "main": "index.js",
8
8
  "module": "index.mjs",
9
9
  "types": "index.d.ts",