mlform 0.1.22 → 0.1.24

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 (261) hide show
  1. package/README.md +98 -229
  2. package/dist/builtins-jvAitKUC.js +560 -0
  3. package/dist/{design-Dr7o4rR9.js → design-D8zce4Mh.js} +13 -12
  4. package/dist/mlform/builtins.mjs +2 -2
  5. package/dist/mlform/design.mjs +1 -1
  6. package/dist/mlform/kit.mjs +435 -275
  7. package/dist/mlform/primitives.mjs +2 -2
  8. package/dist/mlform/runtime.mjs +1 -1
  9. package/dist/mlform/schema.mjs +1 -1
  10. package/dist/{primitives-ljp3c5R8.js → primitives-ChLgMFl9.js} +452 -450
  11. package/dist/{runtime-C9ZioNpI.js → runtime-B_vnmwya.js} +9 -9
  12. package/dist/{schema-CiCjXECD.js → schema-C34LJ8aV.js} +99 -110
  13. package/dist/types/{src/builtins → builtins}/definitions/collections.d.ts +12 -12
  14. package/dist/types/{src/builtins → builtins}/definitions/fields/boolean.d.ts +1 -1
  15. package/dist/types/{src/builtins → builtins}/definitions/fields/category.d.ts +1 -1
  16. package/dist/types/{src/builtins → builtins}/definitions/fields/date.d.ts +1 -1
  17. package/dist/types/{src/builtins → builtins}/definitions/fields/long-text.d.ts +1 -1
  18. package/dist/types/{src/builtins → builtins}/definitions/fields/mapped-category.d.ts +1 -1
  19. package/dist/types/{src/builtins → builtins}/definitions/fields/multi-choice.d.ts +1 -1
  20. package/dist/types/{src/builtins → builtins}/definitions/fields/number.d.ts +1 -1
  21. package/dist/types/{src/builtins → builtins}/definitions/fields/onehot-category.d.ts +1 -1
  22. package/dist/types/{src/builtins → builtins}/definitions/fields/rating.d.ts +1 -1
  23. package/dist/types/{src/builtins → builtins}/definitions/fields/series-helpers.d.ts +4 -4
  24. package/dist/types/{src/builtins → builtins}/definitions/fields/single-choice.d.ts +1 -1
  25. package/dist/types/{src/builtins → builtins}/definitions/fields/text.d.ts +1 -1
  26. package/dist/types/{src/builtins → builtins}/definitions/reports/classifier.d.ts +1 -1
  27. package/dist/types/{src/builtins → builtins}/definitions/reports/regressor.d.ts +1 -1
  28. package/dist/types/{src/builtins → builtins}/definitions/shared.d.ts +3 -28
  29. package/dist/types/{src/builtins → builtins}/index.d.ts +2 -3
  30. package/dist/types/{src/builtins → builtins}/mapped-category-behavior.d.ts +1 -1
  31. package/dist/types/builtins/registry.d.ts +2 -0
  32. package/dist/types/kit/builtin-presenters.d.ts +2 -0
  33. package/dist/types/{src/kit → kit}/defaults.d.ts +3 -3
  34. package/dist/types/{src/kit → kit}/index.d.ts +3 -0
  35. package/dist/types/{src/kit → kit}/kinds/define-field-kind.d.ts +4 -3
  36. package/dist/types/{src/kit → kit}/kinds/define-report-kind.d.ts +4 -3
  37. package/dist/types/kit/kinds/register-kind.d.ts +6 -0
  38. package/dist/types/{src/kit → kit}/layout-helpers.d.ts +1 -1
  39. package/dist/types/{src/kit → kit}/layout-node-render.d.ts +1 -1
  40. package/dist/types/{src/kit → kit}/layout-root.d.ts +1 -1
  41. package/dist/types/{src/kit → kit}/layout-utils.d.ts +1 -1
  42. package/dist/types/{src/kit → kit}/layout.d.ts +1 -1
  43. package/dist/types/{src/kit → kit}/mount-types.d.ts +5 -3
  44. package/dist/types/kit/plugin.d.ts +19 -0
  45. package/dist/types/kit/registry-pack.d.ts +16 -0
  46. package/dist/types/{src/kit → kit}/tabs-root.d.ts +1 -1
  47. package/dist/types/{src/kit → kit}/view-core-types.d.ts +4 -2
  48. package/dist/types/{src/kit → kit}/view-navigation.d.ts +1 -1
  49. package/dist/types/{src/kit → kit}/view-snapshot-cache.d.ts +2 -2
  50. package/dist/types/{src/kit → kit}/view-snapshot.d.ts +2 -2
  51. package/dist/types/{src/kit → kit}/wizard-root.d.ts +1 -1
  52. package/dist/types/{src/primitives → primitives}/descriptors/registry.d.ts +2 -1
  53. package/dist/types/{src/primitives → primitives}/index.d.ts +1 -1
  54. package/dist/types/primitives/mount-form.d.ts +4 -0
  55. package/dist/types/{src/runtime → runtime}/errors.d.ts +1 -1
  56. package/dist/types/{src/runtime → runtime}/runtime-behaviors.d.ts +1 -1
  57. package/dist/types/{src/runtime → runtime}/submission/request.d.ts +1 -1
  58. package/dist/types/{src/runtime → runtime}/submission/types.d.ts +1 -1
  59. package/dist/types/{src/runtime → runtime}/types/behavior.d.ts +2 -2
  60. package/dist/types/{src/runtime → runtime}/types/field.d.ts +3 -3
  61. package/dist/types/{src/runtime → runtime}/types/form.d.ts +3 -2
  62. package/dist/types/{src/runtime → runtime}/types/index.d.ts +1 -0
  63. package/dist/types/{src/runtime → runtime}/types/registry.d.ts +1 -1
  64. package/dist/types/{src/runtime → runtime}/types/report.d.ts +5 -5
  65. package/dist/types/runtime/types/status.d.ts +1 -0
  66. package/dist/types/{src/runtime → runtime}/types/transport.d.ts +5 -5
  67. package/dist/types/{src/runtime → runtime}/validation/form.d.ts +1 -1
  68. package/dist/types/{src/schema → schema}/index.d.ts +1 -0
  69. package/dist/types/{src/schema → schema}/mapped-to.d.ts +2 -6
  70. package/dist/types/{src/schema → schema}/normalize.d.ts +2 -1
  71. package/dist/types/{src/schema → schema}/registry.d.ts +3 -1
  72. package/dist/types/{src/schema → schema}/types/field.d.ts +1 -1
  73. package/dist/types/schema/types/mapping.d.ts +6 -0
  74. package/dist/types/{src/schema → schema}/types/report.d.ts +1 -1
  75. package/dist/types/{src/schema → schema}/types/submit.d.ts +1 -1
  76. package/dist/types/{src/schema → schema}/validation.d.ts +3 -1
  77. package/dist/types/{src/transport → transport}/types.d.ts +1 -1
  78. package/package.json +27 -20
  79. package/dist/builtins-B2U_ViF6.js +0 -749
  80. package/dist/types/src/builtins/registry-pack.d.ts +0 -10
  81. package/dist/types/src/kit/kinds/register-kind.d.ts +0 -5
  82. package/dist/types/src/primitives/mount-form.d.ts +0 -4
  83. /package/dist/types/{src/builtins → builtins}/constants.d.ts +0 -0
  84. /package/dist/types/{src/builtins → builtins}/definitions/fields/series.d.ts +0 -0
  85. /package/dist/types/{src/builtins → builtins}/definitions/fields/value-helpers.d.ts +0 -0
  86. /package/dist/types/{src/builtins → builtins}/definitions/index.d.ts +0 -0
  87. /package/dist/types/{src/design → design}/constants.d.ts +0 -0
  88. /package/dist/types/{src/design → design}/contract/component-keys.d.ts +0 -0
  89. /package/dist/types/{src/design → design}/contract/component-tokens.d.ts +0 -0
  90. /package/dist/types/{src/design → design}/contract/global-tokens.d.ts +0 -0
  91. /package/dist/types/{src/design → design}/contract/index.d.ts +0 -0
  92. /package/dist/types/{src/design → design}/contract/token-keys.d.ts +0 -0
  93. /package/dist/types/{src/design → design}/index.d.ts +0 -0
  94. /package/dist/types/{src/design → design}/recipes/collections.d.ts +0 -0
  95. /package/dist/types/{src/design → design}/recipes/contrast.d.ts +0 -0
  96. /package/dist/types/{src/design → design}/recipes/default.d.ts +0 -0
  97. /package/dist/types/{src/design → design}/recipes/index.d.ts +0 -0
  98. /package/dist/types/{src/design → design}/recipes/minimal.d.ts +0 -0
  99. /package/dist/types/{src/design → design}/recipes/soft.d.ts +0 -0
  100. /package/dist/types/{src/design → design}/registry/builtins.d.ts +0 -0
  101. /package/dist/types/{src/design → design}/registry/create-registry.d.ts +0 -0
  102. /package/dist/types/{src/design → design}/registry/deep-freeze.d.ts +0 -0
  103. /package/dist/types/{src/design → design}/registry/define-recipe.d.ts +0 -0
  104. /package/dist/types/{src/design → design}/registry/define-theme.d.ts +0 -0
  105. /package/dist/types/{src/design → design}/registry/define-token-maps.d.ts +0 -0
  106. /package/dist/types/{src/design → design}/registry/index.d.ts +0 -0
  107. /package/dist/types/{src/design → design}/resolve/diagnostics.d.ts +0 -0
  108. /package/dist/types/{src/design → design}/resolve/index.d.ts +0 -0
  109. /package/dist/types/{src/design → design}/resolve/merge-config.d.ts +0 -0
  110. /package/dist/types/{src/design → design}/resolve/migrate-tokens.d.ts +0 -0
  111. /package/dist/types/{src/design → design}/resolve/resolve-design.d.ts +0 -0
  112. /package/dist/types/{src/design → design}/resolve/resolve-mode.d.ts +0 -0
  113. /package/dist/types/{src/design → design}/resolve/resolve-recipe.d.ts +0 -0
  114. /package/dist/types/{src/design → design}/resolve/resolve-theme.d.ts +0 -0
  115. /package/dist/types/{src/design → design}/resolve/resolve-tokens.d.ts +0 -0
  116. /package/dist/types/{src/design → design}/runtime/apply-tokens.d.ts +0 -0
  117. /package/dist/types/{src/design → design}/runtime/attach-design.d.ts +0 -0
  118. /package/dist/types/{src/design → design}/runtime/controller-helpers.d.ts +0 -0
  119. /package/dist/types/{src/design → design}/runtime/create-stylesheet.d.ts +0 -0
  120. /package/dist/types/{src/design → design}/runtime/declarations.d.ts +0 -0
  121. /package/dist/types/{src/design → design}/runtime/design-controller.d.ts +0 -0
  122. /package/dist/types/{src/design → design}/runtime/fingerprint.d.ts +0 -0
  123. /package/dist/types/{src/design → design}/runtime/host-observer.d.ts +0 -0
  124. /package/dist/types/{src/design → design}/runtime/host-state.d.ts +0 -0
  125. /package/dist/types/{src/design → design}/runtime/hydrate-design.d.ts +0 -0
  126. /package/dist/types/{src/design → design}/runtime/hydration-state.d.ts +0 -0
  127. /package/dist/types/{src/design → design}/runtime/index.d.ts +0 -0
  128. /package/dist/types/{src/design → design}/runtime/inherited-scheme.d.ts +0 -0
  129. /package/dist/types/{src/design → design}/runtime/media.d.ts +0 -0
  130. /package/dist/types/{src/design → design}/themes/airbnb.d.ts +0 -0
  131. /package/dist/types/{src/design → design}/themes/clickhouse.d.ts +0 -0
  132. /package/dist/types/{src/design → design}/themes/cobalt.d.ts +0 -0
  133. /package/dist/types/{src/design → design}/themes/collections.d.ts +0 -0
  134. /package/dist/types/{src/design → design}/themes/graphite.d.ts +0 -0
  135. /package/dist/types/{src/design → design}/themes/index.d.ts +0 -0
  136. /package/dist/types/{src/design → design}/themes/neutral.d.ts +0 -0
  137. /package/dist/types/{src/design → design}/themes/sage.d.ts +0 -0
  138. /package/dist/types/{src/design → design}/themes/sunset.d.ts +0 -0
  139. /package/dist/types/{src/design → design}/tokens/base.d.ts +0 -0
  140. /package/dist/types/{src/design → design}/tokens/contrast.d.ts +0 -0
  141. /package/dist/types/{src/design → design}/tokens/density.d.ts +0 -0
  142. /package/dist/types/{src/design → design}/tokens/forced-colors.d.ts +0 -0
  143. /package/dist/types/{src/design → design}/tokens/index.d.ts +0 -0
  144. /package/dist/types/{src/design → design}/tokens/motion.d.ts +0 -0
  145. /package/dist/types/{src/design → design}/types.d.ts +0 -0
  146. /package/dist/types/{src/kit → kit}/constants.d.ts +0 -0
  147. /package/dist/types/{src/kit → kit}/disclosure-root-styles.d.ts +0 -0
  148. /package/dist/types/{src/kit → kit}/error-navigation.d.ts +0 -0
  149. /package/dist/types/{src/kit → kit}/kinds/index.d.ts +0 -0
  150. /package/dist/types/{src/kit → kit}/layout-node-resolver.d.ts +0 -0
  151. /package/dist/types/{src/kit → kit}/layout-types.d.ts +0 -0
  152. /package/dist/types/{src/kit → kit}/mount-form.d.ts +0 -0
  153. /package/dist/types/{src/kit → kit}/panel-nav.d.ts +0 -0
  154. /package/dist/types/{src/kit → kit}/step-indicator.d.ts +0 -0
  155. /package/dist/types/{src/kit → kit}/tabs-root-styles.d.ts +0 -0
  156. /package/dist/types/{src/kit → kit}/types.d.ts +0 -0
  157. /package/dist/types/{src/kit → kit}/view-layout-state.d.ts +0 -0
  158. /package/dist/types/{src/kit → kit}/view-types.d.ts +0 -0
  159. /package/dist/types/{src/kit → kit}/view.d.ts +0 -0
  160. /package/dist/types/{src/kit → kit}/wizard-constants.d.ts +0 -0
  161. /package/dist/types/{src/kit → kit}/wizard-root-styles.d.ts +0 -0
  162. /package/dist/types/{src/primitives → primitives}/base-async-report-element.d.ts +0 -0
  163. /package/dist/types/{src/primitives → primitives}/base-field-element.d.ts +0 -0
  164. /package/dist/types/{src/primitives → primitives}/base-report-element.d.ts +0 -0
  165. /package/dist/types/{src/primitives → primitives}/components/declarative-field.d.ts +0 -0
  166. /package/dist/types/{src/primitives → primitives}/components/declarative-report.d.ts +0 -0
  167. /package/dist/types/{src/primitives → primitives}/components/descriptor-content.d.ts +0 -0
  168. /package/dist/types/{src/primitives → primitives}/components/error-focus.d.ts +0 -0
  169. /package/dist/types/{src/primitives → primitives}/components/field-frame-feedback.d.ts +0 -0
  170. /package/dist/types/{src/primitives → primitives}/components/field-frame-styles.d.ts +0 -0
  171. /package/dist/types/{src/primitives → primitives}/components/field-frame.d.ts +0 -0
  172. /package/dist/types/{src/primitives → primitives}/components/form-errors.d.ts +0 -0
  173. /package/dist/types/{src/primitives → primitives}/components/form-root-presenters.d.ts +0 -0
  174. /package/dist/types/{src/primitives → primitives}/components/form-root-split-styles.d.ts +0 -0
  175. /package/dist/types/{src/primitives → primitives}/components/form-root-state.d.ts +0 -0
  176. /package/dist/types/{src/primitives → primitives}/components/form-root-styles.d.ts +0 -0
  177. /package/dist/types/{src/primitives → primitives}/components/form-root-templates.d.ts +0 -0
  178. /package/dist/types/{src/primitives → primitives}/components/form-root.d.ts +0 -0
  179. /package/dist/types/{src/primitives → primitives}/components/mounted-report.d.ts +0 -0
  180. /package/dist/types/{src/primitives → primitives}/components/report-frame.d.ts +0 -0
  181. /package/dist/types/{src/primitives → primitives}/components/submit-button.d.ts +0 -0
  182. /package/dist/types/{src/primitives → primitives}/components/unsupported-component.d.ts +0 -0
  183. /package/dist/types/{src/primitives → primitives}/constants.d.ts +0 -0
  184. /package/dist/types/{src/primitives → primitives}/controller-binding.d.ts +0 -0
  185. /package/dist/types/{src/primitives → primitives}/controller-types.d.ts +0 -0
  186. /package/dist/types/{src/primitives → primitives}/descriptor-resolution.d.ts +0 -0
  187. /package/dist/types/{src/primitives → primitives}/descriptors/content.d.ts +0 -0
  188. /package/dist/types/{src/primitives → primitives}/descriptors/field.d.ts +0 -0
  189. /package/dist/types/{src/primitives → primitives}/descriptors/index.d.ts +0 -0
  190. /package/dist/types/{src/primitives → primitives}/descriptors/report.d.ts +0 -0
  191. /package/dist/types/{src/primitives → primitives}/fields/boolean-field.d.ts +0 -0
  192. /package/dist/types/{src/primitives → primitives}/fields/category-field.d.ts +0 -0
  193. /package/dist/types/{src/primitives → primitives}/fields/date-field.d.ts +0 -0
  194. /package/dist/types/{src/primitives → primitives}/fields/long-text-field.d.ts +0 -0
  195. /package/dist/types/{src/primitives → primitives}/fields/multi-choice-field.d.ts +0 -0
  196. /package/dist/types/{src/primitives → primitives}/fields/number-field.d.ts +0 -0
  197. /package/dist/types/{src/primitives → primitives}/fields/rating-field.d.ts +0 -0
  198. /package/dist/types/{src/primitives → primitives}/fields/series-field-helpers.d.ts +0 -0
  199. /package/dist/types/{src/primitives → primitives}/fields/series-field-renderers.d.ts +0 -0
  200. /package/dist/types/{src/primitives → primitives}/fields/series-field-styles.d.ts +0 -0
  201. /package/dist/types/{src/primitives → primitives}/fields/series-field.d.ts +0 -0
  202. /package/dist/types/{src/primitives → primitives}/fields/single-choice-field.d.ts +0 -0
  203. /package/dist/types/{src/primitives → primitives}/fields/text-field.d.ts +0 -0
  204. /package/dist/types/{src/primitives → primitives}/register.d.ts +0 -0
  205. /package/dist/types/{src/primitives → primitives}/registry.d.ts +0 -0
  206. /package/dist/types/{src/primitives → primitives}/reports/classifier-report.d.ts +0 -0
  207. /package/dist/types/{src/primitives → primitives}/reports/regressor-report.d.ts +0 -0
  208. /package/dist/types/{src/primitives → primitives}/request-runner.d.ts +0 -0
  209. /package/dist/types/{src/primitives → primitives}/types.d.ts +0 -0
  210. /package/dist/types/{src/primitives → primitives}/utils.d.ts +0 -0
  211. /package/dist/types/{src/runtime → runtime}/comparison.d.ts +0 -0
  212. /package/dist/types/{src/runtime → runtime}/create-runtime-helpers.d.ts +0 -0
  213. /package/dist/types/{src/runtime → runtime}/create-runtime.d.ts +0 -0
  214. /package/dist/types/{src/runtime → runtime}/equality.d.ts +0 -0
  215. /package/dist/types/{src/runtime → runtime}/fields/controller.d.ts +0 -0
  216. /package/dist/types/{src/runtime → runtime}/fields/index.d.ts +0 -0
  217. /package/dist/types/{src/runtime → runtime}/fields/state-calculations.d.ts +0 -0
  218. /package/dist/types/{src/runtime → runtime}/fields/state.d.ts +0 -0
  219. /package/dist/types/{src/runtime → runtime}/form.d.ts +0 -0
  220. /package/dist/types/{src/runtime → runtime}/index.d.ts +0 -0
  221. /package/dist/types/{src/runtime → runtime}/paths.d.ts +0 -0
  222. /package/dist/types/{src/runtime → runtime}/reports/controller.d.ts +0 -0
  223. /package/dist/types/{src/runtime → runtime}/reports/index.d.ts +0 -0
  224. /package/dist/types/{src/runtime → runtime}/runtime-controller.d.ts +0 -0
  225. /package/dist/types/{src/runtime → runtime}/runtime-refresh.d.ts +0 -0
  226. /package/dist/types/{src/runtime → runtime}/runtime-values.d.ts +0 -0
  227. /package/dist/types/{src/runtime → runtime}/state/engine.d.ts +0 -0
  228. /package/dist/types/{src/runtime → runtime}/state/index.d.ts +0 -0
  229. /package/dist/types/{src/runtime → runtime}/state/snapshots.d.ts +0 -0
  230. /package/dist/types/{src/runtime → runtime}/state/store.d.ts +0 -0
  231. /package/dist/types/{src/runtime → runtime}/submission/abort.d.ts +0 -0
  232. /package/dist/types/{src/runtime → runtime}/submission/create-submitter.d.ts +0 -0
  233. /package/dist/types/{src/runtime → runtime}/submission/error-flow.d.ts +0 -0
  234. /package/dist/types/{src/runtime → runtime}/submission/index.d.ts +0 -0
  235. /package/dist/types/{src/runtime → runtime}/submission/lifecycle.d.ts +0 -0
  236. /package/dist/types/{src/runtime → runtime}/submission/multi-backend.d.ts +0 -0
  237. /package/dist/types/{src/runtime → runtime}/submission/pipeline.d.ts +0 -0
  238. /package/dist/types/{src/runtime → runtime}/submission/report-fetches.d.ts +0 -0
  239. /package/dist/types/{src/runtime → runtime}/submission/reports.d.ts +0 -0
  240. /package/dist/types/{src/runtime → runtime}/submission/result.d.ts +0 -0
  241. /package/dist/types/{src/runtime → runtime}/submission/snapshot.d.ts +0 -0
  242. /package/dist/types/{src/runtime → runtime}/submission/submitter.d.ts +0 -0
  243. /package/dist/types/{src/runtime → runtime}/submission/transport-response.d.ts +0 -0
  244. /package/dist/types/{src/runtime → runtime}/types/pipeline.d.ts +0 -0
  245. /package/dist/types/{src/runtime → runtime}/utils.d.ts +0 -0
  246. /package/dist/types/{src/runtime → runtime}/validation/conditions.d.ts +0 -0
  247. /package/dist/types/{src/runtime → runtime}/validation/field-state.d.ts +0 -0
  248. /package/dist/types/{src/runtime → runtime}/validation/field-validator.d.ts +0 -0
  249. /package/dist/types/{src/runtime → runtime}/validation/field.d.ts +0 -0
  250. /package/dist/types/{src/runtime → runtime}/validation/index.d.ts +0 -0
  251. /package/dist/types/{src/runtime → runtime}/values.d.ts +0 -0
  252. /package/dist/types/{src/schema → schema}/ids.d.ts +0 -0
  253. /package/dist/types/{src/schema → schema}/onehot-display.d.ts +0 -0
  254. /package/dist/types/{src/schema → schema}/report-context.d.ts +0 -0
  255. /package/dist/types/{src/schema → schema}/report-fetch-request.d.ts +0 -0
  256. /package/dist/types/{src/schema → schema}/types/form.d.ts +0 -0
  257. /package/dist/types/{src/schema → schema}/types/registry.d.ts +0 -0
  258. /package/dist/types/{src/transport → transport}/errors.d.ts +0 -0
  259. /package/dist/types/{src/transport → transport}/fanout.d.ts +0 -0
  260. /package/dist/types/{src/transport → transport}/index.d.ts +0 -0
  261. /package/dist/types/{src/transport → transport}/request-runner.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { a as e, b as t, g as n, h as r, l as i, m as a, t as o, v as s, y as c } from "./schema-CiCjXECD.js";
