@effect-app/vue-components 4.0.0-beta.2 → 4.0.0-beta.200

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.
Files changed (233) hide show
  1. package/README.md +36 -8
  2. package/dist/reset.css +52 -0
  3. package/dist/types/components/CommandButton.vue.d.ts +6 -4
  4. package/dist/types/components/OmegaForm/OmegaArray.vue.d.ts +1 -1
  5. package/dist/types/components/OmegaForm/OmegaAutoGen.vue.d.ts +2 -2
  6. package/dist/types/components/OmegaForm/OmegaErrorsInternal.vue.d.ts +1 -1
  7. package/dist/types/components/OmegaForm/OmegaFormInput.vue.d.ts +1 -1
  8. package/dist/types/components/OmegaForm/OmegaInput.vue.d.ts +1 -1
  9. package/dist/types/components/OmegaForm/OmegaInternalInput.vue.d.ts +2 -1
  10. package/dist/types/components/OmegaForm/OmegaWrapper.vue.d.ts +1 -1
  11. package/dist/types/components/OmegaForm/createUseFormWithCustomInput.d.ts +2 -2
  12. package/dist/types/components/OmegaForm/errors.d.ts +33 -0
  13. package/dist/types/components/OmegaForm/getOmegaStore.d.ts +1 -1
  14. package/dist/types/components/OmegaForm/hocs.d.ts +3 -0
  15. package/dist/types/components/OmegaForm/index.d.ts +13 -3
  16. package/dist/types/components/OmegaForm/inputs.d.ts +4 -0
  17. package/dist/types/components/OmegaForm/meta/checks.d.ts +4 -0
  18. package/dist/types/components/OmegaForm/meta/createMeta.d.ts +32 -0
  19. package/dist/types/components/OmegaForm/meta/defaults.d.ts +2 -0
  20. package/dist/types/components/OmegaForm/meta/redacted.d.ts +2 -0
  21. package/dist/types/components/OmegaForm/meta/types.d.ts +56 -0
  22. package/dist/types/components/OmegaForm/meta/walker.d.ts +18 -0
  23. package/dist/types/components/OmegaForm/persistency.d.ts +58 -0
  24. package/dist/types/components/OmegaForm/submit.d.ts +60 -0
  25. package/dist/types/components/OmegaForm/types.d.ts +281 -0
  26. package/dist/types/components/OmegaForm/useOmegaForm.d.ts +7 -215
  27. package/dist/types/components/OmegaForm/validation/localized.d.ts +10 -0
  28. package/dist/types/index.d.ts +0 -1
  29. package/dist/types/utils/index.d.ts +6 -7
  30. package/dist/vue-components.es.js +29 -44
  31. package/dist/vue-components10.es.js +5 -0
  32. package/dist/vue-components11.es.js +20 -0
  33. package/dist/vue-components12.es.js +49 -0
  34. package/dist/vue-components13.es.js +128 -0
  35. package/dist/vue-components14.es.js +65 -0
  36. package/dist/vue-components15.es.js +60 -0
  37. package/dist/vue-components16.es.js +22 -0
  38. package/dist/vue-components17.es.js +5 -0
  39. package/dist/vue-components18.es.js +80 -0
  40. package/dist/vue-components19.es.js +92 -0
  41. package/dist/vue-components2.es.js +11 -0
  42. package/dist/vue-components20.es.js +73 -0
  43. package/dist/vue-components21.es.js +12 -0
  44. package/dist/vue-components22.es.js +56 -0
  45. package/dist/vue-components23.es.js +5 -0
  46. package/dist/vue-components24.es.js +44 -0
  47. package/dist/vue-components25.es.js +5 -0
  48. package/dist/vue-components26.es.js +84 -0
  49. package/dist/vue-components28.es.js +8 -0
  50. package/dist/vue-components29.es.js +9 -0
  51. package/dist/vue-components3.es.js +86 -0
  52. package/dist/vue-components30.es.js +269 -0
  53. package/dist/vue-components32.es.js +8 -0
  54. package/dist/vue-components33.es.js +73 -0
  55. package/dist/vue-components34.es.js +5 -0
  56. package/dist/vue-components35.es.js +52 -0
  57. package/dist/vue-components36.es.js +5 -0
  58. package/dist/vue-components37.es.js +24 -0
  59. package/dist/vue-components38.es.js +5 -0
  60. package/dist/vue-components39.es.js +59 -0
  61. package/dist/vue-components4.es.js +5 -0
  62. package/dist/vue-components40.es.js +5 -0
  63. package/dist/vue-components41.es.js +12 -0
  64. package/dist/vue-components42.es.js +22 -0
  65. package/dist/vue-components44.es.js +9 -0
  66. package/dist/vue-components45.es.js +4 -0
  67. package/dist/vue-components46.es.js +38 -0
  68. package/dist/vue-components47.es.js +27 -0
  69. package/dist/vue-components48.es.js +28 -0
  70. package/dist/vue-components49.es.js +7 -0
  71. package/dist/vue-components5.es.js +24 -0
  72. package/dist/vue-components50.es.js +18 -0
  73. package/dist/vue-components51.es.js +36 -0
  74. package/dist/vue-components52.es.js +18 -0
  75. package/dist/vue-components53.es.js +21 -0
  76. package/dist/vue-components54.es.js +30 -0
  77. package/dist/vue-components55.es.js +7 -0
  78. package/dist/vue-components56.es.js +9 -0
  79. package/dist/vue-components57.es.js +38 -0
  80. package/dist/vue-components58.es.js +25 -0
  81. package/dist/vue-components59.es.js +128 -0
  82. package/dist/vue-components6.es.js +13 -0
  83. package/dist/vue-components60.es.js +24 -0
  84. package/dist/vue-components61.es.js +21 -0
  85. package/dist/vue-components62.es.js +9 -0
  86. package/dist/vue-components63.es.js +19 -0
  87. package/dist/vue-components64.es.js +5 -0
  88. package/dist/vue-components65.es.js +29 -0
  89. package/dist/vue-components66.es.js +5 -0
  90. package/dist/vue-components67.es.js +29 -0
  91. package/dist/vue-components68.es.js +6 -0
  92. package/dist/vue-components69.es.js +18 -0
  93. package/dist/vue-components7.es.js +13 -0
  94. package/dist/vue-components70.es.js +40 -0
  95. package/dist/vue-components71.es.js +81 -0
  96. package/dist/vue-components72.es.js +33 -0
  97. package/dist/vue-components73.es.js +19 -0
  98. package/dist/vue-components74.es.js +48 -0
  99. package/dist/vue-components8.es.js +35 -0
  100. package/dist/vue-components9.es.js +47 -0
  101. package/package.json +35 -31
  102. package/src/components/CommandButton.vue +55 -7
  103. package/src/components/OmegaForm/OmegaArray.vue +2 -4
  104. package/src/components/OmegaForm/OmegaAutoGen.vue +27 -31
  105. package/src/components/OmegaForm/OmegaErrorsInternal.vue +3 -4
  106. package/src/components/OmegaForm/OmegaFormInput.vue +1 -1
  107. package/src/components/OmegaForm/OmegaInput.vue +7 -36
  108. package/src/components/OmegaForm/OmegaInputVuetify.vue +5 -2
  109. package/src/components/OmegaForm/OmegaInternalInput.vue +21 -11
  110. package/src/components/OmegaForm/OmegaTaggedUnion.vue +2 -1
  111. package/src/components/OmegaForm/OmegaTaggedUnionInternal.vue +1 -1
  112. package/src/components/OmegaForm/OmegaWrapper.vue +1 -1
  113. package/src/components/OmegaForm/blockDialog.ts +18 -6
  114. package/src/components/OmegaForm/createUseFormWithCustomInput.ts +2 -1
  115. package/src/components/OmegaForm/errors.ts +136 -0
  116. package/src/components/OmegaForm/getOmegaStore.ts +1 -1
  117. package/src/components/OmegaForm/hocs.ts +19 -0
  118. package/src/components/OmegaForm/index.ts +16 -4
  119. package/src/components/OmegaForm/inputs.ts +22 -0
  120. package/src/components/OmegaForm/meta/checks.ts +81 -0
  121. package/src/components/OmegaForm/meta/createMeta.ts +138 -0
  122. package/src/components/OmegaForm/meta/defaults.ts +132 -0
  123. package/src/components/OmegaForm/meta/redacted.ts +66 -0
  124. package/src/components/OmegaForm/meta/types.ts +78 -0
  125. package/src/components/OmegaForm/meta/walker.ts +248 -0
  126. package/src/components/OmegaForm/persistency.ts +247 -0
  127. package/src/components/OmegaForm/submit.ts +128 -0
  128. package/src/components/OmegaForm/types.ts +751 -0
  129. package/src/components/OmegaForm/useOmegaForm.ts +58 -895
  130. package/src/components/OmegaForm/validation/localized.ts +202 -0
  131. package/src/index.ts +0 -1
  132. package/src/reset.css +52 -0
  133. package/src/utils/index.ts +9 -10
  134. package/dist/types/components/OmegaForm/OmegaFormStuff.d.ts +0 -157
  135. package/dist/types/constants/index.d.ts +0 -1
  136. package/dist/vue-components.es10.js +0 -237
  137. package/dist/vue-components.es100.js +0 -4
  138. package/dist/vue-components.es11.js +0 -32
  139. package/dist/vue-components.es12.js +0 -439
  140. package/dist/vue-components.es13.js +0 -49
  141. package/dist/vue-components.es14.js +0 -4
  142. package/dist/vue-components.es15.js +0 -4
  143. package/dist/vue-components.es16.js +0 -725
  144. package/dist/vue-components.es17.js +0 -143
  145. package/dist/vue-components.es18.js +0 -6
  146. package/dist/vue-components.es19.js +0 -13
  147. package/dist/vue-components.es2.js +0 -30
  148. package/dist/vue-components.es20.js +0 -5
  149. package/dist/vue-components.es21.js +0 -26
  150. package/dist/vue-components.es22.js +0 -6
  151. package/dist/vue-components.es23.js +0 -10
  152. package/dist/vue-components.es24.js +0 -57
  153. package/dist/vue-components.es25.js +0 -71
  154. package/dist/vue-components.es26.js +0 -8
  155. package/dist/vue-components.es27.js +0 -8
  156. package/dist/vue-components.es28.js +0 -5
  157. package/dist/vue-components.es29.js +0 -5
  158. package/dist/vue-components.es3.js +0 -16
  159. package/dist/vue-components.es30.js +0 -4
  160. package/dist/vue-components.es31.js +0 -4
  161. package/dist/vue-components.es32.js +0 -4
  162. package/dist/vue-components.es33.js +0 -4
  163. package/dist/vue-components.es34.js +0 -19
  164. package/dist/vue-components.es35.js +0 -13
  165. package/dist/vue-components.es36.js +0 -320
  166. package/dist/vue-components.es37.js +0 -563
  167. package/dist/vue-components.es38.js +0 -29
  168. package/dist/vue-components.es39.js +0 -54
  169. package/dist/vue-components.es4.js +0 -52
  170. package/dist/vue-components.es40.js +0 -66
  171. package/dist/vue-components.es41.js +0 -6
  172. package/dist/vue-components.es42.js +0 -6
  173. package/dist/vue-components.es43.js +0 -26
  174. package/dist/vue-components.es44.js +0 -77
  175. package/dist/vue-components.es45.js +0 -42
  176. package/dist/vue-components.es46.js +0 -316
  177. package/dist/vue-components.es47.js +0 -101
  178. package/dist/vue-components.es48.js +0 -33
  179. package/dist/vue-components.es49.js +0 -4
  180. package/dist/vue-components.es5.js +0 -52
  181. package/dist/vue-components.es50.js +0 -4
  182. package/dist/vue-components.es51.js +0 -4
  183. package/dist/vue-components.es52.js +0 -113
  184. package/dist/vue-components.es54.js +0 -9
  185. package/dist/vue-components.es55.js +0 -34
  186. package/dist/vue-components.es57.js +0 -194
  187. package/dist/vue-components.es59.js +0 -40
  188. package/dist/vue-components.es6.js +0 -69
  189. package/dist/vue-components.es60.js +0 -85
  190. package/dist/vue-components.es61.js +0 -43
  191. package/dist/vue-components.es62.js +0 -7
  192. package/dist/vue-components.es63.js +0 -6
  193. package/dist/vue-components.es64.js +0 -25
  194. package/dist/vue-components.es65.js +0 -7
  195. package/dist/vue-components.es66.js +0 -23
  196. package/dist/vue-components.es67.js +0 -32
  197. package/dist/vue-components.es68.js +0 -24
  198. package/dist/vue-components.es69.js +0 -14
  199. package/dist/vue-components.es7.js +0 -83
  200. package/dist/vue-components.es70.js +0 -7
  201. package/dist/vue-components.es71.js +0 -21
  202. package/dist/vue-components.es72.js +0 -11
  203. package/dist/vue-components.es73.js +0 -33
  204. package/dist/vue-components.es74.js +0 -50
  205. package/dist/vue-components.es75.js +0 -28
  206. package/dist/vue-components.es76.js +0 -103
  207. package/dist/vue-components.es77.js +0 -84
  208. package/dist/vue-components.es78.js +0 -23
  209. package/dist/vue-components.es79.js +0 -14
  210. package/dist/vue-components.es8.js +0 -63
  211. package/dist/vue-components.es80.js +0 -115
  212. package/dist/vue-components.es81.js +0 -5
  213. package/dist/vue-components.es82.js +0 -34
  214. package/dist/vue-components.es83.js +0 -4
  215. package/dist/vue-components.es84.js +0 -4
  216. package/dist/vue-components.es85.js +0 -18
  217. package/dist/vue-components.es86.js +0 -17
  218. package/dist/vue-components.es87.js +0 -72
  219. package/dist/vue-components.es88.js +0 -10
  220. package/dist/vue-components.es89.js +0 -4
  221. package/dist/vue-components.es9.js +0 -21
  222. package/dist/vue-components.es90.js +0 -17
  223. package/dist/vue-components.es91.js +0 -13
  224. package/dist/vue-components.es92.js +0 -67
  225. package/dist/vue-components.es93.js +0 -58
  226. package/dist/vue-components.es94.js +0 -19
  227. package/dist/vue-components.es95.js +0 -35
  228. package/dist/vue-components.es96.js +0 -31
  229. package/dist/vue-components.es97.js +0 -44
  230. package/dist/vue-components.es98.js +0 -4
  231. package/dist/vue-components.es99.js +0 -46
  232. package/src/components/OmegaForm/OmegaFormStuff.ts +0 -1174
  233. package/src/constants/index.ts +0 -1
