@reformer/core 11.0.0-beta.5 → 11.0.0-beta.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.
- package/dist/behaviors.js +124 -124
- package/dist/create-model-B8U-COv-.js +103 -0
- package/dist/en-CjAqn7h0.js +41 -0
- package/dist/form/behaviors/internals.d.ts +9 -0
- package/dist/form/create-form.d.ts +6 -6
- package/dist/form/factories/node-factory.d.ts +16 -16
- package/dist/form/nodes/array-node.d.ts +3 -3
- package/dist/form/nodes/field-node.d.ts +3 -3
- package/dist/form/nodes/group-node.d.ts +7 -7
- package/dist/form/nodes/model-array-node.d.ts +2 -2
- package/dist/form/types/contracts.d.ts +6 -0
- package/dist/form/types/deep-schema.d.ts +5 -5
- package/dist/form/types/validation-schema.d.ts +13 -1
- package/dist/form/validation/operators.d.ts +6 -1
- package/dist/form/validators/validation-error.d.ts +8 -0
- package/dist/i18n/descriptor.d.ts +54 -0
- package/dist/i18n/en.json.d.ts +45 -0
- package/dist/i18n/loader.d.ts +71 -0
- package/dist/i18n/locale-store.d.ts +39 -0
- package/dist/i18n/locale.d.ts +90 -0
- package/dist/i18n/message-format.d.ts +116 -0
- package/dist/i18n/resolve-localized.d.ts +17 -0
- package/dist/i18n/ru.json.d.ts +45 -0
- package/dist/i18n/translator.d.ts +50 -0
- package/dist/i18n/validation-message.d.ts +18 -0
- package/dist/i18n.d.ts +31 -0
- package/dist/i18n.js +303 -0
- package/dist/index-BrNkQj1y.js +105 -0
- package/dist/index.js +548 -601
- package/dist/loader-Dv_Hl7JC.js +216 -0
- package/dist/locale/en.d.ts +2 -0
- package/dist/locale/en.js +5 -0
- package/dist/locale/en.json +42 -0
- package/dist/locale/index.d.ts +18 -0
- package/dist/locale/ru.d.ts +2 -0
- package/dist/locale/ru.js +41 -0
- package/dist/locale/ru.json +42 -0
- package/dist/locale.d.ts +2 -0
- package/dist/locale.js +9 -0
- package/dist/model/create-model.d.ts +17 -3
- package/dist/model/index.d.ts +3 -3
- package/dist/model/model-signals-proxy.d.ts +25 -0
- package/dist/model/types.d.ts +19 -5
- package/dist/model-signals-proxy-2vqS243J.js +250 -0
- package/dist/model.js +18 -16
- package/dist/platforms/react/field-binding/field-adapter.d.ts +87 -0
- package/dist/platforms/react/field-binding/field-handle.d.ts +50 -0
- package/dist/platforms/react/hooks/types.d.ts +6 -3
- package/dist/platforms/react/hooks/useFormControlValue.d.ts +2 -1
- package/dist/platforms/react/i18n/context.d.ts +13 -0
- package/dist/platforms/react/i18n/hooks.d.ts +59 -0
- package/dist/platforms/react/i18n/provider.d.ts +52 -0
- package/dist/platforms/react/index.d.ts +4 -0
- package/dist/{strategy-DA3JwxsR.js → strategy-BXS_gBfz.js} +7 -7
- package/dist/validation-error-B-U3RsV0.js +11 -0
- package/dist/validation.js +1 -1
- package/dist/validators/email.js +5 -8
- package/dist/validators/future-date.js +8 -11
- package/dist/validators/integer.js +4 -7
- package/dist/validators/is-date.js +5 -8
- package/dist/validators/is-number.js +4 -7
- package/dist/validators/max-age.js +8 -11
- package/dist/validators/max-date.js +8 -11
- package/dist/validators/max-length.js +5 -8
- package/dist/validators/max.js +4 -7
- package/dist/validators/min-age.js +8 -11
- package/dist/validators/min-date.js +8 -11
- package/dist/validators/min-length.js +5 -8
- package/dist/validators/min.js +4 -7
- package/dist/validators/multiple-of.js +5 -8
- package/dist/validators/non-negative.js +4 -7
- package/dist/validators/non-zero.js +4 -7
- package/dist/validators/past-date.js +8 -11
- package/dist/validators/pattern.js +5 -8
- package/dist/validators/phone.js +6 -9
- package/dist/validators/required.js +4 -7
- package/dist/validators/url.js +9 -14
- package/dist/validators.js +84 -106
- package/docs/llms/02-quick-start.md +7 -7
- package/docs/llms/03-api-signatures.md +11 -5
- package/docs/llms/05-common-mistakes.md +1 -1
- package/docs/llms/09-formschema.md +12 -12
- package/docs/llms/10-arrays.md +34 -4
- package/docs/llms/14-extended-mistakes.md +1 -1
- package/docs/llms/15-project-structure.md +15 -13
- package/docs/llms/16-ui-components.md +36 -9
- package/docs/llms/17-nonexistent-api.md +16 -2
- package/docs/llms/29-async-preload.md +4 -4
- package/docs/llms/30-type-safety-recipes.md +1 -1
- package/docs/llms/34-i18n.md +272 -0
- package/llms-index.json +1 -1
- package/llms.txt +1925 -175
- package/package.json +22 -3
- package/dist/create-model-Dxh9cfLp.js +0 -97
- package/dist/model-signals-proxy-mV3WGdlO.js +0 -233
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import T from "react";
|
|
2
|
+
var l = { exports: {} }, y = {};
|
|
3
|
+
var L;
|
|
4
|
+
function A() {
|
|
5
|
+
if (L) return y;
|
|
6
|
+
L = 1;
|
|
7
|
+
var i = T;
|
|
8
|
+
function _(t, o) {
|
|
9
|
+
return t === o && (t !== 0 || 1 / t === 1 / o) || t !== t && o !== o;
|
|
10
|
+
}
|
|
11
|
+
var c = typeof Object.is == "function" ? Object.is : _, p = i.useState, u = i.useEffect, S = i.useLayoutEffect, E = i.useDebugValue;
|
|
12
|
+
function O(t, o) {
|
|
13
|
+
var e = o(), r = p({ inst: { value: e, getSnapshot: o } }), n = r[0].inst, a = r[1];
|
|
14
|
+
return S(
|
|
15
|
+
function() {
|
|
16
|
+
n.value = e, n.getSnapshot = o, f(n) && a({ inst: n });
|
|
17
|
+
},
|
|
18
|
+
[t, e, o]
|
|
19
|
+
), u(
|
|
20
|
+
function() {
|
|
21
|
+
return f(n) && a({ inst: n }), t(function() {
|
|
22
|
+
f(n) && a({ inst: n });
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
[t]
|
|
26
|
+
), E(e), e;
|
|
27
|
+
}
|
|
28
|
+
function f(t) {
|
|
29
|
+
var o = t.getSnapshot;
|
|
30
|
+
t = t.value;
|
|
31
|
+
try {
|
|
32
|
+
var e = o();
|
|
33
|
+
return !c(t, e);
|
|
34
|
+
} catch {
|
|
35
|
+
return !0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function v(t, o) {
|
|
39
|
+
return o();
|
|
40
|
+
}
|
|
41
|
+
var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? v : O;
|
|
42
|
+
return y.useSyncExternalStore = i.useSyncExternalStore !== void 0 ? i.useSyncExternalStore : d, y;
|
|
43
|
+
}
|
|
44
|
+
var m = {};
|
|
45
|
+
var x;
|
|
46
|
+
function g() {
|
|
47
|
+
return x || (x = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
48
|
+
function i(e, r) {
|
|
49
|
+
return e === r && (e !== 0 || 1 / e === 1 / r) || e !== e && r !== r;
|
|
50
|
+
}
|
|
51
|
+
function _(e, r) {
|
|
52
|
+
d || u.startTransition === void 0 || (d = !0, console.error(
|
|
53
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
54
|
+
));
|
|
55
|
+
var n = r();
|
|
56
|
+
if (!t) {
|
|
57
|
+
var a = r();
|
|
58
|
+
S(n, a) || (console.error(
|
|
59
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
60
|
+
), t = !0);
|
|
61
|
+
}
|
|
62
|
+
a = E({
|
|
63
|
+
inst: { value: n, getSnapshot: r }
|
|
64
|
+
});
|
|
65
|
+
var s = a[0].inst, h = a[1];
|
|
66
|
+
return f(
|
|
67
|
+
function() {
|
|
68
|
+
s.value = n, s.getSnapshot = r, c(s) && h({ inst: s });
|
|
69
|
+
},
|
|
70
|
+
[e, n, r]
|
|
71
|
+
), O(
|
|
72
|
+
function() {
|
|
73
|
+
return c(s) && h({ inst: s }), e(function() {
|
|
74
|
+
c(s) && h({ inst: s });
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
[e]
|
|
78
|
+
), v(n), n;
|
|
79
|
+
}
|
|
80
|
+
function c(e) {
|
|
81
|
+
var r = e.getSnapshot;
|
|
82
|
+
e = e.value;
|
|
83
|
+
try {
|
|
84
|
+
var n = r();
|
|
85
|
+
return !S(e, n);
|
|
86
|
+
} catch {
|
|
87
|
+
return !0;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function p(e, r) {
|
|
91
|
+
return r();
|
|
92
|
+
}
|
|
93
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
94
|
+
var u = T, S = typeof Object.is == "function" ? Object.is : i, E = u.useState, O = u.useEffect, f = u.useLayoutEffect, v = u.useDebugValue, d = !1, t = !1, o = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? p : _;
|
|
95
|
+
m.useSyncExternalStore = u.useSyncExternalStore !== void 0 ? u.useSyncExternalStore : o, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
96
|
+
})()), m;
|
|
97
|
+
}
|
|
98
|
+
var w;
|
|
99
|
+
function D() {
|
|
100
|
+
return w || (w = 1, process.env.NODE_ENV === "production" ? l.exports = A() : l.exports = g()), l.exports;
|
|
101
|
+
}
|
|
102
|
+
var G = D();
|
|
103
|
+
export {
|
|
104
|
+
G as s
|
|
105
|
+
};
|