1
+ import { a as e, b as t, g as n, h as r, l as i, m as a, t as o, v as s, y as c } from "./schema-C34LJ8aV.js";
2
2
  import { a as l, n as u, r as d } from "./transport-KUB3zfW9.js";
3
3
  //#region src/runtime/submission/report-fetches.ts
4
4
  var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) => {
@@ -79,7 +79,7 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
79
79
  if (n?.dirty || n?.touched) return !0;
80
80
  }
81
81
  return !1;
82
- }, T = (e, t) => e.config.inactiveFieldPolicy ?? t ?? "omit", E = (e, t) => new g(`${e} definition "${t}" disappeared during form creation.`), D = (e) => typeof e == "object" && !!e && !Array.isArray(e), te = (e) => typeof e == "object" && !!e || typeof e == "function", O = (e) => te(e) && "then" in e && typeof e.then == "function", k = (e) => e == null ? !0 : typeof e == "string" ? e.trim() === "" : Array.isArray(e) ? e.length === 0 : e instanceof Date ? Number.isNaN(e.getTime()) : !1, ne = (e) => e, A = (e) => {
82
+ }, T = (e, t) => e.config.inactiveFieldPolicy ?? t ?? "omit", E = (e, t) => new g(`${e} definition "${t}" disappeared during form creation.`), D = (e) => typeof e == "object" && !!e && !Array.isArray(e), te = (e) => typeof e == "object" && !!e || typeof e == "function", O = (e) => te(e) && "then" in e && typeof e.then == "function", k = (e) => e == null ? !0 : typeof e == "string" ? e.trim() === "" : Array.isArray(e) ? e.length === 0 : e instanceof Date && Number.isNaN(e.getTime()), ne = (e) => e, A = (e) => {
83
83
  let t = typeof ArrayBuffer < "u" && ArrayBuffer.isView(e), n = typeof ArrayBuffer < "u" && e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer, r = typeof Blob < "u" && e instanceof Blob || typeof File < "u" && e instanceof File;
84
84
  if (e !== null && (typeof e == "object" || typeof e == "function") && !t && !n && !r && !Object.isFrozen(e)) {
85
85
  Object.freeze(e);
@@ -116,7 +116,7 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
116
116
  }, se = (e) => typeof File < "u" && e instanceof File ? new File([e], e.name, {
117
117
  type: e.type,
118
118
  lastModified: e.lastModified
119
- }) : typeof Blob < "u" && e instanceof Blob ? e.slice(0, e.size, e.type) : e, ce = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), le = (e, t) => e.byteLength === t.byteLength ? ce(new Uint8Array(e), new Uint8Array(t)) : !1, M = (e) => {
119
+ }) : typeof Blob < "u" && e instanceof Blob ? e.slice(0, e.size, e.type) : e, ce = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), le = (e, t) => e.byteLength === t.byteLength && ce(new Uint8Array(e), new Uint8Array(t)), M = (e) => {
120
120
  if (e instanceof Date) return new Date(e.getTime());
121
121
  if (e instanceof RegExp) return new RegExp(e.source, e.flags);
122
122
  if (e instanceof ArrayBuffer) return oe(e);
@@ -149,7 +149,7 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
149
149
  }
