@reformer/core 11.0.0-beta.5 → 11.0.0-beta.6

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.js CHANGED
@@ -1,14 +1,14 @@
1
- import { c as ee } from "./create-model-Dxh9cfLp.js";
2
- import { e as Ke } from "./create-model-Dxh9cfLp.js";
3
- import { a as G } from "./model-signals-proxy-mV3WGdlO.js";
4
- import { i as ze, m as Ye, u as Je } from "./model-signals-proxy-mV3WGdlO.js";
5
- import { c as Xe, a as Ze, r as et, b as tt, d as st, e as rt, f as it, s as nt, t as at, w as ot } from "./behaviors-value-C7dSEhCc.js";
6
- import { signal as g, computed as m, effect as _, batch as te, Signal as j } from "@preact/signals-core";
7
- import { r as se } from "./signal-node-registry-tiwel-TV.js";
8
- import { g as ut } from "./signal-node-registry-tiwel-TV.js";
9
- import { f as re, h as D, g as ie, d as ne } from "./strategy-DA3JwxsR.js";
10
- import { d as ct, e as ht } from "./node-DGEFMTQu.js";
11
- import z, { useRef as k, useCallback as E, useMemo as ae, useEffect as Y, useState as oe } from "react";
1
+ import { c as te } from "./create-model-Dxh9cfLp.js";
2
+ import { e as tt } from "./create-model-Dxh9cfLp.js";
3
+ import { a as B } from "./model-signals-proxy-mV3WGdlO.js";
4
+ import { i as rt, m as it, u as nt } from "./model-signals-proxy-mV3WGdlO.js";
5
+ import { c as ot, a as lt, r as ut, b as dt, d as ct, e as ht, f as ft, s as vt, t as mt, w as pt } from "./behaviors-value-C7dSEhCc.js";
6
+ import { signal as g, computed as m, effect as _, batch as se, Signal as G } from "@preact/signals-core";
7
+ import { r as re } from "./signal-node-registry-tiwel-TV.js";
8
+ import { g as gt } from "./signal-node-registry-tiwel-TV.js";
9
+ import { f as ie, h as D, g as ne, d as ae } from "./strategy-DA3JwxsR.js";
10
+ import { d as Et, e as _t } from "./node-DGEFMTQu.js";
11
+ import Y, { useRef as A, useCallback as E, useMemo as oe, useEffect as J, useState as le, useImperativeHandle as ue } from "react";
12
12
  class M {
13
13
  // ============================================================================
14
14
  // Protected состояние (для Template Method паттерна)
@@ -90,8 +90,8 @@ class M {
90
90
  * ```
91
91
  */
92
92
  getErrors(e) {
93
- const t = this.errors.value;
94
- return e ? t.filter((r) => {
93
+ const s = this.errors.value;
94
+ return e ? s.filter((r) => {
95
95
  if (e.code !== void 0 && !(Array.isArray(e.code) ? e.code : [e.code]).includes(r.code) || e.message !== void 0 && !r.message.toLowerCase().includes(e.message.toLowerCase()))
96
96
  return !1;
97
97
  if (e.params !== void 0) {
@@ -102,7 +102,7 @@ class M {
102
102
  return !1;
103
103
  }
104
104
  return !(e.predicate !== void 0 && !e.predicate(r));
105
- }) : t;
105
+ }) : s;
106
106
  }
107
107
  // ============================================================================
108
108
  // Методы управления состоянием (Template Method)
@@ -274,7 +274,7 @@ class M {
274
274
  onEnable() {
275
275
  }
276
276
  }
277
- class L {
277
+ class R {
278
278
  /**
279
279
  * Хранилище подписок
280
280
  * Ключ: уникальный идентификатор подписки
@@ -309,8 +309,8 @@ class L {
309
309
  * manager.remove('anotherSub');
310
310
  * ```
311
311
  */
312
- add(e, t) {
313
- return this.subscriptions.has(e) && (process.env.NODE_ENV !== "production" && console.warn(`[SubscriptionManager] Subscription "${e}" already exists, replacing`), this.subscriptions.get(e)?.()), this.subscriptions.set(e, t), () => this.remove(e);
312
+ add(e, s) {
313
+ return this.subscriptions.has(e) && (process.env.NODE_ENV !== "production" && console.warn(`[SubscriptionManager] Subscription "${e}" already exists, replacing`), this.subscriptions.get(e)?.()), this.subscriptions.set(e, s), () => this.remove(e);
314
314
  }
315
315
  /**
316
316
  * Удаляет подписку по ключу
@@ -334,8 +334,8 @@ class L {
334
334
  * ```
335
335
  */
336
336
  remove(e) {
337
- const t = this.subscriptions.get(e);
338
- return t ? (t(), this.subscriptions.delete(e), !0) : !1;
337
+ const s = this.subscriptions.get(e);
338
+ return s ? (s(), this.subscriptions.delete(e), !0) : !1;
339
339
  }
340
340
  /**
341
341
  * Очищает все подписки
@@ -442,7 +442,7 @@ class L {
442
442
  this.clear();
443
443
  }
444
444
  }
445
- const O = {
445
+ const F = {
446
446
  /** FieldNode.watch() */
447
447
  Watch: "watch",
448
448
  /** FieldNode.computeFrom() */
@@ -452,15 +452,15 @@ const O = {
452
452
  /** GroupNode.watchField() */
453
453
  WatchField: "watchField"
454
454
  };
455
- let le = 0;
456
- function N(s) {
457
- return `${s}-${++le}`;
455
+ let de = 0;
456
+ function O(t) {
457
+ return `${t}-${++de}`;
458
458
  }
459
- var S = /* @__PURE__ */ ((s) => (s.THROW = "throw", s.LOG = "log", s.CONVERT = "convert", s))(S || {});
460
- class V {
461
- static handle(e, t, r = "throw") {
459
+ var S = /* @__PURE__ */ ((t) => (t.THROW = "throw", t.LOG = "log", t.CONVERT = "convert", t))(S || {});
460
+ class k {
461
+ static handle(e, s, r = "throw") {
462
462
  const i = this.extractMessage(e);
463
- switch (process.env.NODE_ENV !== "production" && console.error(`[${t}]`, e), r) {
463
+ switch (process.env.NODE_ENV !== "production" && console.error(`[${s}]`, e), r) {
464
464
  case "throw":
465
465
  throw e;
466
466
  case "log":
@@ -469,7 +469,7 @@ class V {
469
469
  return {
470
470
  code: "validator_error",
471
471
  message: i,
472
- params: { field: t }
472
+ params: { field: s }
473
473
  };
474
474
  }
475
475
  }
@@ -524,10 +524,10 @@ class V {
524
524
  * // { code: 'required', message: 'This field is required', field: 'email' }
525
525
  * ```
526
526
  */
527
- static createValidationError(e, t, r) {
527
+ static createValidationError(e, s, r) {
528
528
  return {
529
529
  code: e,
530
- message: t,
530
+ message: s,
531
531
  params: r ? { field: r } : void 0
532
532
  };
533
533
  }
@@ -550,7 +550,7 @@ class V {
550
550
  return typeof e == "object" && e !== null && "code" in e && "message" in e && typeof e.code == "string" && typeof e.message == "string";
551
551
  }
552
552
  }
553
- class ue {
553
+ class ce {
554
554
  /** Внутренний сигнал статуса */
555
555
  _status;
556
556
  /** Публичный read-only сигнал статуса */
@@ -650,7 +650,7 @@ class ue {
650
650
  this._status.value = e ? "invalid" : "valid";
651
651
  }
652
652
  }
653
- class de extends M {
653
+ class he extends M {
654
654
  // ============================================================================
655
655
  // Приватные сигналы
656
656
  // ============================================================================
@@ -702,13 +702,13 @@ class de extends M {
702
702
  * Менеджер подписок для централизованного cleanup
703
703
  * Использует SubscriptionManager вместо массива для управления подписками
704
704
  */
705
- disposers = new L();
705
+ disposers = new R();
706
706
  component;
707
707
  // ============================================================================
708
708
  // Конструктор
709
709
  // ============================================================================
710
710
  constructor(e) {
711
- super(), this.validators = e.validators || [], this.asyncValidators = e.asyncValidators || [], this.updateOn = e.updateOn || "blur", this.debounceMs = e.debounce || 0, this.component = e.component, this._value = e.valueSignal ?? g(e.value), this.initialValue = this._value.peek(), this._errors = g([]), this._componentProps = g(e.componentProps || {}), this.statusMachine = new ue(e.disabled ? "disabled" : "valid"), this.value = m(() => this._value.value), this.valid = m(() => this.statusMachine.valid.value), this.invalid = m(() => this.statusMachine.invalid.value), this.pending = m(() => this.statusMachine.pending.value), this.status = m(() => this.statusMachine.status.value), this.disabled = m(() => this.statusMachine.disabled.value), this.errors = m(() => this._errors.value), this.componentProps = m(() => this._componentProps.value), this.shouldShowError = m(
711
+ super(), this.validators = e.validators || [], this.asyncValidators = e.asyncValidators || [], this.updateOn = e.updateOn || "blur", this.debounceMs = e.debounce || 0, this.component = e.component, this._value = e.valueSignal ?? g(e.value), this.initialValue = this._value.peek(), this._errors = g([]), this._componentProps = g(e.componentProps || {}), this.statusMachine = new ce(e.disabled ? "disabled" : "valid"), this.value = m(() => this._value.value), this.valid = m(() => this.statusMachine.valid.value), this.invalid = m(() => this.statusMachine.invalid.value), this.pending = m(() => this.statusMachine.pending.value), this.status = m(() => this.statusMachine.status.value), this.disabled = m(() => this.statusMachine.disabled.value), this.errors = m(() => this._errors.value), this.componentProps = m(() => this._componentProps.value), this.shouldShowError = m(
712
712
  () => this.statusMachine.invalid.value && (this._touched.value || this._dirty.value)
713
713
  );
714
714
  }
@@ -718,8 +718,8 @@ class de extends M {
718
718
  getValue() {
719
719
  return this._value.peek();
720
720
  }
721
- setValue(e, t) {
722
- if (this._value.value = e, this._dirty.value = !0, t?.emitEvent === !1)
721
+ setValue(e, s) {
722
+ if (this._value.value = e, this._dirty.value = !0, s?.emitEvent === !1)
723
723
  return;
724
724
  const r = this.validators.length > 0 || this.asyncValidators.length > 0, i = this._errors.value.length > 0;
725
725
  if (this.updateOn === "change") {
@@ -772,7 +772,7 @@ class de extends M {
772
772
  *
773
773
  * @example
774
774
  * ```typescript
775
- * const field = new FieldNode({ value: 'initial', component: InputField });
775
+ * const field = new FieldNode({ value: 'initial', component: Input });
776
776
  *
777
777
  * field.setValue('changed');
778
778
  * field.reset('temp value');
@@ -816,8 +816,8 @@ class de extends M {
816
816
  * ```
817
817
  */
818
818
  async validate(e) {
819
- const t = e?.debounce ?? this.debounceMs;
820
- if (this.cancelPendingValidation(), t <= 0 || this.asyncValidators.length === 0)
819
+ const s = e?.debounce ?? this.debounceMs;
820
+ if (this.cancelPendingValidation(), s <= 0 || this.asyncValidators.length === 0)
821
821
  return this.validateImmediate();
822
822
  const r = new AbortController();
823
823
  return new Promise((i) => {
@@ -829,7 +829,7 @@ class de extends M {
829
829
  this.pendingValidation = void 0;
830
830
  const n = await this.validateImmediate(r);
831
831
  i(n);
832
- }, t), r.signal.addEventListener(
832
+ }, s), r.signal.addEventListener(
833
833
  "abort",
834
834
  () => {
835
835
  this.validateDebounceTimer && (clearTimeout(this.validateDebounceTimer), this.validateDebounceTimer = void 0), i(!1);
@@ -849,9 +849,9 @@ class de extends M {
849
849
  * - Проверяет signal.aborted в ключевых точках
850
850
  */
851
851
  async validateImmediate(e) {
852
- const t = e ?? new AbortController();
853
- e || this.currentAbortController?.abort(), this.currentAbortController = t;
854
- const { signal: r } = t, i = [];
852
+ const s = e ?? new AbortController();
853
+ e || this.currentAbortController?.abort(), this.currentAbortController = s;
854
+ const { signal: r } = s, i = [];
855
855
  for (const a of this.validators) {
856
856
  const l = a(this._value.value);
857
857
  l && i.push(l);
@@ -881,7 +881,7 @@ class de extends M {
881
881
  } catch (u) {
882
882
  if (u instanceof DOMException && u.name === "AbortError")
883
883
  throw u;
884
- return V.handle(
884
+ return k.handle(
885
885
  u,
886
886
  "FieldNode AsyncValidator",
887
887
  S.CONVERT
@@ -908,8 +908,8 @@ class de extends M {
908
908
  }
909
909
  setErrors(e) {
910
910
  this._errors.value = e;
911
- const t = e.some((r) => r.severity !== "warning");
912
- this.statusMachine.setErrors(t);
911
+ const s = e.some((r) => r.severity !== "warning");
912
+ this.statusMachine.setErrors(s);
913
913
  }
914
914
  clearErrors() {
915
915
  this._errors.value = [], this.statusMachine.setErrors(!1);
@@ -972,7 +972,7 @@ class de extends M {
972
972
  * const form = createForm({
973
973
  * email: {
974
974
  * value: '',
975
- * component: InputField,
975
+ * component: Input,
976
976
  * updateOn: 'submit', // Изначально валидация только при submit
977
977
  * validators: [required, email],
978
978
  * },
@@ -1027,12 +1027,12 @@ class de extends M {
1027
1027
  * ```
1028
1028
  */
1029
1029
  watch(e) {
1030
- const t = new AbortController(), r = _(() => {
1030
+ const s = new AbortController(), r = _(() => {
1031
1031
  const n = this.value.value;
1032
- e(n, t.signal);
1033
- }), i = N(O.Watch);
1032
+ e(n, s.signal);
1033
+ }), i = O(F.Watch);
1034
1034
  return this.disposers.add(i, () => {
1035
- t.abort(), r();
1035
+ s.abort(), r();
1036
1036
  });
1037
1037
  }
1038
1038
  /**
@@ -1057,11 +1057,11 @@ class de extends M {
1057
1057
  * useEffect(() => dispose, []);
1058
1058
  * ```
1059
1059
  */
1060
- computeFrom(e, t) {
1060
+ computeFrom(e, s) {
1061
1061
  const r = _(() => {
1062
- const n = e.map((l) => l.value), a = t(...n);
1062
+ const n = e.map((l) => l.value), a = s(...n);
1063
1063
  this.setValue(a, { emitEvent: !1 });
1064
- }), i = N(O.ComputeFrom);
1064
+ }), i = O(F.ComputeFrom);
1065
1065
  return this.disposers.add(i, r);
1066
1066
  }
1067
1067
  /**
@@ -1092,9 +1092,9 @@ class de extends M {
1092
1092
  }
1093
1093
  }
1094
1094
  }
1095
- function R(s) {
1096
- const { getChildren: e, ownErrors: t, disabled: r } = s, i = m(() => t.value.length > 0 ? !1 : e().every((o) => o.disabled.value || o.valid.value)), n = m(() => !i.value), a = m(() => e().some((o) => o.pending.value)), l = m(() => e().some((o) => o.touched.value)), d = m(() => e().some((o) => o.dirty.value)), u = m(() => {
1097
- const o = [...t.value];
1095
+ function L(t) {
1096
+ const { getChildren: e, ownErrors: s, disabled: r } = t, i = m(() => s.value.length > 0 ? !1 : e().every((o) => o.disabled.value || o.valid.value)), n = m(() => !i.value), a = m(() => e().some((o) => o.pending.value)), l = m(() => e().some((o) => o.touched.value)), d = m(() => e().some((o) => o.dirty.value)), u = m(() => {
1097
+ const o = [...s.value];
1098
1098
  for (const f of e())
1099
1099
  o.push(...f.errors.value);
1100
1100
  return o;
@@ -1109,22 +1109,22 @@ function R(s) {
1109
1109
  status: h
1110
1110
  };
1111
1111
  }
1112
- function B(s) {
1113
- return typeof s == "object" && s !== null && "getProxy" in s && typeof s.getProxy == "function";
1112
+ function j(t) {
1113
+ return typeof t == "object" && t !== null && "getProxy" in t && typeof t.getProxy == "function";
1114
1114
  }
1115
1115
  const U = "$";
1116
- function ce(s, e) {
1117
- let t;
1116
+ function fe(t, e) {
1117
+ let s;
1118
1118
  const r = () => {
1119
- if (!t) {
1119
+ if (!s) {
1120
1120
  const i = {};
1121
1121
  e.forEach((n, a) => {
1122
- i[a] = n && B(n) ? n.getProxy() : n;
1123
- }), t = i;
1122
+ i[a] = n && j(n) ? n.getProxy() : n;
1123
+ }), s = i;
1124
1124
  }
1125
- return t;
1125
+ return s;
1126
1126
  };
1127
- return new Proxy(s, {
1127
+ return new Proxy(t, {
1128
1128
  get: (i, n) => {
1129
1129
  if (n === U)
1130
1130
  return r();
@@ -1132,7 +1132,7 @@ function ce(s, e) {
1132
1132
  return i[n];
1133
1133
  if (typeof n == "string" && e.has(n)) {
1134
1134
  const a = e.get(n);
1135
- return a && B(a) ? a.getProxy() : a;
1135
+ return a && j(a) ? a.getProxy() : a;
1136
1136
  }
1137
1137
  },
1138
1138
  set: (i, n, a) => typeof n == "string" && e.has(n) ? !1 : (i[n] = a, !0),
@@ -1144,7 +1144,7 @@ function ce(s, e) {
1144
1144
  getOwnPropertyDescriptor: (i, n) => typeof n == "string" && e.has(n) ? { enumerable: !0, configurable: !0 } : Reflect.getOwnPropertyDescriptor(i, n)
1145
1145
  });
1146
1146
  }
1147
- class he {
1147
+ class ve {
1148
1148
  /**
1149
1149
  * @param form - Форма для отправки
1150
1150
  */
@@ -1188,8 +1188,8 @@ class he {
1188
1188
  * }
1189
1189
  * ```
1190
1190
  */
1191
- async submit(e, t) {
1192
- const { skipValidation: r = !1, skipTouch: i = !1 } = t || {};
1191
+ async submit(e, s) {
1192
+ const { skipValidation: r = !1, skipTouch: i = !1 } = s || {};
1193
1193
  if (i || this.form.markAsTouched(), !r && !await this.form.validate())
1194
1194
  return null;
1195
1195
  this._submitting.value = !0;
@@ -1223,8 +1223,8 @@ class he {
1223
1223
  * }
1224
1224
  * ```
1225
1225
  */
1226
- async submitWithResult(e, t) {
1227
- const { skipValidation: r = !1, skipTouch: i = !1 } = t || {};
1226
+ async submitWithResult(e, s) {
1227
+ const { skipValidation: r = !1, skipTouch: i = !1 } = s || {};
1228
1228
  if (i || this.form.markAsTouched(), !r && !await this.form.validate())
1229
1229
  return { success: !1, data: null };
1230
1230
  this._submitting.value = !0;
@@ -1241,16 +1241,16 @@ class he {
1241
1241
  }
1242
1242
  }
1243
1243
  }
1244
- function fe(s) {
1244
+ function me(t) {
1245
1245
  const e = [];
1246
- for (const t of s.split(".")) {
1247
- const r = /^([^[\]]+)(?:\[(\d+)\])?$/.exec(t);
1246
+ for (const s of t.split(".")) {
1247
+ const r = /^([^[\]]+)(?:\[(\d+)\])?$/.exec(s);
1248
1248
  if (!r) return [];
1249
1249
  e.push(r[2] !== void 0 ? { key: r[1], index: Number(r[2]) } : { key: r[1] });
1250
1250
  }
1251
1251
  return e;
1252
1252
  }
1253
- class A extends M {
1253
+ class w extends M {
1254
1254
  // ============================================================================
1255
1255
  // Приватные поля
1256
1256
  // ============================================================================
@@ -1263,7 +1263,7 @@ class A extends M {
1263
1263
  /**
1264
1264
  * Менеджер подписок для централизованного cleanup
1265
1265
  */
1266
- disposers = new L();
1266
+ disposers = new R();
1267
1267
  /**
1268
1268
  * Ссылка на Proxy-инстанс
1269
1269
  */
@@ -1275,7 +1275,7 @@ class A extends M {
1275
1275
  /**
1276
1276
  * Фабрика для создания узлов формы
1277
1277
  */
1278
- nodeFactory = new ve();
1278
+ nodeFactory = new pe();
1279
1279
  // ============================================================================
1280
1280
  // Приватные сигналы состояния (inline из StateManager)
1281
1281
  // ============================================================================
@@ -1306,8 +1306,8 @@ class A extends M {
1306
1306
  status;
1307
1307
  submitting;
1308
1308
  constructor(e) {
1309
- super(), this.formSubmitter = new he(this);
1310
- const t = e.form, r = t != null && typeof t == "object" && ("valueSignal" in t || "value" in t), n = "form" in e && !r ? e.form : e;
1309
+ super(), this.formSubmitter = new ve(this);
1310
+ const s = e.form, r = s != null && typeof s == "object" && ("valueSignal" in s || "value" in s), n = "form" in e && !r ? e.form : e;
1311
1311
  for (const [l, d] of Object.entries(n)) {
1312
1312
  const u = this.createNode(d);
1313
1313
  this._fields.set(l, u);
@@ -1318,7 +1318,7 @@ class A extends M {
1318
1318
  l[u] = d.value.value;
1319
1319
  }), l;
1320
1320
  });
1321
- const a = R({
1321
+ const a = L({
1322
1322
  getChildren: () => Array.from(this._fields.values()),
1323
1323
  ownErrors: this._formErrors,
1324
1324
  disabled: this._disabled
@@ -1333,34 +1333,34 @@ class A extends M {
1333
1333
  * @see buildFormProxy
1334
1334
  */
1335
1335
  buildProxy() {
1336
- return ce(this, this._fields);
1336
+ return fe(this, this._fields);
1337
1337
  }
1338
1338
  // ============================================================================
1339
1339
  // Реализация абстрактных методов FormNode
1340
1340
  // ============================================================================
1341
1341
  getValue() {
1342
1342
  const e = {};
1343
- return this._fields.forEach((t, r) => {
1344
- e[r] = t.getValue();
1343
+ return this._fields.forEach((s, r) => {
1344
+ e[r] = s.getValue();
1345
1345
  }), e;
1346
1346
  }
1347
- setValue(e, t) {
1347
+ setValue(e, s) {
1348
1348
  for (const [r, i] of Object.entries(e)) {
1349
1349
  const n = this._fields.get(r);
1350
1350
  if (n) {
1351
1351
  const a = this._fieldSignals.get(n) ?? n.value;
1352
- if (G(a)) continue;
1353
- n.setValue(i, t);
1352
+ if (B(a)) continue;
1353
+ n.setValue(i, s);
1354
1354
  }
1355
1355
  }
1356
1356
  }
1357
1357
  patchValue(e) {
1358
- te(() => {
1359
- for (const [t, r] of Object.entries(e)) {
1360
- const i = this._fields.get(t);
1358
+ se(() => {
1359
+ for (const [s, r] of Object.entries(e)) {
1360
+ const i = this._fields.get(s);
1361
1361
  if (i && r !== void 0) {
1362
1362
  const n = this._fieldSignals.get(i) ?? i.value;
1363
- if (G(n)) continue;
1363
+ if (B(n)) continue;
1364
1364
  i.setValue(r, { emitEvent: !1 });
1365
1365
  }
1366
1366
  }
@@ -1384,9 +1384,9 @@ class A extends M {
1384
1384
  * ```
1385
1385
  */
1386
1386
  reset(e) {
1387
- this._formErrors.value = [], this._fields.forEach((t, r) => {
1387
+ this._formErrors.value = [], this._fields.forEach((s, r) => {
1388
1388
  const i = e?.[r];
1389
- t.reset(i);
1389
+ s.reset(i);
1390
1390
  });
1391
1391
  }
1392
1392
  /**
@@ -1398,8 +1398,8 @@ class A extends M {
1398
1398
  });
1399
1399
  }
1400
1400
  async validate() {
1401
- return this.clearErrors(), await Promise.all(Array.from(this._fields.values()).map((t) => t.validate())), Array.from(this._fields.values()).every(
1402
- (t) => t.valid.value || t.disabled.value
1401
+ return this.clearErrors(), await Promise.all(Array.from(this._fields.values()).map((s) => s.validate())), Array.from(this._fields.values()).every(
1402
+ (s) => s.valid.value || s.disabled.value
1403
1403
  );
1404
1404
  }
1405
1405
  /**
@@ -1438,8 +1438,8 @@ class A extends M {
1438
1438
  * @example
1439
1439
  * ```typescript
1440
1440
  * const form = new GroupNode({
1441
- * email: { value: '', component: InputField },
1442
- * name: { value: '', component: InputField },
1441
+ * email: { value: '', component: Input },
1442
+ * name: { value: '', component: Input },
1443
1443
  * });
1444
1444
  *
1445
1445
  * const proxy = form.getProxy();
@@ -1485,8 +1485,8 @@ class A extends M {
1485
1485
  * `onSubmit` (или void-обработчик). Если вызывающей стороне нужно различать эти случаи —
1486
1486
  * используйте {@link submitWithResult}, который возвращает явный флаг `success`.
1487
1487
  */
1488
- async submit(e, t) {
1489
- return this.formSubmitter.submit(e, t);
1488
+ async submit(e, s) {
1489
+ return this.formSubmitter.submit(e, s);
1490
1490
  }
1491
1491
  /**
1492
1492
  * Отправить форму с расширенным результатом
@@ -1495,8 +1495,8 @@ class A extends M {
1495
1495
  * @param options - Опции submit
1496
1496
  * @returns Объект SubmitResult с данными, статусом и возможной ошибкой
1497
1497
  */
1498
- async submitWithResult(e, t) {
1499
- return this.formSubmitter.submitWithResult(e, t);
1498
+ async submitWithResult(e, s) {
1499
+ return this.formSubmitter.submitWithResult(e, s);
1500
1500
  }
1501
1501
  /**
1502
1502
  * Получить вложенное поле по пути
@@ -1513,11 +1513,11 @@ class A extends M {
1513
1513
  * @example
1514
1514
  * ```typescript
1515
1515
  * const form = new GroupNode({
1516
- * email: { value: '', component: InputField },
1516
+ * email: { value: '', component: Input },
1517
1517
  * address: {
1518
- * city: { value: '', component: InputField }
1518
+ * city: { value: '', component: Input }
1519
1519
  * },
1520
- * items: [{ name: { value: '', component: InputField } }]
1520
+ * items: [{ name: { value: '', component: Input } }]
1521
1521
  * });
1522
1522
  *
1523
1523
  * form.getFieldByPath('email'); // FieldNode
@@ -1530,12 +1530,12 @@ class A extends M {
1530
1530
  getFieldByPath(e) {
1531
1531
  if (e.startsWith(".") || e.endsWith("."))
1532
1532
  return;
1533
- const t = fe(e);
1534
- if (t.length === 0)
1533
+ const s = me(e);
1534
+ if (s.length === 0)
1535
1535
  return;
1536
1536
  let r = this;
1537
- for (const i of t) {
1538
- if (!(r instanceof A) || (r = r.getField(i.key), !r)) return;
1537
+ for (const i of s) {
1538
+ if (!(r instanceof w) || (r = r.getField(i.key), !r)) return;
1539
1539
  if (i.index !== void 0)
1540
1540
  if ("at" in r && "length" in r && typeof r.at == "function") {
1541
1541
  const n = r.at(i.index);
@@ -1573,16 +1573,16 @@ class A extends M {
1573
1573
  /**
1574
1574
  * Связывает два поля: при изменении source автоматически обновляется target
1575
1575
  */
1576
- linkFields(e, t, r) {
1577
- const i = this._fields.get(e), n = this._fields.get(t);
1576
+ linkFields(e, s, r) {
1577
+ const i = this._fields.get(e), n = this._fields.get(s);
1578
1578
  if (!i || !n) {
1579
- const d = i ? t : e;
1579
+ const d = i ? s : e;
1580
1580
  throw new Error(`GroupNode.linkFields: field "${String(d)}" not found`);
1581
1581
  }
1582
1582
  const a = _(() => {
1583
1583
  const d = i.value.value, u = r ? r(d) : d;
1584
1584
  n.setValue(u, { emitEvent: !1 });
1585
- }), l = N(O.LinkFields);
1585
+ }), l = O(F.LinkFields);
1586
1586
  return this.disposers.add(l, a);
1587
1587
  }
1588
1588
  /**
@@ -1613,26 +1613,26 @@ class A extends M {
1613
1613
  * ```
1614
1614
  */
1615
1615
  /** Подписка на top-level поле — value типизирован как `T[K]`. */
1616
- watchField(e, t) {
1616
+ watchField(e, s) {
1617
1617
  const r = this.getFieldByPath(e);
1618
1618
  if (!r)
1619
1619
  throw new Error(`GroupNode.watchField: field "${e}" not found`);
1620
1620
  const i = _(() => {
1621
- t(r.value.value);
1622
- }), n = N(O.WatchField);
1621
+ s(r.value.value);
1622
+ }), n = O(F.WatchField);
1623
1623
  return this.disposers.add(n, i);
1624
1624
  }
1625
1625
  /**
1626
1626
  * Подписка на вложенное поле по строковому пути ("address.city").
1627
1627
  * Путь нельзя выразить в типах узла → value честно `unknown`, потребитель сужает.
1628
1628
  */
1629
- watchFieldByPath(e, t) {
1629
+ watchFieldByPath(e, s) {
1630
1630
  const r = this.getFieldByPath(e);
1631
1631
  if (!r)
1632
1632
  throw new Error(`GroupNode.watchFieldByPath: field "${e}" not found`);
1633
1633
  const i = _(() => {
1634
- t(r.value.value);
1635
- }), n = N(O.WatchField);
1634
+ s(r.value.value);
1635
+ }), n = O(F.WatchField);
1636
1636
  return this.disposers.add(n, i);
1637
1637
  }
1638
1638
  /**
@@ -1660,8 +1660,8 @@ class A extends M {
1660
1660
  * @internal
1661
1661
  */
1662
1662
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1663
- registerFieldSignal(e, t) {
1664
- this._fieldSignals.set(e, t);
1663
+ registerFieldSignal(e, s) {
1664
+ this._fieldSignals.set(e, s);
1665
1665
  }
1666
1666
  /**
1667
1667
  * Очистить все ресурсы узла
@@ -1683,7 +1683,7 @@ class W extends M {
1683
1683
  * Менеджер подписок для централизованного cleanup
1684
1684
  * Использует SubscriptionManager вместо массива для управления подписками
1685
1685
  */
1686
- disposers = new L();
1686
+ disposers = new R();
1687
1687
  /** Array-level validation errors (e.g., "минимум 1 элемент") */
1688
1688
  _arrayErrors = g([]);
1689
1689
  // ============================================================================
@@ -1701,12 +1701,12 @@ class W extends M {
1701
1701
  // ============================================================================
1702
1702
  // Конструктор
1703
1703
  // ============================================================================
1704
- constructor(e, t = []) {
1705
- super(), this.itemSchema = e, this.initialItems = t, this.items = g([]);
1706
- for (const i of t)
1704
+ constructor(e, s = []) {
1705
+ super(), this.itemSchema = e, this.initialItems = s, this.items = g([]);
1706
+ for (const i of s)
1707
1707
  this.push(i);
1708
1708
  this.length = m(() => this.items.value.length), this.value = m(() => this.items.value.map((i) => i.value.value));
1709
- const r = R({
1709
+ const r = L({
1710
1710
  getChildren: () => this.items.value,
1711
1711
  ownErrors: this._arrayErrors
1712
1712
  });
@@ -1720,8 +1720,8 @@ class W extends M {
1720
1720
  * @param initialValue - Начальные значения для нового элемента
1721
1721
  */
1722
1722
  push(e) {
1723
- const t = this.createItem(e);
1724
- this.items.value = [...this.items.value, t];
1723
+ const s = this.createItem(e);
1724
+ this.items.value = [...this.items.value, s];
1725
1725
  }
1726
1726
  /**
1727
1727
  * Удалить элемент по индексу
@@ -1732,7 +1732,7 @@ class W extends M {
1732
1732
  */
1733
1733
  removeAt(e) {
1734
1734
  if (e < 0 || e >= this.items.value.length) {
1735
- V.handle(
1735
+ k.handle(
1736
1736
  new Error(
1737
1737
  `ArrayNode.removeAt: index ${e} out of bounds (length: ${this.items.value.length})`
1738
1738
  ),
@@ -1741,17 +1741,17 @@ class W extends M {
1741
1741
  );
1742
1742
  return;
1743
1743
  }
1744
- const t = this.items.value[e];
1745
- this.items.value = this.items.value.filter((r, i) => i !== e), t && "dispose" in t && typeof t.dispose == "function" && t.dispose();
1744
+ const s = this.items.value[e];
1745
+ this.items.value = this.items.value.filter((r, i) => i !== e), s && "dispose" in s && typeof s.dispose == "function" && s.dispose();
1746
1746
  }
1747
1747
  /**
1748
1748
  * Вставить элемент в массив
1749
1749
  * @param index - Индекс для вставки
1750
1750
  * @param initialValue - Начальные значения для нового элемента
1751
1751
  */
1752
- insert(e, t) {
1752
+ insert(e, s) {
1753
1753
  if (e < 0 || e > this.items.value.length) {
1754
- V.handle(
1754
+ k.handle(
1755
1755
  new Error(
1756
1756
  `ArrayNode.insert: index ${e} out of bounds (length: ${this.items.value.length})`
1757
1757
  ),
@@ -1760,7 +1760,7 @@ class W extends M {
1760
1760
  );
1761
1761
  return;
1762
1762
  }
1763
- const r = this.createItem(t), i = [...this.items.value];
1763
+ const r = this.createItem(s), i = [...this.items.value];
1764
1764
  i.splice(e, 0, r), this.items.value = i;
1765
1765
  }
1766
1766
  /**
@@ -1779,19 +1779,19 @@ class W extends M {
1779
1779
  * form.items.move(2, 1);
1780
1780
  * ```
1781
1781
  */
1782
- move(e, t) {
1782
+ move(e, s) {
1783
1783
  const r = this.items.value.length;
1784
- if (e < 0 || e >= r || t < 0 || t >= r) {
1785
- V.handle(
1786
- new Error(`ArrayNode.move: index out of bounds (from=${e}, to=${t}, length=${r})`),
1784
+ if (e < 0 || e >= r || s < 0 || s >= r) {
1785
+ k.handle(
1786
+ new Error(`ArrayNode.move: index out of bounds (from=${e}, to=${s}, length=${r})`),
1787
1787
  "ArrayNode.move",
1788
1788
  S.LOG
1789
1789
  );
1790
1790
  return;
1791
1791
  }
1792
- if (e === t) return;
1792
+ if (e === s) return;
1793
1793
  const i = [...this.items.value], [n] = i.splice(e, 1);
1794
- i.splice(t, 0, n), this.items.value = i;
1794
+ i.splice(s, 0, n), this.items.value = i;
1795
1795
  }
1796
1796
  /**
1797
1797
  * Поменять местами два элемента массива
@@ -1807,19 +1807,19 @@ class W extends M {
1807
1807
  * form.items.swap(0, 2);
1808
1808
  * ```
1809
1809
  */
1810
- swap(e, t) {
1810
+ swap(e, s) {
1811
1811
  const r = this.items.value.length;
1812
- if (e < 0 || e >= r || t < 0 || t >= r) {
1813
- V.handle(
1814
- new Error(`ArrayNode.swap: index out of bounds (a=${e}, b=${t}, length=${r})`),
1812
+ if (e < 0 || e >= r || s < 0 || s >= r) {
1813
+ k.handle(
1814
+ new Error(`ArrayNode.swap: index out of bounds (a=${e}, b=${s}, length=${r})`),
1815
1815
  "ArrayNode.swap",
1816
1816
  S.LOG
1817
1817
  );
1818
1818
  return;
1819
1819
  }
1820
- if (e === t) return;
1820
+ if (e === s) return;
1821
1821
  const i = [...this.items.value];
1822
- [i[e], i[t]] = [i[t], i[e]], this.items.value = i;
1822
+ [i[e], i[s]] = [i[s], i[e]], this.items.value = i;
1823
1823
  }
1824
1824
  /**
1825
1825
  * Удалить все элементы массива
@@ -1829,8 +1829,8 @@ class W extends M {
1829
1829
  */
1830
1830
  clear() {
1831
1831
  const e = [...this.items.value];
1832
- this.items.value = [], e.forEach((t) => {
1833
- "dispose" in t && typeof t.dispose == "function" && t.dispose();
1832
+ this.items.value = [], e.forEach((s) => {
1833
+ "dispose" in s && typeof s.dispose == "function" && s.dispose();
1834
1834
  });
1835
1835
  }
1836
1836
  /**
@@ -1839,9 +1839,9 @@ class W extends M {
1839
1839
  * @returns Типизированный GroupNode proxy или undefined если индекс вне границ
1840
1840
  */
1841
1841
  at(e) {
1842
- const t = this.items.value[e];
1843
- if (t)
1844
- return t.getProxy();
1842
+ const s = this.items.value[e];
1843
+ if (s)
1844
+ return s.getProxy();
1845
1845
  }
1846
1846
  // ============================================================================
1847
1847
  // Реализация абстрактных методов
@@ -1849,14 +1849,14 @@ class W extends M {
1849
1849
  getValue() {
1850
1850
  return this.items.value.map((e) => e.getValue());
1851
1851
  }
1852
- setValue(e, t) {
1853
- this.clear(), e.forEach((r) => this.push(r)), t?.emitEvent !== !1 && this.validate().catch((r) => {
1854
- V.handle(r, "ArrayNode.setValue", S.LOG);
1852
+ setValue(e, s) {
1853
+ this.clear(), e.forEach((r) => this.push(r)), s?.emitEvent !== !1 && this.validate().catch((r) => {
1854
+ k.handle(r, "ArrayNode.setValue", S.LOG);
1855
1855
  });
1856
1856
  }
1857
1857
  patchValue(e) {
1858
- e.forEach((t, r) => {
1859
- this.items.value[r] && t !== void 0 && this.items.value[r].patchValue(t);
1858
+ e.forEach((s, r) => {
1859
+ this.items.value[r] && s !== void 0 && this.items.value[r].patchValue(s);
1860
1860
  });
1861
1861
  }
1862
1862
  /**
@@ -1877,7 +1877,7 @@ class W extends M {
1877
1877
  * ```
1878
1878
  */
1879
1879
  reset(e) {
1880
- this._arrayErrors.value = [], this.clear(), e && e.forEach((t) => this.push(t));
1880
+ this._arrayErrors.value = [], this.clear(), e && e.forEach((s) => this.push(s));
1881
1881
  }
1882
1882
  /**
1883
1883
  * Сбросить массив к исходным значениям (initialItems)
@@ -1894,7 +1894,7 @@ class W extends M {
1894
1894
  * @example
1895
1895
  * ```typescript
1896
1896
  * const arrayNode = new ArrayNode(
1897
- * { name: { value: '', component: InputField } },
1897
+ * { name: { value: '', component: Input } },
1898
1898
  * [{ name: 'Initial 1' }, { name: 'Initial 2' }]
1899
1899
  * );
1900
1900
  *
@@ -1911,7 +1911,7 @@ class W extends M {
1911
1911
  this._arrayErrors.value = [], this.clear(), this.initialItems.forEach((e) => this.push(e));
1912
1912
  }
1913
1913
  async validate() {
1914
- return (await Promise.all(this.items.value.map((t) => t.validate()))).every(Boolean) && this._arrayErrors.value.length === 0;
1914
+ return (await Promise.all(this.items.value.map((s) => s.validate()))).every(Boolean) && this._arrayErrors.value.length === 0;
1915
1915
  }
1916
1916
  /**
1917
1917
  * Установить array-level validation errors
@@ -1984,8 +1984,8 @@ class W extends M {
1984
1984
  * @param callback - Функция, вызываемая для каждого элемента с типизированным GroupNode proxy
1985
1985
  */
1986
1986
  forEach(e) {
1987
- this.items.value.forEach((t, r) => {
1988
- const i = t.getProxy();
1987
+ this.items.value.forEach((s, r) => {
1988
+ const i = s.getProxy();
1989
1989
  e(i, r);
1990
1990
  });
1991
1991
  }
@@ -1995,8 +1995,8 @@ class W extends M {
1995
1995
  * @returns Новый массив результатов
1996
1996
  */
1997
1997
  map(e) {
1998
- return this.items.value.map((t, r) => {
1999
- const i = t.getProxy();
1998
+ return this.items.value.map((s, r) => {
1999
+ const i = s.getProxy();
2000
2000
  return e(i, r);
2001
2001
  });
2002
2002
  }
@@ -2009,8 +2009,8 @@ class W extends M {
2009
2009
  */
2010
2010
  createItem(e) {
2011
2011
  if (this.isGroupSchema(this.itemSchema)) {
2012
- const t = new A(this.itemSchema);
2013
- return e && t.patchValue(e), t;
2012
+ const s = new w(this.itemSchema);
2013
+ return e && s.patchValue(e), s;
2014
2014
  }
2015
2015
  throw new Error(
2016
2016
  "ArrayNode поддерживает только GroupNode элементы. Для массива примитивов используйте обычное поле с типом массива."
@@ -2087,7 +2087,7 @@ class W extends M {
2087
2087
  });
2088
2088
  }
2089
2089
  }
2090
- class ve {
2090
+ class pe {
2091
2091
  /**
2092
2092
  * Создает узел формы на основе конфигурации
2093
2093
  *
@@ -2110,25 +2110,25 @@ class ve {
2110
2110
  * // FieldNode
2111
2111
  * const field = factory.createNode({
2112
2112
  * value: 'test@mail.com',
2113
- * component: InputField,
2113
+ * component: Input,
2114
2114
  * validators: [required, email]
2115
2115
  * });
2116
2116
  *
2117
2117
  * // GroupNode
2118
2118
  * const group = factory.createNode({
2119
- * email: { value: '', component: InputField },
2120
- * password: { value: '', component: InputField }
2119
+ * email: { value: '', component: Input },
2120
+ * password: { value: '', component: Input }
2121
2121
  * });
2122
2122
  *
2123
2123
  * // ArrayNode (объект)
2124
2124
  * const array = factory.createNode({
2125
- * schema: { title: { value: '', component: InputField } },
2125
+ * schema: { title: { value: '', component: Input } },
2126
2126
  * initialItems: [{ title: 'Item 1' }]
2127
2127
  * });
2128
2128
  *
2129
2129
  * // ArrayNode (массив) - новый формат
2130
2130
  * const array2 = factory.createNode([
2131
- * { title: { value: '', component: InputField } }, // schema
2131
+ * { title: { value: '', component: Input } }, // schema
2132
2132
  * { title: 'Item 1' }, // initial item 1
2133
2133
  * { title: 'Item 2' } // initial item 2
2134
2134
  * ]);
@@ -2138,14 +2138,14 @@ class ve {
2138
2138
  if (Array.isArray(e) && e.length >= 1)
2139
2139
  return this.createArrayNodeFromArray(e);
2140
2140
  if (this.isFieldConfig(e))
2141
- return new de(e);
2141
+ return new he(e);
2142
2142
  if (this.isArrayConfig(e))
2143
2143
  return new W(
2144
2144
  e.schema,
2145
2145
  e.initialItems
2146
2146
  );
2147
2147
  if (this.isGroupConfig(e))
2148
- return new A(e);
2148
+ return new w(e);
2149
2149
  throw new Error(
2150
2150
  `NodeFactory: Unknown node config. Expected FieldConfig, GroupConfig, or ArrayConfig, but got: ${JSON.stringify(
2151
2151
  e
@@ -2170,7 +2170,7 @@ class ve {
2170
2170
  *
2171
2171
  * // Массив с начальными элементами
2172
2172
  * const array = factory.createArrayNodeFromArray([
2173
- * { title: { value: '', component: InputField } }, // schema
2173
+ * { title: { value: '', component: Input } }, // schema
2174
2174
  * { title: 'Item 1' }, // initial value
2175
2175
  * { title: 'Item 2' } // initial value
2176
2176
  * ]);
@@ -2179,11 +2179,11 @@ class ve {
2179
2179
  */
2180
2180
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2181
2181
  createArrayNodeFromArray(e) {
2182
- const [t, ...r] = e, i = [];
2183
- this.isGroupConfig(t) && i.push(this.extractValues(t));
2182
+ const [s, ...r] = e, i = [];
2183
+ this.isGroupConfig(s) && i.push(this.extractValues(s));
2184
2184
  for (const n of r)
2185
2185
  this.isGroupConfig(n) ? i.push(this.extractValues(n)) : i.push(n);
2186
- return new W(t, i);
2186
+ return new W(s, i);
2187
2187
  }
2188
2188
  /**
2189
2189
  * Извлечь значения из схемы (рекурсивно)
@@ -2191,7 +2191,7 @@ class ve {
2191
2191
  * ✅ НОВОЕ: Извлечено из GroupNode для централизации логики
2192
2192
  *
2193
2193
  * Преобразует схему формы в объект со значениями:
2194
- * - `{ name: { value: 'John', component: InputField } } → { name: 'John' }`
2194
+ * - `{ name: { value: 'John', component: Input } } → { name: 'John' }`
2195
2195
  * - Поддерживает вложенные группы
2196
2196
  * - Поддерживает массивы
2197
2197
  *
@@ -2203,10 +2203,10 @@ class ve {
2203
2203
  * const factory = new NodeFactory();
2204
2204
  *
2205
2205
  * const schema = {
2206
- * name: { value: 'John', component: InputField },
2207
- * age: { value: 30, component: InputField },
2206
+ * name: { value: 'John', component: Input },
2207
+ * age: { value: 30, component: Input },
2208
2208
  * address: {
2209
- * city: { value: 'Moscow', component: InputField }
2209
+ * city: { value: 'Moscow', component: Input }
2210
2210
  * }
2211
2211
  * };
2212
2212
  *
@@ -2218,12 +2218,12 @@ class ve {
2218
2218
  if (this.isFieldConfig(e))
2219
2219
  return e.value;
2220
2220
  if (Array.isArray(e))
2221
- return e.map((t) => this.extractValues(t));
2221
+ return e.map((s) => this.extractValues(s));
2222
2222
  if (this.isGroupConfig(e)) {
2223
- const t = {};
2223
+ const s = {};
2224
2224
  for (const [r, i] of Object.entries(e))
2225
- t[r] = this.extractValues(i);
2226
- return t;
2225
+ s[r] = this.extractValues(i);
2226
+ return s;
2227
2227
  }
2228
2228
  return e;
2229
2229
  }
@@ -2241,7 +2241,7 @@ class ve {
2241
2241
  * ```typescript
2242
2242
  * const factory = new NodeFactory();
2243
2243
  *
2244
- * factory.isFieldConfig({ value: '', component: InputField }); // true
2244
+ * factory.isFieldConfig({ value: '', component: Input }); // true
2245
2245
  * factory.isFieldConfig({ email: { value: '' } }); // false
2246
2246
  * factory.isFieldConfig(null); // false
2247
2247
  * ```
@@ -2266,7 +2266,7 @@ class ve {
2266
2266
  * const factory = new NodeFactory();
2267
2267
  *
2268
2268
  * factory.isArrayConfig({ schema: {}, initialItems: [] }); // true
2269
- * factory.isArrayConfig({ value: '', component: InputField }); // false
2269
+ * factory.isArrayConfig({ value: '', component: Input }); // false
2270
2270
  * factory.isArrayConfig({ email: { value: '' } }); // false
2271
2271
  * ```
2272
2272
  */
@@ -2289,11 +2289,11 @@ class ve {
2289
2289
  * const factory = new NodeFactory();
2290
2290
  *
2291
2291
  * factory.isGroupConfig({
2292
- * email: { value: '', component: InputField },
2293
- * password: { value: '', component: InputField }
2292
+ * email: { value: '', component: Input },
2293
+ * password: { value: '', component: Input }
2294
2294
  * }); // true
2295
2295
  *
2296
- * factory.isGroupConfig({ value: '', component: InputField }); // false
2296
+ * factory.isGroupConfig({ value: '', component: Input }); // false
2297
2297
  * factory.isGroupConfig({ schema: {} }); // false
2298
2298
  * factory.isGroupConfig(null); // false
2299
2299
  * ```
@@ -2302,20 +2302,20 @@ class ve {
2302
2302
  return e != null && typeof e == "object" && !this.isFieldConfig(e) && !this.isArrayConfig(e);
2303
2303
  }
2304
2304
  }
2305
- class me extends M {
2305
+ class ye extends M {
2306
2306
  /**
2307
2307
  * @param control Реактивный массив модели (`model.<path>`).
2308
2308
  * @param buildItem Строитель формы элемента по его под-модели (инъекция, чтобы избежать цикла
2309
2309
  * импорта с `create-form`). Обычно `(item) => createForm({ model: item, schema: itemSchema(item) })`.
2310
2310
  */
2311
- constructor(e, t) {
2312
- super(), this.control = e, this.buildItem = t, this.initial = e.toArray(), this.disposeSync = _(() => {
2311
+ constructor(e, s) {
2312
+ super(), this.control = e, this.buildItem = s, this.initial = e.toArray(), this.disposeSync = _(() => {
2313
2313
  const i = e.length, n = [], a = [];
2314
2314
  for (let u = 0; u < i; u++) {
2315
2315
  const h = e.at(u);
2316
2316
  if (!h) continue;
2317
2317
  let o = this.cache.get(h);
2318
- o || (o = t(h), this.cache.set(h, o)), n.push(h), a.push(o);
2318
+ o || (o = s(h), this.cache.set(h, o)), n.push(h), a.push(o);
2319
2319
  }
2320
2320
  const l = new Set(n), d = [];
2321
2321
  for (const u of this.mountedModels) {
@@ -2325,7 +2325,7 @@ class me extends M {
2325
2325
  }
2326
2326
  this.mountedModels = n, this.itemNodes.value = a, d.forEach((u) => this.disposeItemNode(u));
2327
2327
  }), this.length = m(() => this.itemNodes.value.length), this.value = m(() => this.itemNodes.value.map((i) => i.value.value));
2328
- const r = R({
2328
+ const r = L({
2329
2329
  getChildren: () => this.itemNodes.value,
2330
2330
  ownErrors: this._arrayErrors
2331
2331
  });
@@ -2361,17 +2361,17 @@ class me extends M {
2361
2361
  return this.itemNodes.value[e];
2362
2362
  }
2363
2363
  map(e) {
2364
- return this.itemNodes.value.map((t, r) => e(t, r));
2364
+ return this.itemNodes.value.map((s, r) => e(s, r));
2365
2365
  }
2366
2366
  forEach(e) {
2367
- this.itemNodes.value.forEach((t, r) => e(t, r));
2367
+ this.itemNodes.value.forEach((s, r) => e(s, r));
2368
2368
  }
2369
2369
  // ── Мутации (делегируют массиву модели; effect пересоберёт itemNodes) ──────
2370
2370
  push(e) {
2371
2371
  this.control.push(e ?? {});
2372
2372
  }
2373
- insert(e, t) {
2374
- this.control.insertAt(e, t ?? {});
2373
+ insert(e, s) {
2374
+ this.control.insertAt(e, s ?? {});
2375
2375
  }
2376
2376
  removeAt(e) {
2377
2377
  this.control.removeAt(e);
@@ -2380,12 +2380,12 @@ class me extends M {
2380
2380
  * Переместить элемент модель-массива. Делегирует мутацию массиву модели; внутренний `effect`
2381
2381
  * пересоберёт `itemNodes` в новом порядке (per-item формы сохраняются по кешу идентичности).
2382
2382
  */
2383
- move(e, t) {
2384
- this.control.move(e, t);
2383
+ move(e, s) {
2384
+ this.control.move(e, s);
2385
2385
  }
2386
2386
  /** Поменять местами два элемента модель-массива (см. {@link move}). */
2387
- swap(e, t) {
2388
- this.control.swap(e, t);
2387
+ swap(e, s) {
2388
+ this.control.swap(e, s);
2389
2389
  }
2390
2390
  clear() {
2391
2391
  this.control.clear();
@@ -2395,7 +2395,7 @@ class me extends M {
2395
2395
  return this.control.toArray();
2396
2396
  }
2397
2397
  setValue(e) {
2398
- this.control.clear(), (e ?? []).forEach((t) => this.control.push(t));
2398
+ this.control.clear(), (e ?? []).forEach((s) => this.control.push(s));
2399
2399
  }
2400
2400
  patchValue(e) {
2401
2401
  this.setValue(e);
@@ -2409,7 +2409,7 @@ class me extends M {
2409
2409
  async validate() {
2410
2410
  return (await Promise.all(
2411
2411
  this.itemNodes.value.map(
2412
- (t) => t.validate()
2412
+ (s) => s.validate()
2413
2413
  )
2414
2414
  )).every(Boolean) && this._arrayErrors.value.length === 0;
2415
2415
  }
@@ -2464,25 +2464,25 @@ class me extends M {
2464
2464
  this.disposeSync(), this.itemNodes.value.forEach((e) => this.disposeItemNode(e)), this.mountedModels = [];
2465
2465
  }
2466
2466
  }
2467
- const J = (s) => s !== null && typeof s == "object" && !Array.isArray(s) && !(s instanceof Date) && !(typeof Blob < "u" && s instanceof Blob) && !(typeof File < "u" && s instanceof File);
2468
- function I(s, e, t) {
2469
- if (s == null || typeof s != "object" || s instanceof j) return;
2470
- if (typeof s.getProxy == "function") {
2467
+ const Q = (t) => t !== null && typeof t == "object" && !Array.isArray(t) && !(t instanceof Date) && !(typeof Blob < "u" && t instanceof Blob) && !(typeof File < "u" && t instanceof File);
2468
+ function I(t, e, s) {
2469
+ if (t == null || typeof t != "object" || t instanceof G) return;
2470
+ if (typeof t.getProxy == "function") {
2471
2471
  process.env.NODE_ENV !== "production" && console.warn(
2472
2472
  "[reformer] createForm({ schema }): в схему попал узел формы (FormProxy) — он пропущен. Стройте дерево для createForm БЕЗ формы, а форму донесите до узла вторым проходом (билдер `(model, form?) => …`) либо через render-behavior `patchProps({ form })`."
2473
2473
  );
2474
2474
  return;
2475
2475
  }
2476
- if (Array.isArray(s)) {
2477
- for (const n of s) I(n, e, t);
2476
+ if (Array.isArray(t)) {
2477
+ for (const n of t) I(n, e, s);
2478
2478
  return;
2479
2479
  }
2480
- const r = s, i = r.array;
2480
+ const r = t, i = r.array;
2481
2481
  if (i && typeof i.__path == "string" && typeof r.item == "function") {
2482
- t.set(i.__path, r.item);
2482
+ s.set(i.__path, r.item);
2483
2483
  return;
2484
2484
  }
2485
- r.value instanceof j ? e.set(r.value, {
2485
+ r.value instanceof G ? e.set(r.value, {
2486
2486
  component: r.component,
2487
2487
  componentProps: r.componentProps,
2488
2488
  updateOn: r.updateOn,
@@ -2492,68 +2492,68 @@ function I(s, e, t) {
2492
2492
  "[reformer] createForm({ schema }): узел с `component` не распознан как поле — `value` не является сигналом модели. Ожидается `value: model.$.<path>`; проверьте, что не передан `value: model.<path>` (value-прокси) или `valueSignal:`."
2493
2493
  );
2494
2494
  for (const [n, a] of Object.entries(r))
2495
- n !== "value" && I(a, e, t);
2495
+ n !== "value" && I(a, e, s);
2496
2496
  }
2497
- function Q(s, e, t, r) {
2497
+ function X(t, e, s, r) {
2498
2498
  const i = {};
2499
2499
  for (const [n, a] of Object.entries(e)) {
2500
- const l = t === "" ? n : `${t}.${n}`;
2500
+ const l = s === "" ? n : `${s}.${n}`;
2501
2501
  if (Array.isArray(a))
2502
2502
  continue;
2503
- if (J(a)) {
2504
- i[n] = Q(s, a, l, r);
2503
+ if (Q(a)) {
2504
+ i[n] = X(t, a, l, r);
2505
2505
  continue;
2506
2506
  }
2507
- const d = s.signalAt(l);
2507
+ const d = t.signalAt(l);
2508
2508
  if (!d) throw new Error(`createForm({ model }): не найден сигнал для пути "${l}"`);
2509
2509
  const u = r.get(d) ?? {};
2510
2510
  i[n] = { ...u, valueSignal: d };
2511
2511
  }
2512
2512
  return i;
2513
2513
  }
2514
- function X(s, e, t) {
2515
- for (const [r, i] of Object.entries(s)) {
2514
+ function Z(t, e, s) {
2515
+ for (const [r, i] of Object.entries(t)) {
2516
2516
  const n = e === "" ? r : `${e}.${r}`;
2517
- Array.isArray(i) || (J(i) ? X(i, n, t) : t.push(n));
2517
+ Array.isArray(i) || (Q(i) ? Z(i, n, s) : s.push(n));
2518
2518
  }
2519
2519
  }
2520
- function Z(s) {
2521
- const { model: e, schema: t, behavior: r } = s, i = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
2522
- t !== void 0 && I(t, i, n);
2523
- const a = Q(e, e.get(), "", i), l = new A(a), d = e.get();
2520
+ function ee(t) {
2521
+ const { model: e, schema: s, behavior: r } = t, i = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
2522
+ s !== void 0 && I(s, i, n);
2523
+ const a = X(e, e.get(), "", i), l = new w(a), d = e.get();
2524
2524
  for (const [o, f] of Object.entries(d)) {
2525
2525
  if (!Array.isArray(f)) continue;
2526
2526
  const c = n.get(o);
2527
2527
  if (!c) continue;
2528
- const v = e[o], p = (y) => Z({ model: y, schema: c(y) }), b = new me(v, p);
2528
+ const v = e[o], p = (y) => ee({ model: y, schema: c(y) }), b = new ye(v, p);
2529
2529
  l.fields.set(o, b);
2530
2530
  }
2531
2531
  const u = l.getProxy(), h = [];
2532
- X(e.get(), "", h);
2532
+ Z(e.get(), "", h);
2533
2533
  for (const o of h) {
2534
2534
  const f = e.signalAt(o), c = l.getFieldByPath(o);
2535
2535
  if (f && c) {
2536
- se(f, c);
2536
+ re(f, c);
2537
2537
  const v = o.lastIndexOf("."), p = v === -1 ? l : l.getFieldByPath(o.slice(0, v));
2538
- p instanceof A && p.registerFieldSignal(c, f);
2538
+ p instanceof w && p.registerFieldSignal(c, f);
2539
2539
  }
2540
2540
  }
2541
2541
  return r && l.attachBehaviorCleanup(r.__run(e, u)), u;
2542
2542
  }
2543
- const pe = (s) => s != null && typeof s == "object" && "model" in s && typeof s.model?.signalAt == "function";
2544
- function ye(s) {
2545
- return pe(s) ? Z(s) : new A(s).getProxy();
2543
+ const ge = (t) => t != null && typeof t == "object" && "model" in t && typeof t.model?.signalAt == "function";
2544
+ function be(t) {
2545
+ return ge(t) ? ee(t) : new w(t).getProxy();
2546
2546
  }
2547
- const ge = () => {
2547
+ const Ee = () => {
2548
2548
  };
2549
- function be(s, e) {
2549
+ function _e(t, e) {
2550
2550
  if (!e) return;
2551
- const t = typeof e == "function" ? { schema: e } : e, r = Object.keys(t.steps ?? {}), i = r.map((o) => t.steps?.[o]).filter((o) => o != null), n = t.schema ?? re(
2552
- () => ne(...i, ...t.extras ? [t.extras] : [])
2551
+ const s = typeof e == "function" ? { schema: e } : e, r = Object.keys(s.steps ?? {}), i = r.map((o) => s.steps?.[o]).filter((o) => o != null), n = s.schema ?? ie(
2552
+ () => ae(...i, ...s.extras ? [s.extras] : [])
2553
2553
  ), a = (o) => {
2554
2554
  const f = typeof o == "number" ? r[o - 1] : o;
2555
- return (f != null ? t.steps?.[f] : null) ?? null;
2556
- }, { strategy: l, debounce: d, liveAfterSubmit: u } = t, h = D(s, n, {
2555
+ return (f != null ? s.steps?.[f] : null) ?? null;
2556
+ }, { strategy: l, debounce: d, liveAfterSubmit: u } = s, h = D(t, n, {
2557
2557
  strategy: l,
2558
2558
  debounce: d,
2559
2559
  liveAfterSubmit: u
@@ -2563,59 +2563,59 @@ function be(s, e) {
2563
2563
  stepSelectors: r,
2564
2564
  validate: () => h.validate(),
2565
2565
  validateAll: () => h.validate(),
2566
- validateStep: (o) => ie(s, a(o) ?? ge, { touch: !0 }),
2566
+ validateStep: (o) => ne(t, a(o) ?? Ee, { touch: !0 }),
2567
2567
  createStepController: (o) => {
2568
2568
  if (!l || l === "submit") return null;
2569
2569
  const f = a(o);
2570
- return f ? D(s, f, { strategy: l, debounce: d, liveAfterSubmit: u }) : null;
2570
+ return f ? D(t, f, { strategy: l, debounce: d, liveAfterSubmit: u }) : null;
2571
2571
  },
2572
2572
  controller: h,
2573
2573
  validating: h.validating
2574
2574
  };
2575
2575
  }
2576
- function Ie(s) {
2577
- if (!s.model && s.initial === void 0)
2576
+ function je(t) {
2577
+ if (!t.model && t.initial === void 0)
2578
2578
  throw new Error("createCoreForm: provide either `initial` (to create a model) or `model`.");
2579
- const e = s.model ?? ee(s.initial);
2580
- s.seed?.(e);
2581
- const t = ye({
2579
+ const e = t.model ?? te(t.initial);
2580
+ t.seed?.(e);
2581
+ const s = be({
2582
2582
  model: e,
2583
- ...s.schema ? { schema: s.schema(e) } : {},
2584
- ...s.behavior ? { behavior: s.behavior } : {}
2585
- }), r = be(e, s.validation), i = { model: e, form: t, ...r ? { validation: r } : {} };
2586
- return s.setup?.(i), i;
2583
+ ...t.schema ? { schema: t.schema(e) } : {},
2584
+ ...t.behavior ? { behavior: t.behavior } : {}
2585
+ }), r = _e(e, t.validation), i = { model: e, form: s, ...r ? { validation: r } : {} };
2586
+ return t.setup?.(i), i;
2587
2587
  }
2588
- function x(s) {
2589
- return s == null ? !1 : typeof s == "object" && "value" in s && "setValue" in s && "getValue" in s && "validate" in s;
2588
+ function C(t) {
2589
+ return t == null ? !1 : typeof t == "object" && "value" in t && "setValue" in t && "getValue" in t && "validate" in t;
2590
2590
  }
2591
- function Ee(s) {
2592
- return x(s) && "validators" in s && "asyncValidators" in s && // FieldNode имеет markAsTouched метод
2591
+ function Se(t) {
2592
+ return C(t) && "validators" in t && "asyncValidators" in t && // FieldNode имеет markAsTouched метод
2593
2593
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2594
- typeof s.markAsTouched == "function" && // У FieldNode нет fields или items
2595
- !("fields" in s) && !("items" in s);
2594
+ typeof t.markAsTouched == "function" && // У FieldNode нет fields или items
2595
+ !("fields" in t) && !("items" in t);
2596
2596
  }
2597
- function _e(s) {
2598
- return x(s) && "getFieldByPath" in s && "fields" in s && // GroupNode НЕ имеет items/push/removeAt (это ArrayNode/ModelArrayNode)
2599
- !("items" in s) && !("push" in s) && !("removeAt" in s);
2597
+ function Ae(t) {
2598
+ return C(t) && "getFieldByPath" in t && "fields" in t && // GroupNode НЕ имеет items/push/removeAt (это ArrayNode/ModelArrayNode)
2599
+ !("items" in t) && !("push" in t) && !("removeAt" in t);
2600
2600
  }
2601
- function Se(s) {
2602
- return x(s) && "items" in s && "length" in s && "push" in s && "removeAt" in s && "at" in s && // eslint-disable-next-line @typescript-eslint/no-explicit-any
2603
- typeof s.push == "function" && // eslint-disable-next-line @typescript-eslint/no-explicit-any
2604
- typeof s.removeAt == "function";
2601
+ function we(t) {
2602
+ return C(t) && "items" in t && "length" in t && "push" in t && "removeAt" in t && "at" in t && // eslint-disable-next-line @typescript-eslint/no-explicit-any
2603
+ typeof t.push == "function" && // eslint-disable-next-line @typescript-eslint/no-explicit-any
2604
+ typeof t.removeAt == "function";
2605
2605
  }
2606
- function Le(s) {
2607
- return Ee(s) ? "FieldNode" : _e(s) ? "GroupNode" : Se(s) ? "ArrayNode" : x(s) ? "FormNode" : "Unknown";
2606
+ function Ue(t) {
2607
+ return Se(t) ? "FieldNode" : Ae(t) ? "GroupNode" : we(t) ? "ArrayNode" : C(t) ? "FormNode" : "Unknown";
2608
2608
  }
2609
- var F = { exports: {} }, P = {};
2609
+ var N = { exports: {} }, P = {};
2610
2610
  var q;
2611
- function Ae() {
2611
+ function Ve() {
2612
2612
  if (q) return P;
2613
2613
  q = 1;
2614
- var s = z;
2614
+ var t = Y;
2615
2615
  function e(o, f) {
2616
2616
  return o === f && (o !== 0 || 1 / o === 1 / f) || o !== o && f !== f;
2617
2617
  }
2618
- var t = typeof Object.is == "function" ? Object.is : e, r = s.useState, i = s.useEffect, n = s.useLayoutEffect, a = s.useDebugValue;
2618
+ var s = typeof Object.is == "function" ? Object.is : e, r = t.useState, i = t.useEffect, n = t.useLayoutEffect, a = t.useDebugValue;
2619
2619
  function l(o, f) {
2620
2620
  var c = f(), v = r({ inst: { value: c, getSnapshot: f } }), p = v[0].inst, b = v[1];
2621
2621
  return n(
@@ -2637,7 +2637,7 @@ function Ae() {
2637
2637
  o = o.value;
2638
2638
  try {
2639
2639
  var c = f();
2640
- return !t(o, c);
2640
+ return !s(o, c);
2641
2641
  } catch {
2642
2642
  return !0;
2643
2643
  }
@@ -2646,13 +2646,13 @@ function Ae() {
2646
2646
  return f();
2647
2647
  }
2648
2648
  var h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? u : l;
2649
- return P.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : h, P;
2649
+ return P.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : h, P;
2650
2650
  }
2651
2651
  var T = {};
2652
- var K;
2653
- function we() {
2654
- return K || (K = 1, process.env.NODE_ENV !== "production" && (function() {
2655
- function s(c, v) {
2652
+ var H;
2653
+ function ke() {
2654
+ return H || (H = 1, process.env.NODE_ENV !== "production" && (function() {
2655
+ function t(c, v) {
2656
2656
  return c === v && (c !== 0 || 1 / c === 1 / v) || c !== c && v !== v;
2657
2657
  }
2658
2658
  function e(c, v) {
@@ -2669,22 +2669,22 @@ function we() {
2669
2669
  b = a({
2670
2670
  inst: { value: p, getSnapshot: v }
2671
2671
  });
2672
- var y = b[0].inst, w = b[1];
2672
+ var y = b[0].inst, V = b[1];
2673
2673
  return d(
2674
2674
  function() {
2675
- y.value = p, y.getSnapshot = v, t(y) && w({ inst: y });
2675
+ y.value = p, y.getSnapshot = v, s(y) && V({ inst: y });
2676
2676
  },
2677
2677
  [c, p, v]
2678
2678
  ), l(
2679
2679
  function() {
2680
- return t(y) && w({ inst: y }), c(function() {
2681
- t(y) && w({ inst: y });
2680
+ return s(y) && V({ inst: y }), c(function() {
2681
+ s(y) && V({ inst: y });
2682
2682
  });
2683
2683
  },
2684
2684
  [c]
2685
2685
  ), u(p), p;
2686
2686
  }
2687
- function t(c) {
2687
+ function s(c) {
2688
2688
  var v = c.getSnapshot;
2689
2689
  c = c.value;
2690
2690
  try {
@@ -2698,32 +2698,32 @@ function we() {
2698
2698
  return v();
2699
2699
  }
2700
2700
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
2701
- var i = z, n = typeof Object.is == "function" ? Object.is : s, a = i.useState, l = i.useEffect, d = i.useLayoutEffect, u = i.useDebugValue, h = !1, o = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : e;
2701
+ var i = Y, n = typeof Object.is == "function" ? Object.is : t, a = i.useState, l = i.useEffect, d = i.useLayoutEffect, u = i.useDebugValue, h = !1, o = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : e;
2702
2702
  T.useSyncExternalStore = i.useSyncExternalStore !== void 0 ? i.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
2703
2703
  })()), T;
2704
2704
  }
2705
- var H;
2706
- function Ve() {
2707
- return H || (H = 1, process.env.NODE_ENV === "production" ? F.exports = Ae() : F.exports = we()), F.exports;
2705
+ var K;
2706
+ function Fe() {
2707
+ return K || (K = 1, process.env.NODE_ENV === "production" ? N.exports = Ve() : N.exports = ke()), N.exports;
2708
2708
  }
2709
- var C = Ve();
2710
- function ke(s, e) {
2711
- if (s === e) return !0;
2712
- if (s.length !== e.length) return !1;
2713
- for (let t = 0; t < s.length; t++)
2714
- if (s[t] !== e[t]) return !1;
2709
+ var x = Fe();
2710
+ function Oe(t, e) {
2711
+ if (t === e) return !0;
2712
+ if (t.length !== e.length) return !1;
2713
+ for (let s = 0; s < t.length; s++)
2714
+ if (t[s] !== e[s]) return !1;
2715
2715
  return !0;
2716
2716
  }
2717
- function $(s, e, t, r) {
2718
- const i = k(null), n = k(s);
2719
- n.current = s;
2720
- const a = k(e);
2717
+ function $(t, e, s, r) {
2718
+ const i = A(null), n = A(t);
2719
+ n.current = t;
2720
+ const a = A(e);
2721
2721
  a.current = e;
2722
- const l = k(t);
2723
- if (l.current = t, i.current === null) {
2722
+ const l = A(s);
2723
+ if (l.current = s, i.current === null) {
2724
2724
  const h = {};
2725
- for (const o in s)
2726
- h[o] = s[o].value;
2725
+ for (const o in t)
2726
+ h[o] = t[o].value;
2727
2727
  i.current = { ...h, __snapshot: null };
2728
2728
  }
2729
2729
  const d = E(
@@ -2752,13 +2752,13 @@ function $(s, e, t, r) {
2752
2752
  f[v] = o[v].value;
2753
2753
  let c = !1;
2754
2754
  for (const v of a.current) {
2755
- const { key: p, useShallowArrayEqual: b } = v, y = f[p], w = h[p];
2755
+ const { key: p, useShallowArrayEqual: b } = v, y = f[p], V = h[p];
2756
2756
  if (b) {
2757
- if (!ke(w, y)) {
2757
+ if (!Oe(V, y)) {
2758
2758
  c = !0;
2759
2759
  break;
2760
2760
  }
2761
- } else if (w !== y) {
2761
+ } else if (V !== y) {
2762
2762
  c = !0;
2763
2763
  break;
2764
2764
  }
@@ -2769,21 +2769,21 @@ function $(s, e, t, r) {
2769
2769
  h[v] = f[v];
2770
2770
  return h.__snapshot = l.current(f), h.__snapshot;
2771
2771
  }, [r]);
2772
- return C.useSyncExternalStore(d, u, u);
2772
+ return x.useSyncExternalStore(d, u, u);
2773
2773
  }
2774
- function Oe(s) {
2774
+ function Ne(t) {
2775
2775
  const e = {
2776
- value: s.value,
2777
- disabled: s.disabled,
2778
- errors: s.errors,
2779
- pending: s.pending,
2780
- valid: s.valid,
2781
- invalid: s.invalid,
2782
- touched: s.touched,
2783
- dirty: s.dirty,
2784
- shouldShowError: s.shouldShowError,
2785
- componentProps: s.componentProps
2786
- }, t = [
2776
+ value: t.value,
2777
+ disabled: t.disabled,
2778
+ errors: t.errors,
2779
+ pending: t.pending,
2780
+ valid: t.valid,
2781
+ invalid: t.invalid,
2782
+ touched: t.touched,
2783
+ dirty: t.dirty,
2784
+ shouldShowError: t.shouldShowError,
2785
+ componentProps: t.componentProps
2786
+ }, s = [
2787
2787
  { key: "value" },
2788
2788
  { key: "disabled" },
2789
2789
  { key: "errors", useShallowArrayEqual: !0 },
@@ -2809,20 +2809,20 @@ function Oe(s) {
2809
2809
  }),
2810
2810
  []
2811
2811
  );
2812
- return $(e, t, r, s);
2812
+ return $(e, s, r, t);
2813
2813
  }
2814
- function Ne(s) {
2814
+ function Me(t) {
2815
2815
  const e = {
2816
- value: s.value,
2817
- length: s.length,
2818
- errors: s.errors,
2819
- pending: s.pending,
2820
- valid: s.valid,
2821
- invalid: s.invalid,
2822
- touched: s.touched,
2823
- dirty: s.dirty,
2824
- disabled: s.disabled
2825
- }, t = [
2816
+ value: t.value,
2817
+ length: t.length,
2818
+ errors: t.errors,
2819
+ pending: t.pending,
2820
+ valid: t.valid,
2821
+ invalid: t.invalid,
2822
+ touched: t.touched,
2823
+ dirty: t.dirty,
2824
+ disabled: t.disabled
2825
+ }, s = [
2826
2826
  { key: "value" },
2827
2827
  { key: "length" },
2828
2828
  { key: "errors", useShallowArrayEqual: !0 },
@@ -2846,10 +2846,10 @@ function Ne(s) {
2846
2846
  }),
2847
2847
  []
2848
2848
  );
2849
- return $(e, t, r, s);
2849
+ return $(e, s, r, t);
2850
2850
  }
2851
- function Fe() {
2852
- const s = E(
2851
+ function Ce() {
2852
+ const t = E(
2853
2853
  () => ({
2854
2854
  value: [],
2855
2855
  length: 0,
@@ -2863,57 +2863,57 @@ function Fe() {
2863
2863
  }),
2864
2864
  []
2865
2865
  );
2866
- return $({}, [], s);
2866
+ return $({}, [], t);
2867
2867
  }
2868
- function Re(s) {
2869
- const e = s && "length" in s && "map" in s;
2870
- return s ? e ? Ne(s) : Oe(s) : Fe();
2868
+ function We(t) {
2869
+ const e = t && "length" in t && "map" in t;
2870
+ return t ? e ? Me(t) : Ne(t) : Ce();
2871
2871
  }
2872
- function $e(s) {
2873
- const e = k({ value: s.value.value }), t = E(
2872
+ function qe(t) {
2873
+ const e = A({ value: t.value.value }), s = E(
2874
2874
  (i) => {
2875
2875
  let n = !0;
2876
2876
  return _(() => {
2877
- if (s.value.value, n) {
2877
+ if (t.value.value, n) {
2878
2878
  n = !1;
2879
2879
  return;
2880
2880
  }
2881
2881
  i();
2882
2882
  });
2883
2883
  },
2884
- [s]
2884
+ [t]
2885
2885
  ), r = E(() => {
2886
- const i = s.value.value;
2886
+ const i = t.value.value;
2887
2887
  return e.current.value === i ? e.current.value : (e.current.value = i, i);
2888
- }, [s]);
2889
- return C.useSyncExternalStore(t, r, r);
2888
+ }, [t]);
2889
+ return x.useSyncExternalStore(s, r, r);
2890
2890
  }
2891
- function Ge(s) {
2892
- const e = k({ length: s.length.value }), t = E(
2891
+ function He(t) {
2892
+ const e = A({ length: t.length.value }), s = E(
2893
2893
  (i) => {
2894
2894
  let n = !0;
2895
2895
  return _(() => {
2896
- if (s.length.value, n) {
2896
+ if (t.length.value, n) {
2897
2897
  n = !1;
2898
2898
  return;
2899
2899
  }
2900
2900
  i();
2901
2901
  });
2902
2902
  },
2903
- [s]
2903
+ [t]
2904
2904
  ), r = E(() => {
2905
- const i = s.length.value;
2905
+ const i = t.length.value;
2906
2906
  return e.current.length === i ? e.current.length : (e.current.length = i, i);
2907
- }, [s]);
2908
- return C.useSyncExternalStore(t, r, r);
2907
+ }, [t]);
2908
+ return x.useSyncExternalStore(s, r, r);
2909
2909
  }
2910
- function je(s) {
2911
- const { model: e, schema: t, strategy: r, debounce: i, liveAfterSubmit: n } = s, a = ae(
2912
- () => D(e, t, { strategy: r, debounce: i, liveAfterSubmit: n }),
2913
- [e, t, r, i, n]
2910
+ function Ke(t) {
2911
+ const { model: e, schema: s, strategy: r, debounce: i, liveAfterSubmit: n } = t, a = oe(
2912
+ () => D(e, s, { strategy: r, debounce: i, liveAfterSubmit: n }),
2913
+ [e, s, r, i, n]
2914
2914
  );
2915
- Y(() => a.start(), [a]);
2916
- const l = C.useSyncExternalStore(
2915
+ J(() => a.start(), [a]);
2916
+ const l = x.useSyncExternalStore(
2917
2917
  E((u) => a.validating.subscribe(u), [a]),
2918
2918
  () => a.validating.peek(),
2919
2919
  () => !1
@@ -2921,55 +2921,99 @@ function je(s) {
2921
2921
  ), d = E(() => a.validate(), [a]);
2922
2922
  return { submit: d, validate: d, isValidating: l };
2923
2923
  }
2924
- function Be(s) {
2925
- const [e] = oe(s), t = e.validation?.controller;
2926
- return Y(() => t?.start(), [t]), e;
2924
+ function ze(t) {
2925
+ const [e] = le(t), s = e.validation?.controller;
2926
+ return J(() => s?.start(), [s]), e;
2927
+ }
2928
+ const xe = ["labelTooltip"];
2929
+ function Ye(t) {
2930
+ if (!(t == null || typeof t != "function" && typeof t != "object"))
2931
+ return t.reformerAdapter;
2932
+ }
2933
+ const z = (t) => t;
2934
+ function Je(t, e, s = {}) {
2935
+ const r = { ...s };
2936
+ for (const n of xe) delete r[n];
2937
+ for (const n of t?.strip ?? []) delete r[n];
2938
+ if (!t)
2939
+ return { ...r, value: e.value, onChange: e.onChange, onBlur: e.onBlur };
2940
+ const i = t.fromEmit ?? z;
2941
+ return {
2942
+ ...r,
2943
+ [t.valueProp ?? "value"]: (t.toValue ?? z)(e.value),
2944
+ [t.changeProp ?? "onChange"]: (n) => e.onChange(i(n, r)),
2945
+ ...t.bindBlur ? t.bindBlur(e.onBlur) : { onBlur: e.onBlur }
2946
+ };
2947
+ }
2948
+ function Pe(t) {
2949
+ return {
2950
+ focus: () => t.current?.focus(),
2951
+ blur: () => t.current?.blur(),
2952
+ scrollIntoView: (e) => t.current?.scrollIntoView(e),
2953
+ getElement: () => t.current
2954
+ };
2955
+ }
2956
+ function Te(t) {
2957
+ return typeof t == "object" && t !== null && t.nodeType === 1;
2958
+ }
2959
+ function Qe(t) {
2960
+ const e = A(null);
2961
+ return ue(t, () => De(e)), e;
2962
+ }
2963
+ function De(t) {
2964
+ const e = t.current;
2965
+ return e == null || Te(e) ? Pe(t) : e;
2927
2966
  }
2928
- const Ue = Object.freeze({ runtime: "reformer-core", v: 1 });
2967
+ const Xe = Object.freeze({ runtime: "reformer-core", v: 1 });
2929
2968
  export {
2930
2969
  W as ArrayNode,
2931
- Ue as CORE_RUNTIME_TOKEN,
2970
+ Xe as CORE_RUNTIME_TOKEN,
2932
2971
  S as ErrorStrategy,
2933
- de as FieldNode,
2934
- V as FormErrorHandler,
2972
+ xe as FIELD_WRAPPER_ONLY_PROPS,
2973
+ he as FieldNode,
2974
+ k as FormErrorHandler,
2935
2975
  M as FormNode,
2936
- he as FormSubmitter,
2937
- A as GroupNode,
2938
- me as ModelArrayNode,
2939
- ve as NodeFactory,
2940
- L as SubscriptionManager,
2941
- be as buildValidation,
2942
- Xe as computeFrom,
2943
- Ze as copyFrom,
2944
- Ie as createCoreForm,
2945
- ye as createForm,
2946
- Z as createFormFromModel,
2947
- ee as createModel,
2948
- ct as disableWhen,
2949
- Ke as eachLeafSignal,
2950
- ht as enableWhen,
2951
- ut as getNodeForSignal,
2952
- Le as getNodeType,
2953
- Se as isArrayNode,
2954
- G as isDerived,
2955
- Ee as isFieldNode,
2956
- x as isFormNode,
2957
- _e as isGroupNode,
2958
- ze as isModelContainerSignal,
2959
- Ye as markDerived,
2960
- se as registerSignalNode,
2961
- et as resetWhen,
2962
- tt as revalidateWhen,
2963
- st as runOutsideEffect,
2964
- rt as safeCallback,
2965
- it as safeDebouncedCallback,
2966
- nt as syncFields,
2967
- at as transformValue,
2968
- Je as unmarkDerived,
2969
- Ge as useArrayLength,
2970
- Be as useFormBundle,
2971
- Re as useFormControl,
2972
- $e as useFormControlValue,
2973
- je as useFormValidation,
2974
- ot as watchField
2976
+ ve as FormSubmitter,
2977
+ w as GroupNode,
2978
+ ye as ModelArrayNode,
2979
+ pe as NodeFactory,
2980
+ R as SubscriptionManager,
2981
+ Je as bindFieldProps,
2982
+ _e as buildValidation,
2983
+ ot as computeFrom,
2984
+ lt as copyFrom,
2985
+ je as createCoreForm,
2986
+ be as createForm,
2987
+ ee as createFormFromModel,
2988
+ te as createModel,
2989
+ Et as disableWhen,
2990
+ tt as eachLeafSignal,
2991
+ _t as enableWhen,
2992
+ Ye as getFieldAdapter,
2993
+ gt as getNodeForSignal,
2994
+ Ue as getNodeType,
2995
+ we as isArrayNode,
2996
+ B as isDerived,
2997
+ Se as isFieldNode,
2998
+ C as isFormNode,
2999
+ Ae as isGroupNode,
3000
+ rt as isModelContainerSignal,
3001
+ Pe as makeElementFieldHandle,
3002
+ it as markDerived,
3003
+ re as registerSignalNode,
3004
+ ut as resetWhen,
3005
+ dt as revalidateWhen,
3006
+ ct as runOutsideEffect,
3007
+ ht as safeCallback,
3008
+ ft as safeDebouncedCallback,
3009
+ vt as syncFields,
3010
+ mt as transformValue,
3011
+ nt as unmarkDerived,
3012
+ He as useArrayLength,
3013
+ Qe as useFieldHandleRef,
3014
+ ze as useFormBundle,
3015
+ We as useFormControl,
3016
+ qe as useFormControlValue,
3017
+ Ke as useFormValidation,
3018
+ pt as watchField
2975
3019
  };