@steveesamson/microform 0.0.5 → 0.0.7

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.
@@ -1,6 +1,4 @@
1
1
  /// <reference types="svelte" />
2
2
  import { type Writable } from "svelte/store";
3
- import type { ActionOptions, FormErrors, FormOptions, FormValues, Params } from "./types.js";
4
- export declare const formAction: (values: FormValues, errors: FormErrors, unfits: Writable<Params>, isdirty: Writable<boolean>, options: FormOptions, validationMap: Params) => (node: HTMLElement, eventProps?: ActionOptions) => {
5
- destroy(): void;
6
- };
3
+ import type { ActionOptions, FormErrors, FormOptions, FormValues, FormReturn, Params } from "./types.js";
4
+ export declare const formAction: (values: FormValues, errors: FormErrors, unfits: Writable<Params>, isdirty: Writable<boolean>, options: FormOptions, validationMap: Params) => (node: HTMLElement, eventProps?: ActionOptions) => FormReturn;
package/dist/types.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /// <reference types="svelte" />
2
2
  import { type Writable, type Readable } from "svelte/store";
3
3
  import type { Params } from "./internal.js";
4
+ export type { Params };
4
5
  export type FieldTypes = "Standard" | "Popover" | "Checkable";
5
6
  export type InputTypes = 'text' | 'number' | 'color' | 'time' | 'date' | 'range' | 'email' | 'hidden' | 'password' | 'tel' | 'url';
6
7
  export type FieldType = HTMLSelectElement | HTMLInputElement | HTMLTextAreaElement;
@@ -11,6 +12,9 @@ export interface ValidateArgs {
11
12
  validations: string;
12
13
  node?: HTMLElement;
13
14
  }
15
+ export type FormReturn = {
16
+ destroy: () => void;
17
+ };
14
18
  export type ValidateEvent = 'input' | 'change' | 'keyup' | 'blur';
15
19
  export type FormValues = Writable<Params>;
16
20
  export type FormErrors = Writable<Params>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steveesamson/microform",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "postbuild": "touch ./docs/.nojekyll",