@chepchik/bind-form 0.2.0 → 0.2.1

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/README.md CHANGED
@@ -168,8 +168,8 @@ const handle = createForm(form, {
168
168
  ## Testing
169
169
 
170
170
  ```sh
171
- npm run test # tsc --noEmit && vitest run
172
- npm run test:coverage # то же самое + отчёт покрытия, порог 100% по lines/branches/functions/statements
171
+ pnpm test # tsc --noEmit && vitest run
172
+ pnpm test:coverage # то же самое + отчёт покрытия, порог 100% по lines/branches/functions/statements
173
173
  ```
174
174
 
175
175
  Любой вклад в пакет должен сохранять 100% покрытие (`vitest.config.ts`,
package/dist/index.js CHANGED
@@ -162,8 +162,9 @@ function c(e, c) {
162
162
  let n = e.target;
163
163
  if (!(n instanceof HTMLElement)) return;
164
164
  let r = n.getAttribute("name");
165
- !r || !d.includes(r) || (g[r] = !0, (async () => {
166
- A(r, await t(p(r), x(r), C(r), w(), S(r))), M();
165
+ r && d.includes(r) && (g[r] = !0, (async () => {
166
+ let e = await t(p(r), x(r), C(r), w(), S(r));
167
+ A(r, e), M();
167
168
  })());
168
169
  };
169
170
  e.addEventListener("submit", L), c.validateOn && e.addEventListener(c.validateOn, R, !0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chepchik/bind-form",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Dependency-free typed form engine: createForm() with types inferred from schema, sync/async/server validation pipeline, automatic server error mapping and built-in accessibility (aria-invalid, focus management). Also exports the original bindForm() helper.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export declare function createForm(html: string): HTMLFormElement;
2
- export declare function submit(form: HTMLFormElement): void;
3
- export declare function flush(times?: number): Promise<void>;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
File without changes
File without changes
File without changes
File without changes
File without changes