@steveesamson/microform 0.0.8 → 0.0.9

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.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from "./types.js";
2
- import type { UseFormProps, UseFormReturn } from './types.js';
3
- declare const useForm: (props?: UseFormProps) => UseFormReturn;
2
+ import type { MicroFormProps, MicroFormReturn } from './types.js';
3
+ declare const useForm: (props?: MicroFormProps) => MicroFormReturn;
4
4
  export default useForm;
package/dist/types.d.ts CHANGED
@@ -34,15 +34,15 @@ export type FormSubmit = (_data: Params) => void;
34
34
  export type FormOptions = {
35
35
  validateEvent: ValidateEvent;
36
36
  };
37
- export type UseFormProps = {
37
+ export type MicroFormProps = {
38
38
  data?: Params;
39
39
  options?: FormOptions;
40
40
  };
41
41
  export type FormSanity = Readable<boolean>;
42
- export type UseFormReturn = {
42
+ export type MicroFormReturn = {
43
43
  values: FormValues;
44
44
  errors: FormErrors;
45
- form: (node: HTMLElement, eventProps?: ActionOptions) => void;
45
+ form: (node: HTMLElement, eventProps?: ActionOptions) => FormReturn;
46
46
  valid: FormSanity;
47
47
  submit: (formNode: HTMLFormElement, handler: FormSubmit) => void;
48
48
  onsubmit: (handler: FormSubmit) => (e: Event) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steveesamson/microform",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "postbuild": "touch ./docs/.nojekyll",
@@ -21,7 +21,8 @@
21
21
  "exports": {
22
22
  ".": {
23
23
  "types": "./dist/index.d.ts",
24
- "svelte": "./dist/index.js"
24
+ "svelte": "./dist/index.js",
25
+ "default": "./dist/index.js"
25
26
  }
26
27
  },
27
28
  "author": "Steve S. Samson <stevee.samson@gmail.com> (http://github.com/steveesamson)",
@@ -57,6 +58,7 @@
57
58
  "typescript": "^5.0.0",
58
59
  "vite": "^5.0.3"
59
60
  },
61
+ "default": "./dist/index.js",
60
62
  "svelte": "./dist/index.js",
61
63
  "types": "./dist/index.d.ts",
62
64
  "type": "module",