mlform 0.1.14 → 0.1.16

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 (40) hide show
  1. package/README.md +2 -2
  2. package/dist/{builtins-CcS-sHJa.js → builtins-DQTX_dwn.js} +9 -8
  3. package/dist/mlform/builtins.mjs +1 -1
  4. package/dist/mlform/kit.mjs +251 -231
  5. package/dist/mlform/primitives.mjs +1 -1
  6. package/dist/mlform/runtime.mjs +3 -3
  7. package/dist/mlform/schema.mjs +2 -2
  8. package/dist/mlform/transport.mjs +1 -1
  9. package/dist/{primitives-9obTthA6.js → primitives-BcXt2QWI.js} +83 -53
  10. package/dist/{runtime-Bn_x46y-.js → runtime-BxMSso-p.js} +630 -519
  11. package/dist/schema-D9V7-AkU.js +169 -0
  12. package/dist/{transport-D173EDlB.js → transport-BG3HPc3-.js} +196 -188
  13. package/dist/types/src/builtins/definitions/fields/series-helpers.d.ts +1 -0
  14. package/dist/types/src/builtins/definitions/shared.d.ts +1 -0
  15. package/dist/types/src/kit/mount-types.d.ts +2 -0
  16. package/dist/types/src/kit/view-core-types.d.ts +4 -1
  17. package/dist/types/src/primitives/components/form-root-templates.d.ts +3 -1
  18. package/dist/types/src/primitives/components/form-root.d.ts +3 -1
  19. package/dist/types/src/primitives/components/report-frame.d.ts +2 -1
  20. package/dist/types/src/primitives/controller-types.d.ts +44 -0
  21. package/dist/types/src/primitives/types.d.ts +6 -2
  22. package/dist/types/src/runtime/index.d.ts +4 -2
  23. package/dist/types/src/runtime/submission/index.d.ts +2 -0
  24. package/dist/types/src/runtime/submission/multi-backend.d.ts +25 -0
  25. package/dist/types/src/runtime/submission/request.d.ts +14 -0
  26. package/dist/types/src/runtime/submission/snapshot.d.ts +12 -0
  27. package/dist/types/src/runtime/types/behavior.d.ts +4 -0
  28. package/dist/types/src/runtime/types/field.d.ts +1 -0
  29. package/dist/types/src/runtime/types/form.d.ts +4 -0
  30. package/dist/types/src/runtime/types/transport.d.ts +11 -2
  31. package/dist/types/src/schema/index.d.ts +2 -0
  32. package/dist/types/src/schema/mapped-to.d.ts +9 -1
  33. package/dist/types/src/schema/onehot-display.d.ts +15 -0
  34. package/dist/types/src/schema/report-context.d.ts +17 -0
  35. package/dist/types/src/schema/types/field.d.ts +1 -0
  36. package/dist/types/src/schema/types/report.d.ts +6 -1
  37. package/dist/types/src/schema/types/submit.d.ts +30 -0
  38. package/dist/types/src/transport/types/core.d.ts +17 -0
  39. package/package.json +8 -8
  40. package/dist/schema-DYDo_1VV.js +0 -95
package/README.md CHANGED
@@ -9,7 +9,7 @@ Schema-driven forms for machine learning applications.
9
9
 
10
10
  MLForm gives you a predictable UI layer between users and model backends. You describe inputs and reports with a schema, MLForm renders accessible Web Components, validates values, submits structured payloads, and displays model results in the same host container.
11
11
 
12
- Version `0.1.14` is the current release in this repository.
12
+ Version `0.1.16` is the current release in this repository.
13
13
 
14
14
  ## Why MLForm
15
15
 
@@ -306,7 +306,7 @@ The main package targets Node.js `>=24.9.0`.
306
306
 
307
307
  ## Release Notes
308
308
 
309
- For `0.1.14`, use the repository release entry and the published docs as the source of truth:
309
+ For `0.1.16`, use the repository release entry and the published docs as the source of truth:
310
310
 
311
311
  - GitHub releases: https://github.com/UlloaSP/mlform/releases
312
312
  - npm package: https://www.npmjs.com/package/mlform
@@ -1,5 +1,5 @@
1
- import { c as e, i as t, u as n } from "./schema-DYDo_1VV.js";
2
- import { s as r } from "./primitives-9obTthA6.js";
1
+ import { f as e, m as t, s as n } from "./schema-D9V7-AkU.js";
2
+ import { s as r } from "./primitives-BcXt2QWI.js";
3
3
  import * as i from "zod";
4
4
  //#region src/builtins/constants.ts
5
5
  var a = {
@@ -125,6 +125,7 @@ var a = {
125
125
  "reset-on-hide"
126
126
  ]).optional(),
127
127
  includeInSubmission: i.boolean().optional(),
128
+ displayKey: i.string().min(1).optional(),
128
129
  mappedTo: d,
129
130
  valuePath: i.union([i.string().min(1), i.array(i.string().min(1)).min(1)]).optional(),
130
131
  defaultValue: i.unknown().optional(),
@@ -693,7 +694,7 @@ var a = {
693
694
  }
694
695
  };
695
696
  }
696
- }, X = (e) => e.kind === "mapped-category" ? e.config : null, Z = (e, t) => e.getField(t) ?? e.getField(n(t)), oe = async (e, t) => {
697
+ }, X = (e) => e.kind === "mapped-category" ? e.config : null, Z = (e, n) => e.getField(n) ?? e.getField(t(n)), oe = async (e, t) => {
697
698
  let n = t.getField(e.fieldId);
698
699
  if (!n) return;
699
700
  let r = X(n);
@@ -742,13 +743,13 @@ var a = {
742
743
  kind: t.kind,
743
744
  describe: t.describe
744
745
  });
745
- }, ue = () => t().registerReport(J).registerReport(Y), de = () => {
746
- let e = t(), n = r();
747
- for (let t of se) e.registerField(t), ce(n, t);
748
- for (let t of $) e.registerReport(t), le(n, t);
746
+ }, ue = () => n().registerReport(J).registerReport(Y), de = () => {
747
+ let e = n(), t = r();
748
+ for (let n of se) e.registerField(n), ce(t, n);
749
+ for (let n of $) e.registerReport(n), le(t, n);
749
750
  return {
750
751
  registry: e,
751
- descriptorRegistry: n,
752
+ descriptorRegistry: t,
752
753
  behaviors: [Q()]
753
754
  };
754
755
  };
@@ -1,2 +1,2 @@
1
- import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "../builtins-CcS-sHJa.js";
1
+ import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "../builtins-DQTX_dwn.js";
2
2
  export { n as booleanFieldDefinition, b as builtinFieldKinds, S as builtinLegacyOutputTypes, i as builtinReportFallbacks, x as builtinReportKinds, t as builtinReportLabels, e as builtinValidationMessages, c as categoryFieldDefinition, r as classifierReportDefinition, v as createBuiltinMlRegistry, g as createMappedCategoryBehavior, p as createMlRegistryPack, h as dateFieldDefinition, s as longTextFieldDefinition, l as mappedCategoryFieldDefinition, o as multiChoiceFieldDefinition, y as numberFieldDefinition, f as oneHotCategoryFieldDefinition, d as ratingFieldDefinition, u as regressorReportDefinition, _ as seriesFieldDefinition, m as singleChoiceFieldDefinition, a as textFieldDefinition };