150
150
  return n.length === 0;
151
151
  }
152
- if (typeof Blob < "u" && typeof File < "u" && e instanceof Blob && t instanceof Blob) return e.size === t.size && e.type === t.type ? e instanceof File && t instanceof File ? e.name === t.name && e.lastModified === t.lastModified : !0 : !1;
152
+ if (typeof Blob < "u" && typeof File < "u" && e instanceof Blob && t instanceof Blob) return e.size !== t.size || e.type !== t.type ? !1 : e instanceof File && t instanceof File ? e.name === t.name && e.lastModified === t.lastModified : !0;
153
153
  if (Array.isArray(e) && Array.isArray(t)) return e.length === t.length && e.every((e, n) => N(e, t[n]));
154
154
  if (D(e) && D(t)) {
155
155
  let n = Object.keys(e), r = Object.keys(t);
@@ -163,7 +163,7 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
163
163
  }), ue = (e, t) => {
164
164
  if (e.config.includeInSubmission === !1) return !1;
165
165
  let n = t(e), r = e.state;
166
- return !((!r.visible || r.disabled) && (n === "omit" || n === "reset-on-hide"));
166
+ return !!r.visible && !r.disabled || n !== "omit" && n !== "reset-on-hide";
167
167
  }, de = (e) => e.kind === "onehot-category" && Array.isArray(e.options), fe = (e, t, n, r) => {
168
168
  j(e, ie(t, n), M(r));
169
169
  }, pe = (e, t) => {
@@ -189,7 +189,7 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
189
189
  let t = e.config.displayKey.trim();
190
190
  return t.length > 0 ? t : void 0;
191
191
  }, he = (e, t, n, r, i) => {
192
- if (!(!n.state.visible || r === void 0)) {
192
+ if (n.state.visible && r !== void 0) {
193
193
  if (t.has(r)) throw Error(`field "${n.id}": duplicate displayKey "${r}".`);
194
194
  t.add(r), e[r] = M(i);
195
195
  }
@@ -622,7 +622,7 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
622
622
  reports: a.reports,
623
623
  signal: D
624
624
  }, l = await n.submit(c);
625
- if (!(_.getCurrentRequestId() === f && t.getState().lifecycleVersion === E && !D.aborted && !_.isAborted(f))) throw S(_.getAbortReason(f));
625
+ if (_.getCurrentRequestId() !== f || t.getState().lifecycleVersion !== E || D.aborted || _.isAborted(f)) throw S(_.getAbortReason(f));
626
626
  let u = Ne(l), d = {
627
627
  backend: p,
628
628
  ...w,
@@ -666,10 +666,10 @@ var f = "Unknown report fetch error.", p = async ({ reports: e, request: t }) =>
666
666
  _.reset();
667
667
  }
668
668
  };