@@ -1,66 +0,0 @@
1
- import { symbol as r, equals as c } from "./vue-components.es76.js";
2
- import { format as m } from "./vue-components.es60.js";
3
- import { symbol as n, hash as o, combine as u } from "./vue-components.es77.js";
4
- import { toJson as l } from "./vue-components.es86.js";
5
- import { hasProperty as p } from "./vue-components.es38.js";
6
- import { YieldableProto as _, PipeInspectableProto as f, exitFail as g, NoSuchElementError as b, exitSucceed as O } from "./vue-components.es36.js";
7
- const s = "~effect/data/Option", a = {
8
- [s]: {
9
- _A: (t) => t
10
- },
11
- ...f,
12
- ..._
13
- }, S = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(a), {
14
- _tag: "Some",
15
- _op: "Some",
16
- [r](t) {
17
- return i(t) && P(t) && c(this.value, t.value);
18
- },
19
- [n]() {
20
- return u(o(this._tag))(o(this.value));
21
- },
22
- toString() {
23
- return `some(${m(this.value)})`;
24
- },
25
- toJSON() {
26
- return {
27
- _id: "Option",
28
- _tag: this._tag,
29
- value: l(this.value)
30
- };
31
- },
32
- asEffect() {
33
- return O(this.value);
34
- }
35
- }), h = /* @__PURE__ */ o("None"), N = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(a), {
36
- _tag: "None",
37
- _op: "None",
38
- [r](t) {
39
- return i(t) && v(t);
40
- },
41
- [n]() {
42
- return h;
43
- },
44
- toString() {
45
- return "none()";
46
- },
47
- toJSON() {
48
- return {
49
- _id: "Option",
50
- _tag: this._tag
51
- };
52
- },
53
- asEffect() {
54
- return g(new b());
55
- }
56
- }), i = (t) => p(t, s), v = (t) => t._tag === "None", P = (t) => t._tag === "Some", I = /* @__PURE__ */ Object.create(N), $ = (t) => {
57
- const e = Object.create(S);
58
- return e.value = t, e;
59
- };
60
- export {
61
- v as isNone,
62
- i as isOption,
63
- P as isSome,
64
- I as none,
65
- $ as some
66
- };
@@ -1,6 +0,0 @@
1
- import { causePretty as r, findError as o } from "./vue-components.es37.js";
2
- const n = o, e = r;
3
- export {
4
- n as findError,
5
- e as pretty
6
- };
@@ -1,6 +0,0 @@
1
- import { exitGetSuccess as s, exitIsSuccess as c } from "./vue-components.es37.js";
2
- const t = c, o = s;
3
- export {
4
- o as getSuccess,
5
- t as isSuccess
6
- };
@@ -1,26 +0,0 @@
1
- import { pipeArguments as s } from "./vue-components.es61.js";
2
- import { appendChecks as i, annotateKey as m, annotate as o } from "./vue-components.es16.js";
3
- import { makeUnsafe as c, makeOption as h } from "./vue-components.es47.js";
4
- const r = "~effect/Schema/Schema", u = {
5
- [r]: r,
6
- pipe() {
7
- return s(this, arguments);
8
- },
9
- annotate(t) {
10
- return this.rebuild(o(this.ast, t));
11
- },
12
- annotateKey(t) {
13
- return this.rebuild(m(this.ast, t));
14
- },
15
- check(...t) {
16
- return this.rebuild(i(this.ast, t));
17
- }
18
- };
19
- function p(t, a) {
20
- const e = Object.create(u);
21
- return a && Object.assign(e, a), e.ast = t, e.rebuild = (n) => p(n, a), e.makeUnsafe = c(e), e.makeOption = h(e), e;
22
- }
23
- export {
24
- r as TypeId,
25
- p as make
26
- };
@@ -1,77 +0,0 @@
1
- import { Reference as l } from "./vue-components.es80.js";
2
- const o = /* @__PURE__ */ l("effect/Scheduler", {
3
- defaultValue: () => new h()
4
- }), d = "setImmediate" in globalThis ? (u) => {
5
- const e = globalThis.setImmediate(u);
6
- return () => globalThis.clearImmediate(e);
7
- } : (u) => {
8
- const e = setTimeout(u, 0);
9
- return () => clearTimeout(e);
10
- };
11
- class r {
12
- buckets = [];
13
- scheduleTask(e, t) {
14
- const s = this.buckets, n = s.length;
15
- let c, i = 0;
16
- for (; i < n && !(s[i][0] > t); i++)
17
- c = s[i];
18
- c && c[0] === t ? c[1].push(e) : i === n ? s.push([t, [e]]) : s.splice(i, 0, [t, [e]]);
19
- }
20
- drain() {
21
- const e = this.buckets;
22
- return this.buckets = [], e;
23
- }
24
- }
25
- class h {
26
- tasks = /* @__PURE__ */ new r();
27
- running = void 0;
28
- executionMode;
29
- setImmediate;
30
- constructor(e = "async", t = d) {
31
- this.executionMode = e, this.setImmediate = t;
32
- }
33
- /**
34
- * @since 2.0.0
35
- */
36
- scheduleTask(e, t) {
37
- this.tasks.scheduleTask(e, t), this.running === void 0 && (this.running = this.setImmediate(this.afterScheduled));
38
- }
39
- /**
40
- * @since 2.0.0
41
- */
42
- afterScheduled = () => {
43
- this.running = void 0, this.runTasks();
44
- };
45
- /**
46
- * @since 2.0.0
47
- */
48
- runTasks() {
49
- const e = this.tasks.drain();
50
- for (let t = 0; t < e.length; t++) {
51
- const s = e[t][1];
52
- for (let n = 0; n < s.length; n++)
53
- s[n]();
54
- }
55
- }
56
- /**
57
- * @since 2.0.0
58
- */
59
- shouldYield(e) {
60
- return e.currentOpCount >= e.maxOpsBeforeYield;
61
- }
62
- /**
63
- * @since 2.0.0
64
- */
65
- flush() {
66
- for (; this.tasks.buckets.length > 0; )
67
- this.running !== void 0 && (this.running(), this.running = void 0), this.runTasks();
68
- }
69
- }
70
- const f = /* @__PURE__ */ l("effect/Scheduler/MaxOpsBeforeYield", {
71
- defaultValue: () => 2048
72
- });
73
- export {
74
- f as MaxOpsBeforeYield,
75
- h as MixedScheduler,
76
- o as Scheduler
77
- };
@@ -1,42 +0,0 @@
1
- import { succeed as i, mapEager as m, flatMapEager as c } from "./vue-components.es21.js";
2
- import { map as o } from "./vue-components.es23.js";
3
- import { Class as h } from "./vue-components.es61.js";
4
- class t extends h {
5
- run;
6
- constructor(r) {
7
- super(), this.run = r;
8
- }
9
- map(r) {
10
- return new t((s, u) => this.run(s, u).pipe(m(o(r))));
11
- }
12
- compose(r) {
13
- return e(this) ? r : e(r) ? this : new t((s, u) => this.run(s, u).pipe(c((f) => r.run(f, u))));
14
- }
15
- }
16
- const a = /* @__PURE__ */ new t(i);
17
- function e(n) {
18
- return n.run === a.run;
19
- }
20
- function d() {
21
- return a;
22
- }
23
- function p(n) {
24
- return g(o(n));
25
- }
26
- function g(n) {
27
- return new t((r) => i(n(r)));
28
- }
29
- function x() {
30
- return p(globalThis.String);
31
- }
32
- function E() {
33
- return p(globalThis.Number);
34
- }
35
- export {
36
- t as Getter,
37
- E as Number,
38
- x as String,
39
- d as passthrough,
40
- p as transform,
41
- g as transformOptional
42
- };
@@ -1,316 +0,0 @@
1
- import { format as u, formatPath as _ } from "./vue-components.es60.js";
2
- import { getExpected as h } from "./vue-components.es90.js";
3
- import { some as d, isNone as v } from "./vue-components.es23.js";
4
- import { hasProperty as O } from "./vue-components.es38.js";
5
- const g = "~effect/SchemaIssue/Issue";
6
- function F(t) {
7
- return O(t, g);
8
- }
9
- class a {
10
- [g] = g;
11
- toString() {
12
- return K(this);
13
- }
14
- }
15
- class b extends a {
16
- _tag = "Filter";
17
- /**
18
- * The input value that caused the issue.
19
- */
20
- actual;
21
- /**
22
- * The filter that failed.
23
- */
24
- filter;
25
- /**
26
- * The issue that occurred.
27
- */
28
- issue;
29
- constructor(e, s, n) {
30
- super(), this.actual = e, this.filter = s, this.issue = n;
31
- }
32
- }
33
- class A extends a {
34
- _tag = "Encoding";
35
- /**
36
- * The schema that caused the issue.
37
- */
38
- ast;
39
- /**
40
- * The input value that caused the issue.
41
- */
42
- actual;
43
- /**
44
- * The issue that occurred.
45
- */
46
- issue;
47
- constructor(e, s, n) {
48
- super(), this.ast = e, this.actual = s, this.issue = n;
49
- }
50
- }
51
- class M extends a {
52
- _tag = "Pointer";
53
- /**
54
- * The path to the location in the input that caused the issue.
55
- */
56
- path;
57
- /**
58
- * The issue that occurred.
59
- */
60
- issue;
61
- constructor(e, s) {
62
- super(), this.path = e, this.issue = s;
63
- }
64
- }
65
- class P extends a {
66
- _tag = "MissingKey";
67
- /**
68
- * The metadata for the issue.
69
- */
70
- annotations;
71
- constructor(e) {
72
- super(), this.annotations = e;
73
- }
74
- }
75
- class T extends a {
76
- _tag = "UnexpectedKey";
77
- /**
78
- * The schema that caused the issue.
79
- */
80
- ast;
81
- /**
82
- * The input value that caused the issue.
83
- */
84
- actual;
85
- constructor(e, s) {
86
- super(), this.ast = e, this.actual = s;
87
- }
88
- }
89
- class S extends a {
90
- _tag = "Composite";
91
- /**
92
- * The schema that caused the issue.
93
- */
94
- ast;
95
- /**
96
- * The input value that caused the issue.
97
- */
98
- actual;
99
- /**
100
- * The issues that occurred.
101
- */
102
- issues;
103
- constructor(e, s, n) {
104
- super(), this.ast = e, this.actual = s, this.issues = n;
105
- }
106
- }
107
- class D extends a {
108
- _tag = "InvalidType";
109
- /**
110
- * The schema that caused the issue.
111
- */
112
- ast;
113
- /**
114
- * The input value that caused the issue.
115
- */
116
- actual;
117
- constructor(e, s) {
118
- super(), this.ast = e, this.actual = s;
119
- }
120
- }
121
- class f extends a {
122
- _tag = "InvalidValue";
123
- /**
124
- * The value that caused the issue.
125
- */
126
- actual;
127
- /**
128
- * The metadata for the issue.
129
- */
130
- annotations;
131
- constructor(e, s) {
132
- super(), this.actual = e, this.annotations = s;
133
- }
134
- }
135
- class j extends a {
136
- _tag = "AnyOf";
137
- /**
138
- * The schema that caused the issue.
139
- */
140
- ast;
141
- /**
142
- * The input value that caused the issue.
143
- */
144
- actual;
145
- /**
146
- * The issues that occurred.
147
- */
148
- issues;
149
- constructor(e, s, n) {
150
- super(), this.ast = e, this.actual = s, this.issues = n;
151
- }
152
- }
153
- class B extends a {
154
- _tag = "OneOf";
155
- /**
156
- * The schema that caused the issue.
157
- */
158
- ast;
159
- /**
160
- * The input value that caused the issue.
161
- */
162
- actual;
163
- /**
164
- * The schemas that were successful.
165
- */
166
- successes;
167
- constructor(e, s, n) {
168
- super(), this.ast = e, this.actual = s, this.successes = n;
169
- }
170
- }
171
- function G(t, e) {
172
- if (F(e))
173
- return e;
174
- if (e !== void 0)
175
- return typeof e == "boolean" ? e ? void 0 : new f(d(t)) : typeof e == "string" ? new f(d(t), {
176
- message: e
177
- }) : new M(e.path, new f(d(t), {
178
- message: e.message
179
- }));
180
- }
181
- const y = (t) => {
182
- const e = o(t);
183
- if (e !== void 0) return e;
184
- switch (t._tag) {
185
- case "InvalidType":
186
- return p(h(t.ast), m(t.actual));
187
- case "InvalidValue":
188
- return `Invalid data ${m(t.actual)}`;
189
- case "MissingKey":
190
- return "Missing key";
191
- case "UnexpectedKey":
192
- return `Unexpected key with value ${u(t.actual)}`;
193
- case "Forbidden":
194
- return "Forbidden operation";
195
- case "OneOf":
196
- return `Expected exactly one member to match the input ${u(t.actual)}`;
197
- }
198
- }, x = (t) => o(t.issue) ?? o(t);
199
- function L(t) {
200
- return (e) => ({
201
- issues: i(e, [], y, x)
202
- });
203
- }
204
- function p(t, e) {
205
- return `Expected ${t}, got ${e}`;
206
- }
207
- function i(t, e, s, n) {
208
- switch (t._tag) {
209
- case "Filter": {
210
- const r = n(t);
211
- return r !== void 0 ? [{
212
- path: e,
213
- message: r
214
- }] : t.issue._tag === "InvalidValue" ? [{
215
- path: e,
216
- message: p(I(t.filter), u(t.actual))
217
- }] : i(t.issue, e, s, n);
218
- }
219
- case "Encoding":
220
- return i(t.issue, e, s, n);
221
- case "Pointer":
222
- return i(t.issue, [...e, ...t.path], s, n);
223
- case "Composite":
224
- return t.issues.flatMap((r) => i(r, e, s, n));
225
- case "AnyOf": {
226
- const r = o(t);
227
- if (t.issues.length === 0) {
228
- if (r !== void 0) return [{
229
- path: e,
230
- message: r
231
- }];
232
- const l = p(h(t.ast), u(t.actual));
233
- return [{
234
- path: e,
235
- message: l
236
- }];
237
- }
238
- return t.issues.flatMap((l) => i(l, e, s, n));
239
- }
240
- default:
241
- return [{
242
- path: e,
243
- message: s(t)
244
- }];
245
- }
246
- }
247
- function I(t) {
248
- const e = t.annotations?.expected;
249
- if (typeof e == "string") return e;
250
- switch (t._tag) {
251
- case "Filter":
252
- return "<filter>";
253
- case "FilterGroup":
254
- return t.checks.map((s) => I(s)).join(" & ");
255
- }
256
- }
257
- function w() {
258
- return (t) => i(t, [], y, x).map(E).join(`
259
- `);
260
- }
261
- const K = /* @__PURE__ */ w();
262
- function E(t) {
263
- let e = t.message;
264
- if (t.path && t.path.length > 0) {
265
- const s = _(t.path);
266
- e += `
267
- at ${s}`;
268
- }
269
- return e;
270
- }
271
- function o(t) {
272
- switch (t._tag) {
273
- case "InvalidType":
274
- case "OneOf":
275
- case "Composite":
276
- case "AnyOf":
277
- return c(t.ast.annotations);
278
- case "InvalidValue":
279
- case "Forbidden":
280
- return c(t.annotations);
281
- case "MissingKey":
282
- return c(t.annotations, "messageMissingKey");
283
- case "UnexpectedKey":
284
- return c(t.ast.annotations, "messageUnexpectedKey");
285
- case "Filter":
286
- return c(t.filter.annotations);
287
- case "Encoding":
288
- return o(t.issue);
289
- }
290
- }
291
- function c(t, e = "message") {
292
- const s = t?.[e];
293
- if (typeof s == "string") return s;
294
- }
295
- function m(t) {
296
- return v(t) ? "no value provided" : u(t.value);
297
- }
298
- export {
299
- j as AnyOf,
300
- S as Composite,
301
- A as Encoding,
302
- b as Filter,
303
- D as InvalidType,
304
- f as InvalidValue,
305
- P as MissingKey,
306
- B as OneOf,
307
- M as Pointer,
308
- T as UnexpectedKey,
309
- x as defaultCheckHook,
310
- K as defaultFormatter,
311
- y as defaultLeafHook,
312
- F as isIssue,
313
- G as make,
314
- w as makeFormatterDefault,
315
- L as makeFormatterStandardSchemaV1
316
- };
@@ -1,101 +0,0 @@
1
- import { isArrayNonEmpty as O } from "./vue-components.es59.js";
2
- import { runSync as I, mapErrorEager as A, runSyncExit as U, flatMapEager as l, fail as E, succeed as _, catchEager as D } from "./vue-components.es21.js";
3
- import { getSuccess as L } from "./vue-components.es42.js";
4
- import { memoize as N } from "./vue-components.es39.js";
5
- import { resolve as h } from "./vue-components.es90.js";
6
- import { some as V, isSome as S } from "./vue-components.es23.js";
7
- import { isFunction as b } from "./vue-components.es38.js";
8
- import { defaultParseOptions as j, toType as R, replaceEncoding as T, ClassTypeId as z, Link as F, isArrays as K, isObjects as M, isDeclaration as Y, collectIssues as v, STRUCTURAL_ANNOTATION_KEY as q } from "./vue-components.es16.js";
9
- import { InvalidValue as B, Encoding as G, Composite as k } from "./vue-components.es46.js";
10
- const m = /* @__PURE__ */ N((r) => {
11
- switch (r._tag) {
12
- case "Declaration": {
13
- const n = r.annotations?.[z];
14
- if (b(n)) {
15
- const c = n(r.typeParameters), t = m(c.to);
16
- return T(r, t === c.to ? [c] : [new F(t, c.transformation)]);
17
- }
18
- return r;
19
- }
20
- case "Objects":
21
- case "Arrays":
22
- return r.recur((n) => {
23
- const c = n.context?.defaultValue;
24
- return c ? T(m(n), c) : m(n);
25
- });
26
- case "Suspend":
27
- return r.recur(m);
28
- default:
29
- return r;
30
- }
31
- });
32
- function P(r) {
33
- const n = m(R(r.ast)), c = x(n);
34
- return (t, e) => c(t, e?.parseOptions);
35
- }
36
- function nr(r) {
37
- const n = P(r);
38
- return (c, t) => L(U(n(c, t)));
39
- }
40
- function tr(r) {
41
- const n = P(r);
42
- return (c, t) => I(A(n(c, t), (e) => new Error(e.toString(), {
43
- cause: e
44
- })));
45
- }
46
- function cr(r) {
47
- return x(r.ast);
48
- }
49
- function x(r) {
50
- const n = p(r);
51
- return (c, t) => l(n(V(c), t ?? j), (e) => e._tag === "None" ? E(new B(e)) : _(e.value));
52
- }
53
- const p = /* @__PURE__ */ N((r) => {
54
- let n;
55
- if (!r.context && !r.encoding && !r.checks)
56
- return (t, e) => (n ??= r.getParser(p), n(t, h(r)?.parseOptions ?? e));
57
- const c = K(r) || M(r) || Y(r) && r.typeParameters.length > 0;
58
- return (t, e) => {
59
- e = h(r)?.parseOptions ?? e;
60
- const y = r.encoding;
61
- let s;
62
- if (y) {
63
- const a = y, o = a.length;
64
- for (let i = o - 1; i >= 0; i--) {
65
- const u = a[i], g = u.to, w = p(g);
66
- if (s = s ? l(s, (d) => w(d, e)) : w(t, e), u.transformation._tag === "Transformation") {
67
- const d = u.transformation.decode;
68
- s = l(s, (C) => d.run(C, e));
69
- } else
70
- s = u.transformation.decode(s, e);
71
- }
72
- s = A(s, (i) => new G(r, t, i));
73
- }
74
- n ??= r.getParser(p);
75
- let f = s ? l(s, (a) => n(a, e)) : n(t, e);
76
- if (r.checks) {
77
- const a = r.checks;
78
- e?.errors === "all" && c && S(t) && (f = D(f, (o) => {
79
- const i = [];
80
- v(a.filter((g) => g.annotations?.[q]), t.value, i, r, e);
81
- const u = O(i) ? o._tag === "Composite" && o.ast === r ? new k(r, o.actual, [...o.issues, ...i]) : new k(r, t, [o, ...i]) : o;
82
- return E(u);
83
- })), f = l(f, (o) => {
84
- if (S(o)) {
85
- const i = o.value, u = [];
86
- if (v(a, i, u, r, e), O(u))
87
- return E(new k(r, o, u));
88
- }
89
- return _(o);
90
- });
91
- }
92
- return f;
93
- };
94
- });
95
- export {
96
- cr as decodeUnknownEffect,
97
- P as makeEffect,
98
- nr as makeOption,
99
- tr as makeUnsafe,
100
- x as run
101
- };
@@ -1,33 +0,0 @@
1
- import { hasProperty as c } from "./vue-components.es38.js";
2
- import { passthrough as t, Number as d, String as a } from "./vue-components.es45.js";
3
- const n = "~effect/SchemaTransformation/Transformation";
4
- class o {
5
- [n] = n;
6
- _tag = "Transformation";
7
- decode;
8
- encode;
9
- constructor(r, s) {
10
- this.decode = r, this.encode = s;
11
- }
12
- flip() {
13
- return new o(this.encode, this.decode);
14
- }
15
- compose(r) {
16
- return new o(this.decode.compose(r.decode), r.encode.compose(this.encode));
17
- }
18
- }
19
- function h(e) {
20
- return c(e, n);
21
- }
22
- const f = (e) => h(e) ? e : new o(e.decode, e.encode), i = /* @__PURE__ */ new o(/* @__PURE__ */ t(), /* @__PURE__ */ t());
23
- function p() {
24
- return i;
25
- }
26
- const g = /* @__PURE__ */ new o(/* @__PURE__ */ d(), /* @__PURE__ */ a());
27
- export {
28
- o as Transformation,
29
- h as isTransformation,
30
- f as make,
31
- g as numberFromString,
32
- p as passthrough
33
- };
@@ -1,4 +0,0 @@
1
- const o = (a) => a;
2
- export {
3
- o as lambda
4
- };