669
- }, Le = (e) => typeof e == "object" && !!e && !Array.isArray(e), V = (e, t) => Object.is(e, t), Re = (e, t) => e === t ? !0 : e.length === t.length ? e.every((e, n) => Object.is(e, t[n])) : !1, ze = (e, t) => {
669
+ }, Le = (e) => typeof e == "object" && !!e && !Array.isArray(e), V = (e, t) => Object.is(e, t), Re = (e, t) => e === t || e.length === t.length && e.every((e, n) => Object.is(e, t[n])), ze = (e, t) => {
670
670
  if (e === t) return !0;
671
671
  let n = Object.keys(e), r = Object.keys(t);
672
- return n.length === r.length ? n.every((n) => Object.is(e[n], t[n])) : !1;
672
+ return n.length === r.length && n.every((n) => Object.is(e[n], t[n]));
673
673
  }, Be = (e, t) => Object.is(e, t) ? !0 : Array.isArray(e) && Array.isArray(t) ? Re(e, t) : Le(e) && Le(t) ? ze(e, t) : !1, Ve = (e) => {
674
674
  if (e instanceof Date) return Number.isNaN(e.getTime()) ? null : e.getTime();
675
675
  if (typeof e == "number") return Number.isNaN(e) ? null : e;
@@ -1,60 +1,60 @@
1
- import { toJSONSchema as e } from "zod";
1
+ import { array as e, never as t, strictObject as n, toJSONSchema as r, xor as i } from "zod";
2
2
  //#region src/schema/ids.ts
3
- var t = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "item", n = (e, t) => {
3
+ var a = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "item", o = (e, t) => {
4
4
  if (typeof e == "string" || typeof e == "number") return e;
5
5
  if (e) return (t ? e[t] : void 0) ?? e.default ?? void 0;
6
- }, r = (e) => String(e), i = (e, t) => {
7
- let i = n(e, t);
8
- if (t !== void 0 || typeof e != "object" || !e) return i === void 0 ? [] : [i];
9
- let a = /* @__PURE__ */ new Set();
6
+ }, s = (e) => String(e), c = (e, t) => {
7
+ let n = o(e, t);
8
+ if (t !== void 0 || typeof e != "object" || !e) return n === void 0 ? [] : [n];
9
+ let r = /* @__PURE__ */ new Set();
10
10
  return Object.values(e).filter((e) => {
11
11
  if (typeof e != "string" && typeof e != "number") return !1;
12
- let t = r(e);
13
- return a.has(t) ? !1 : (a.add(t), !0);
12
+ let t = s(e);
13
+ return !r.has(t) && (r.add(t), !0);
14
14
  });
15
- }, a = (e, t) => {
15
+ }, l = (e, t) => {
16
16
  if (typeof e == "string" || typeof e == "number") return [{
17
17
  backend: t ?? "default",
18
18
  mappedTo: e
19
19
  }];
20
20
  if (!e) return [];
21
21
  if (t) {
22
- let r = n(e, t);
23
- return r === void 0 ? [] : [{
22
+ let n = o(e, t);
23
+ return n === void 0 ? [] : [{
24
24
  backend: t,
25
- mappedTo: r
25
+ mappedTo: n
26
26
  }];
27
27
  }
28
28
  return Object.entries(e).flatMap(([e, t]) => typeof t == "string" || typeof t == "number" ? [{
29
29
  backend: e,
30
30
  mappedTo: t
31
31
  }] : []);
32
- }, o = (e, t) => {
33
- let n = a(e.mappedTo, t.backend), i = t.reports.filter((e) => n.some((t) => t.backend === e.backend && r(t.mappedTo) === r(e.mappedTo)));
34
- if (i.length > 1) {
35
- let e = i[0];
32
+ }, u = (e, t) => {
33
+ let n = l(e.mappedTo, t.backend), r = t.reports.filter((e) => n.some((t) => t.backend === e.backend && s(t.mappedTo) === s(e.mappedTo)));
34
+ if (r.length > 1) {
35
+ let e = r[0];
36
36
  throw Error(`Duplicate report result for backend "${e?.backend}" and mappedTo "${String(e?.mappedTo)}".`);
37
37
  }
38
- return i[0];
39
- }, s = (e, t) => {
40
- let n = o(e, t);
38
+ return r[0];
39
+ }, d = (e, t) => {
40
+ let n = u(e, t);
41
41
  return n?.status === "ready" ? n.payload : void 0;
42
- }, c = class extends Error {
42
+ }, f = class extends Error {
43
43
  constructor(e) {
44
44
  super(e), this.name = "RegistryError";
45
45
  }
46
- }, l = class {
46
+ }, p = class {
47
47
  fieldDefinitions = /* @__PURE__ */ new Map();
48
48
  reportDefinitions = /* @__PURE__ */ new Map();
49
49
  registerField(e) {
50
- if (this.fieldDefinitions.has(e.kind)) throw new c(`Field kind "${e.kind}" is already registered.`);
50
+ if (this.fieldDefinitions.has(e.kind)) throw new f(`Field kind "${e.kind}" is already registered.`);
51
51
  return this.fieldDefinitions.set(e.kind, e), this;
52
52
  }
53
53
  unregisterField(e) {
54
54
  return this.fieldDefinitions.delete(e), this;
55
55
  }
56
56
  registerReport(e) {
57
- if (this.reportDefinitions.has(e.kind)) throw new c(`Report kind "${e.kind}" is already registered.`);
57
+ if (this.reportDefinitions.has(e.kind)) throw new f(`Report kind "${e.kind}" is already registered.`);
58
58
  return this.reportDefinitions.set(e.kind, e), this;
59
59
  }
60
60
  unregisterReport(e) {
@@ -72,68 +72,68 @@ var t = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
72
72
  listReports() {
73
73
  return Array.from(this.reportDefinitions.values());
74
74
  }
75
- }, u = () => new l(), d = (e) => e, f = (e) => e, p = class extends Error {
75
+ }, m = () => new p(), h = (e) => e, g = (e) => e, _ = class extends Error {
76
76
  path;
77
77
  code;
78
78
  constructor(e, t, n = "invalid-config") {
79
79
  super(e), this.path = t, this.code = n, this.name = "SchemaNormalizationError";
80
80
  }
81
- }, m = (e, t, n, r, i) => {
82
- if (typeof n != "object" || !n) throw new p(`Series field "${e}" requires "${t}" configuration.`, [
81
+ }, v = (e, t, n, r, i) => {
82
+ if (typeof n != "object" || !n) throw new _(`Series field "${e}" requires "${t}" configuration.`, [
83
83
  "fields",
84
84
  i,
85
85
  t
86
86
  ]);
87
87
  let a = "kind" in n && typeof n.kind == "string" ? n.kind : "";
88
- if (a.length === 0) throw new p(`Series field "${e}" requires "${t}.kind".`, [
88
+ if (a.length === 0) throw new _(`Series field "${e}" requires "${t}.kind".`, [
89
89
  "fields",
90
90
  i,
91
91
  t,
92
92
  "kind"
93
93
  ]);
94
- if (a === "series") throw new p(`Series field "${e}" cannot nest series in "${t}".`, [
94
+ if (a === "series") throw new _(`Series field "${e}" cannot nest series in "${t}".`, [
95
95
  "fields",
96
96
  i,
97
97
  t,
98
98
  "kind"
99
99
  ]);
100
- if (!r.getField(a)) throw new p(`Series field "${e}" uses unknown sub-field kind "${a}" in "${t}".`, [
100
+ if (!r.getField(a)) throw new _(`Series field "${e}" uses unknown sub-field kind "${a}" in "${t}".`, [
101
101
  "fields",
102
102
  i,
103
103
  t,
104
104
  "kind"
105
105
  ], "unknown-kind");
106
- }, h = (e, t, n) => {
107
- if (e.kind === "series" && (m(e.label, "field1", e.field1, t, n), m(e.label, "field2", e.field2, t, n), typeof e.minPoints == "number" && typeof e.maxPoints == "number" && e.minPoints > e.maxPoints)) throw new p(`Series field "${e.label}" requires minPoints to be less than or equal to maxPoints.`, [
106
+ }, y = (e, t, n) => {
107
+ if (e.kind === "series" && (v(e.label, "field1", e.field1, t, n), v(e.label, "field2", e.field2, t, n), typeof e.minPoints == "number" && typeof e.maxPoints == "number" && e.minPoints > e.maxPoints)) throw new _(`Series field "${e.label}" requires minPoints to be less than or equal to maxPoints.`, [
108
108
  "fields",
109
109
  n,
110
110
  "minPoints"
111
111
  ]);
112
- }, g = (e, n, r, i, a) => {
113
- let o = t((e ?? n) || i);
112
+ }, b = (e, t, n, r, i) => {
113
+ let o = a((e ?? t) || r);
114
114
  if (e) {
115
- if (r.has(o)) throw new p(`Duplicate explicit id "${o}" in schema.`, a);
116
- return r.add(o), o;
115
+ if (n.has(o)) throw new _(`Duplicate explicit id "${o}" in schema.`, i);
116
+ return n.add(o), o;
117
117
  }
118
118
  let s = o, c = 2;
119
- for (; r.has(s);) s = `${o}-${c}`, c += 1;
120
- return r.add(s), s;
121
- }, _ = (e, t, n, r) => {
119
+ for (; n.has(s);) s = `${o}-${c}`, c += 1;
120
+ return n.add(s), s;
121
+ }, x = (e, t, n, r) => {
122
122
  let i = n.getField(e.kind);
123
- if (!i) throw new c(`Unknown field kind "${e.kind}".`);
123
+ if (!i) throw new f(`Unknown field kind "${e.kind}".`);
124
124
  let a = i.schema.parse(e);
125
- return h(a, n, t), {
125
+ return y(a, n, t), {
126
126
  ...a,
127
- id: g(a.id, a.label, r, `field-${t + 1}`, [
127
+ id: b(a.id, a.label, r, `field-${t + 1}`, [
128
128
  "fields",
129
129
  t,
130
130
  "id"
131
131
  ])
132
132
  };
133
- }, v = (e, t, n, r) => {
133
+ }, S = (e, t, n, r) => {
134
134
  let i = n.getReport(e.kind);
135
- if (!i) throw new c(`Unknown report kind "${e.kind}".`);
136
- let a = i.schema.parse(e), o = g(e.id ?? a.id, e.label ?? a.label ?? a.kind, r, `report-${t + 1}`, [
135
+ if (!i) throw new f(`Unknown report kind "${e.kind}".`);
136
+ let a = i.schema.parse(e), o = b(e.id ?? a.id, e.label ?? a.label ?? a.kind, r, `report-${t + 1}`, [
137
137
  "reports",
138
138
  t,
139
139
  "id"
@@ -146,62 +146,62 @@ var t = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
146
146
  ...e.ui === void 0 ? {} : { ui: e.ui },
147
147
  id: o
148
148
  };
149
- }, y = (e, t) => {
150
- let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = (e.reports ?? []).map((e, n) => v(e, n, t, r));
149
+ }, C = (e, t) => {
150
+ let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = (e.reports ?? []).map((e, n) => S(e, n, t, r));
151
151
  return {
152
- fields: e.fields.map((e, r) => _(e, r, t, n)),
152
+ fields: e.fields.map((e, r) => x(e, r, t, n)),
153
153
  reports: i
154
154
  };
155
- }, b = (e) => e === 1 || e === "1" || e === !0, x = (e, t, i = {}) => {
155
+ }, w = (e) => e === 1 || e === "1" || e === !0, T = (e, t, n = {}) => {
156
156
  if (e.kind !== "onehot-category" || !Array.isArray(e.options)) return;
157
- let a = /* @__PURE__ */ new Set(), o;
158
- for (let s of e.options) {
159
- let c = n(s.mappedTo, i.backend);
160
- if (c === void 0) throw Error(`onehot-category "${e.id ?? e.kind}": option "${s.value}" has no mappedTo.`);
161
- let l = r(c);
162
- if (a.has(l)) throw Error(`onehot-category "${e.id ?? e.kind}": duplicate mappedTo "${l}".`);
163
- if (a.add(l), b(t[l])) {
164
- if (o !== void 0) throw Error(`onehot-category "${e.id ?? e.kind}": multiple selected mapped values.`);
165
- o = s.value;
157
+ let r = /* @__PURE__ */ new Set(), i;
158
+ for (let a of e.options) {
159
+ let c = o(a.mappedTo, n.backend);
160
+ if (c === void 0) throw Error(`onehot-category "${e.id ?? e.kind}": option "${a.value}" has no mappedTo.`);
161
+ let l = s(c);
162
+ if (r.has(l)) throw Error(`onehot-category "${e.id ?? e.kind}": duplicate mappedTo "${l}".`);
163
+ if (r.add(l), w(t[l])) {
164
+ if (i !== void 0) throw Error(`onehot-category "${e.id ?? e.kind}": multiple selected mapped values.`);
165
+ i = a.value;
166
166
  }
167
167
  }
168
- return o;
169
- }, S = (e) => {
168
+ return i;
169
+ }, E = (e) => {
170
170
  if (typeof e == "string") return e;
171
171
  if (typeof e != "number") return e.id ?? e.config?.id;
172
- }, C = (e, t) => {
172
+ }, D = (e, t) => {
173
173
  if (typeof e == "string" || typeof e == "number") return String(e);
174
- let i = n(e.mappedTo ?? e.config?.mappedTo, t);
175
- return i === void 0 ? void 0 : r(i);
176
- }, w = (e, t) => Object.fromEntries(e.map((e) => {
177
- let i = o(e, t), a = i?.context, s = i?.mappedTo ?? n(e.mappedTo, t.backend);
174
+ let n = o(e.mappedTo ?? e.config?.mappedTo, t);
175
+ return n === void 0 ? void 0 : s(n);
176
+ }, O = (e, t) => Object.fromEntries(e.map((e) => {
177
+ let n = u(e, t), r = n?.context, i = n?.mappedTo ?? o(e.mappedTo, t.backend);
178
178
  return [e.id, {
179
179
  reportId: e.id,
180
180
  kind: e.kind,
181
181
  label: e.label,
182
182
  mappedTo: e.mappedTo,
183
- target: s,
184
- targetKey: s === void 0 ? void 0 : r(s),
185
- backend: i?.backend ?? t.backend,
186
- displayValues: a?.displayValues ?? t.displayValues,
187
- modelValues: a?.modelValues ?? t.modelValues,
183
+ target: i,
184
+ targetKey: i === void 0 ? void 0 : s(i),
185
+ backend: n?.backend ?? t.backend,
186
+ displayValues: r?.displayValues ?? t.displayValues,
187
+ modelValues: r?.modelValues ?? t.modelValues,
188
188
  reports: t.reports,
189
- meta: a?.meta ?? t.meta,
190
- raw: a && "raw" in a ? a.raw : t.raw
189
+ meta: r?.meta ?? t.meta,
190
+ raw: r && "raw" in r ? r.raw : t.raw
191
191
  }];
192
- })), T = (e, t) => {
193
- let n = e.reportContexts, r = S(t);
192
+ })), k = (e, t) => {
193
+ let n = e.reportContexts, r = E(t);
194
194
  if (r && n[r]) return n[r];
195
- let i = C(t, e.backend);
195
+ let i = D(t, e.backend);
196
196
  if (i === void 0) return;
197
197
  let a = Object.values(n).filter((t) => t.targetKey === i && (e.backend === void 0 || t.backend === e.backend));
198
198
  return a.length === 1 ? a[0] : void 0;
199
- }, E = (e) => typeof e == "object" && !!e && !Array.isArray(e), D = (e, t) => {
200
- if (!E(e)) return [];
199
+ }, A = (e) => typeof e == "object" && !!e && !Array.isArray(e), j = (e, t) => {
200
+ if (!A(e)) return [];
201
201
  let n = [], r = (r) => {
202
202
  let i = e[r];
203
203
  Array.isArray(i) && i.forEach((e, i) => {
204
- if (!(!E(e) || typeof e.kind != "string") && ((r === "fields" ? t.getField(e.kind) : t.getReport(e.kind)) || n.push({
204
+ if (A(e) && typeof e.kind == "string" && ((r === "fields" ? t.getField(e.kind) : t.getReport(e.kind)) || n.push({
205
205
  section: r,
206
206
  index: i,
207
207
  kind: e.kind,
@@ -212,7 +212,7 @@ var t = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
212
212
  ]
213
213
  }), r === "fields" && e.kind === "series")) for (let a of ["field1", "field2"]) {
214
214
  let o = e[a];
215
- !E(o) || typeof o.kind != "string" || t.getField(o.kind) || n.push({
215
+ A(o) && typeof o.kind == "string" && (t.getField(o.kind) || n.push({
216
216
  section: r,
217
217
  index: i,
218
218
  kind: o.kind,
@@ -222,12 +222,12 @@ var t = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
222
222
  a,
223
223
  "kind"
224
224
  ]
225
- });
225
+ }));
226
226
  }
227
227
  });
228
228
  };
229
229
  return r("fields"), r("reports"), n;
230
- }, O = (e, t, n, r) => {
230
+ }, M = (e, t, n, r) => {
231
231
  if (!Array.isArray(t)) {
232
232
  r.push({
233
233
  path: [e],
@@ -237,7 +237,7 @@ var t = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
237
237
  return;
238
238
  }
239
239
  t.forEach((t, i) => {
240
- if (!E(t)) {
240
+ if (!A(t)) {
241
241
  r.push({
242
242
  path: [e, i],
243
243
  message: `${e === "fields" ? "Field" : "Report"} must be an object.`,
@@ -270,8 +270,8 @@ var t = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
270
270
  code: "invalid-config"
271
271
  });
272
272
  });
273
- }, k = (e, t) => {
274
- if (!E(e)) return {
273
+ }, N = (e, t) => {
274
+ if (!A(e)) return {
275
275
  success: !1,
276
276
  issues: [{
277
277
  path: [],
@@ -279,14 +279,14 @@ var t = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
279
279
  code: "invalid-schema"
280
280
  }]
281
281
  };
282
- let n = [], r = new Set(["fields", "reports"]);
282
+ let n = [], r = /* @__PURE__ */ new Set(["fields", "reports"]);
283
283
  for (let t of Object.keys(e)) r.has(t) || n.push({
284
284
  path: [t],
285
285
  message: `Unsupported schema property "${t}".`,
286
286
  code: "invalid-schema"
287
287
  });
288
- O("fields", e.fields, t, n), O("reports", e.reports ?? [], t, n);
289
- for (let r of D(e, t)) n.push({
288
+ M("fields", e.fields, t, n), M("reports", e.reports ?? [], t, n);
289
+ for (let r of j(e, t)) n.push({
290
290
  path: r.path,
291
291
  message: `Unknown ${r.section === "fields" ? "field" : "report"} kind "${r.kind}".`,
292
292
  code: "unknown-kind"
@@ -298,11 +298,11 @@ var t = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
298
298
  try {
299
299
  return {
300
300
  success: !0,
301
- data: y(e, t),
301
+ data: C(e, t),
302
302
  issues: []
303
303
  };
304
304
  } catch (e) {
305
- let t = e instanceof p ? e : void 0;
305
+ let t = e instanceof _ ? e : void 0;
306
306
  return {
307
307
  success: !1,
308
308
  issues: [{
@@ -312,39 +312,28 @@ var t = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/
312
312
  }]
313
313
  };
314
314
  }
315
- }, A = (t) => t.map((t) => e(t.schema, {
315
+ }, P = (e) => {
316
+ let n = e.map((e) => e.schema);
317
+ return n.length > 0 ? i(n) : t();
318
+ }, F = (t) => r(n({
319
+ fields: e(P(t.listFields())),
320
+ reports: e(P(t.listReports())).optional()
321
+ }), {
322
+ target: "draft-2020-12",
316
323
  io: "input",
317
324
  unrepresentable: "any"
318
- })), j = (e) => {
319
- let t = A(e);
320
- return t.length > 0 ? { oneOf: t } : !1;
321
- }, M = (e) => ({
322
- $schema: "https://json-schema.org/draft/2020-12/schema",
323
- type: "object",
324
- additionalProperties: !1,
325
- required: ["fields"],
326
- properties: {
327
- fields: {
328
- type: "array",
329
- items: j(e.listFields())
330
- },
331
- reports: {
332
- type: "array",
333
- items: j(e.listReports())
334
- }
335
- }
336
- }), N = (e, t = {}) => ({
325
+ }), I = (e, t = {}) => ({
337
326
  reportId: t.reportId ?? "",
338
327
  backend: e.backend,
339
328
  inputs: e.inputs,
340
329
  displayValues: e.displayValues,
341
330
  modelValues: e.modelValues,
342
331
  reports: e.reports,
343
- reportContext: t.reportId === void 0 ? void 0 : T(e, t.reportId),
332
+ reportContext: t.reportId === void 0 ? void 0 : k(e, t.reportId),
344
333
  reportContexts: e.reportContexts,
345
334
  meta: e.meta,
346
335
  raw: e.raw,
347
336
  signal: t.signal
348
337
  });
349
338
  //#endregion
350
- export { a as _, w as a, t as b, p as c, u as d, d as f, o as g, s as h, k as i, y as l, r as m, D as n, T as o, f as p, M as r, x as s, N as t, c as u, i as v, n as y };
339
+ export { l as _, O as a, a as b, _ as c, m as d, h as f, u as g, d as h, N as i, C as l, s as m, j as n, k as o, g as p, F as r, T as s, I as t, f as u, c as v, o as y };
@@ -1,69 +1,69 @@
1
- export declare const builtinFieldDefinitions: readonly [import('./shared').BuiltinFieldDefinition<import('../../schema').BaseFieldConfig & {
1
+ export declare const builtinFieldDefinitions: readonly [import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
2
2
  kind: "text";
3
3
  placeholder?: string;
4
4
  minLength?: number;
5
5
  maxLength?: number;
6
6
  pattern?: string;
7
- }, string>, import('./shared').BuiltinFieldDefinition<import('../../schema').BaseFieldConfig & {
7
+ }, string>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
8
8
  kind: "number";
9
9
  min?: number;
10
10
  max?: number;
11
11
  step?: number;
12
12
  unit?: string;
13
13
  placeholder?: string;
14
- }, string | number | null>, import('./shared').BuiltinFieldDefinition<import('../../schema').BaseFieldConfig & {
14
+ }, string | number | null>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
15
15
  kind: "boolean";
16
16
  trueLabel?: string;
17
17
  falseLabel?: string;
18
- }, boolean | null>, import('./shared').BuiltinFieldDefinition<import('../../schema').BaseFieldConfig & {
18
+ }, boolean | null>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
19
19
  kind: "category";
20
20
  options: (string | {
21
21
  label: string;
22
22
  value: string;
23
23
  })[];
24
- }, string | null>, import('./shared').BuiltinFieldDefinition<import('../../schema').BaseFieldConfig & {
24
+ }, string | null>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
25
25
  kind: "mapped-category";
26
26
  options: {
27
27
  label: string;
28
28
  value: string;
29
29
  mapping: Record<string, unknown>;
30
30
  }[];
31
- }, string | null>, import('./shared').BuiltinFieldDefinition<import('.').OneHotCategoryFieldConfig, string | null>, import('./shared').BuiltinFieldDefinition<import('../../schema').BaseFieldConfig & {
31
+ }, string | null>, import('./shared').BuiltinFieldDefinition<import('.').OneHotCategoryFieldConfig, string | null>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
32
32
  kind: "date";
33
33
  min?: string;
34
34
  max?: string;
35
35
  step?: number;
36
- }, Date | null>, import('./shared').BuiltinFieldDefinition<import('.').SeriesFieldConfig, import('.').SeriesPoint[]>, import('./shared').BuiltinFieldDefinition<import('../../schema').BaseFieldConfig & {
36
+ }, Date | null>, import('./shared').BuiltinFieldDefinition<import('.').SeriesFieldConfig, import('.').SeriesPoint[]>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
37
37
  kind: "long-text";
38
38
  placeholder?: string;
39
39
  minLength?: number;
40
40
  maxLength?: number;
41
41
  rows?: number;
42
- }, string>, import('./shared').BuiltinFieldDefinition<import('../../schema').BaseFieldConfig & {
42
+ }, string>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
43
43
  kind: "single-choice";
44
44
  options: (string | {
45
45
  label: string;
46
46
  value: string;
47
47
  })[];
48
48
  layout?: "horizontal" | "vertical";
49
- }, string | null>, import('./shared').BuiltinFieldDefinition<import('../../schema').BaseFieldConfig & {
49
+ }, string | null>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
50
50
  kind: "multi-choice";
51
51
  options: (string | {
52
52
  label: string;
53
53
  value: string;
54
54
  })[];
55
55
  layout?: "horizontal" | "vertical";
56
- }, string[]>, import('./shared').BuiltinFieldDefinition<import('../../schema').BaseFieldConfig & {
56
+ }, string[]>, import('./shared').BuiltinFieldDefinition<import('mlform/schema').BaseFieldConfig & {
57
57
  kind: "rating";
58
58
  min?: number;
59
59
  max: number;
60
60
  step?: number;
61
61
  }, number | null>];
62
- export declare const builtinReportDefinitions: readonly [import('./shared').BuiltinReportDefinition<import('../../schema').BaseReportConfig & {
62
+ export declare const builtinReportDefinitions: readonly [import('./shared').BuiltinReportDefinition<import('mlform/schema').BaseReportConfig & {
63
63
  kind: "classifier";
64
64
  labels?: string[];
65
65
  showClassProbabilities?: boolean;
66
- }>, import('./shared').BuiltinReportDefinition<import('../../schema').BaseReportConfig & {
66
+ }>, import('./shared').BuiltinReportDefinition<import('mlform/schema').BaseReportConfig & {
67
67
  kind: "regressor";
68
68
  unit?: string;
69
69
  precision?: number;
@@ -1,4 +1,4 @@
1
- import { BaseFieldConfig } from '../../../../schema';
1
+ import { BaseFieldConfig } from 'mlform/schema';
2
2
  import { BuiltinFieldDefinition } from '../shared';
3
3
  type BooleanFieldConfig = BaseFieldConfig & {
4
4
  kind: "boolean";
@@ -1,4 +1,4 @@
1
- import { BaseFieldConfig } from '../../../../schema';
1
+ import { BaseFieldConfig } from 'mlform/schema';
2
2
  import { BuiltinFieldDefinition } from '../shared';
3
3
  type CategoryOption = string | {
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { BaseFieldConfig } from '../../../../schema';
1
+ import { BaseFieldConfig } from 'mlform/schema';
2
2
  import { BuiltinFieldDefinition } from '../shared';
3
3
  type DateFieldConfig = BaseFieldConfig & {
4
4
  kind: "date";
@@ -1,4 +1,4 @@
1
- import { BaseFieldConfig } from '../../../../schema';
1
+ import { BaseFieldConfig } from 'mlform/schema';
2
2
  import { BuiltinFieldDefinition } from '../shared';
3
3
  type LongTextFieldConfig = BaseFieldConfig & {
4
4
  kind: "long-text";
@@ -1,4 +1,4 @@
1
- import { BaseFieldConfig } from '../../../../schema';
1
+ import { BaseFieldConfig } from 'mlform/schema';
2
2
  import { BuiltinFieldDefinition } from '../shared';
3
3
  type MappedCategoryOption = {
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { BaseFieldConfig } from '../../../../schema';
1
+ import { BaseFieldConfig } from 'mlform/schema';
2
2
  import { BuiltinFieldDefinition } from '../shared';
3
3
  type MultiChoiceOption = string | {
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { BaseFieldConfig } from '../../../../schema';
1
+ import { BaseFieldConfig } from 'mlform/schema';
2
2
  import { BuiltinFieldDefinition } from '../shared';
3
3
  type NumberFieldConfig = BaseFieldConfig & {
4
4
  kind: "number";
@@ -1,4 +1,4 @@
1
- import { BaseFieldConfig, MappedTo } from '../../../../schema';
1
+ import { BaseFieldConfig, MappedTo } from 'mlform/schema';
2
2
  import { BuiltinFieldDefinition } from '../shared';
3
3
  export type OneHotCategoryOption = {
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { BaseFieldConfig } from '../../../../schema';
1
+ import { BaseFieldConfig } from 'mlform/schema';
2
2
  import { BuiltinFieldDefinition } from '../shared';
3
3
  type RatingFieldConfig = BaseFieldConfig & {
4
4
  kind: "rating";
@@ -1,4 +1,4 @@
1
- import { BaseFieldConfig } from '../../../../schema';
1
+ import { BaseFieldConfig } from 'mlform/schema';
2
2
  import * as z from "zod";
3
3
  export type SeriesPoint = {
4
4
  field1: unknown;
@@ -30,9 +30,9 @@ export declare const seriesFieldSchema: z.ZodObject<{
30
30
  disabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
31
31
  hidden: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
32
32
  readOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
33
- disabledWhen: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<(context: unknown) => boolean, (context: unknown) => boolean>, z.ZodType<import('../../../../schema').DeclarativeFieldCondition, unknown, z.core.$ZodTypeInternals<import('../../../../schema').DeclarativeFieldCondition, unknown>>]>>;
34
- hiddenWhen: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<(context: unknown) => boolean, (context: unknown) => boolean>, z.ZodType<import('../../../../schema').DeclarativeFieldCondition, unknown, z.core.$ZodTypeInternals<import('../../../../schema').DeclarativeFieldCondition, unknown>>]>>;
35
- readOnlyWhen: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<(context: unknown) => boolean, (context: unknown) => boolean>, z.ZodType<import('../../../../schema').DeclarativeFieldCondition, unknown, z.core.$ZodTypeInternals<import('../../../../schema').DeclarativeFieldCondition, unknown>>]>>;
33
+ disabledWhen: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<(context: unknown) => boolean, (context: unknown) => boolean>, z.ZodType<import('mlform/schema').DeclarativeFieldCondition, unknown, z.core.$ZodTypeInternals<import('mlform/schema').DeclarativeFieldCondition, unknown>>]>>;
34
+ hiddenWhen: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<(context: unknown) => boolean, (context: unknown) => boolean>, z.ZodType<import('mlform/schema').DeclarativeFieldCondition, unknown, z.core.$ZodTypeInternals<import('mlform/schema').DeclarativeFieldCondition, unknown>>]>>;
35
+ readOnlyWhen: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<(context: unknown) => boolean, (context: unknown) => boolean>, z.ZodType<import('mlform/schema').DeclarativeFieldCondition, unknown, z.core.$ZodTypeInternals<import('mlform/schema').DeclarativeFieldCondition, unknown>>]>>;
36
36
  asyncValidationDebounceMs: z.ZodOptional<z.ZodNumber>;
37
37
  inactiveFieldPolicy: z.ZodOptional<z.ZodEnum<{
38
38
  include: "include";