mlform 0.1.20 → 0.1.22

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/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.20` is the current release in this repository.
12
+ Version `0.1.22` 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.20`, use the repository release entry and the published docs as the source of truth:
309
+ For `0.1.22`, 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 { m as e, u as t, v as n } from "./schema-CYsf2AFP.js";
2
- import { s as r } from "./primitives-CgFaSmAm.js";
1
+ import { b as e, d as t, h as n } from "./schema-CiCjXECD.js";
2
+ import { s as r } from "./primitives-ljp3c5R8.js";
3
3
  import * as i from "zod";
4
4
  //#region src/builtins/constants.ts
5
5
  var a = {
@@ -638,8 +638,8 @@ var a = {
638
638
  labels: i.array(i.string()).optional(),
639
639
  showClassProbabilities: i.boolean().optional().default(!0)
640
640
  }),
641
- resolvePayload(t, n) {
642
- return e(n.report, n.result);
641
+ resolvePayload(e, t) {
642
+ return n(t.report, t.result);
643
643
  },
644
644
  describe(e, t) {
645
645
  return t.state.status === "idle" && t.payload === void 0 ? null : {
@@ -666,8 +666,8 @@ var a = {
666
666
  unit: i.string().optional(),
667
667
  precision: i.number().int().nonnegative().optional().default(2)
668
668
  }),
669
- resolvePayload(t, n) {
670
- return e(n.report, n.result);
669
+ resolvePayload(e, t) {
670
+ return n(t.report, t.result);
671
671
  },
672
672
  describe(e, t) {
673
673
  return t.state.status === "idle" && t.payload === void 0 ? null : {
@@ -686,7 +686,7 @@ var a = {
686
686
  }
687
687
  };
688
688
  }
689
- }, X = (e) => e.kind === "mapped-category" ? e.config : null, Z = (e, t) => e.getField(t) ?? e.getField(n(t)), ie = async (e, t) => {
689
+ }, X = (e) => e.kind === "mapped-category" ? e.config : null, Z = (t, n) => t.getField(n) ?? t.getField(e(n)), ie = async (e, t) => {
690
690
  let n = t.getField(e.fieldId);
691
691
  if (!n) return;
692
692
  let r = X(n);
@@ -1,2 +1,2 @@
1
- import { S as e, _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v, v as y, x as b, y as x } from "../builtins-CUN_bP93.js";
1
+ import { S as e, _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v, v as y, x as b, y as x } from "../builtins-B2U_ViF6.js";
2
2
  export { t as booleanFieldDefinition, y as builtinFieldKinds, x as builtinReportFallbacks, r as builtinReportKinds, b as builtinReportLabels, e as builtinValidationMessages, s as categoryFieldDefinition, n as classifierReportDefinition, _ as createBuiltinMlRegistry, h as createMappedCategoryBehavior, f as createMlRegistryPack, m as dateFieldDefinition, o as longTextFieldDefinition, c as mappedCategoryFieldDefinition, a as multiChoiceFieldDefinition, v as numberFieldDefinition, d as oneHotCategoryFieldDefinition, u as ratingFieldDefinition, l as regressorReportDefinition, g as seriesFieldDefinition, p as singleChoiceFieldDefinition, i as textFieldDefinition };
@@ -1,7 +1,7 @@
1
- import { _ as e, t } from "../runtime-zS0p2589.js";
2
- import { u as n, v as r } from "../schema-CYsf2AFP.js";
3
- import { n as i } from "../builtins-CUN_bP93.js";
4
- import { _ as a, a as o, h as s, l as c, m as l, p as u, r as d, t as f } from "../primitives-CgFaSmAm.js";
1
+ import { _ as e, t } from "../runtime-C9ZioNpI.js";
2
+ import { b as n, d as r } from "../schema-CiCjXECD.js";
3
+ import { n as i } from "../builtins-B2U_ViF6.js";
4
+ import { _ as a, a as o, h as s, l as c, m as l, p as u, r as d, t as f } from "../primitives-ljp3c5R8.js";
5
5
  import { d as p, h as m, r as h } from "../design-Dr7o4rR9.js";
6
6
  import { LitElement as g, css as _, html as v, nothing as y } from "lit";
7
7
  import { customElement as b, property as x, state as S } from "lit/decorators.js";
@@ -12,7 +12,7 @@ var w = { ...l }, T = {
12
12
  theme: "neutral",
13
13
  recipe: "default"
14
14
  }, ee = (e) => {
15
- let t = n();
15
+ let t = r();
16
16
  for (let n of e.listFields()) t.registerField(n);
17
17
  for (let n of e.listReports()) t.registerReport(n);
18
18
  return t;
@@ -1325,9 +1325,9 @@ var ue = (e, t) => ({
1325
1325
  reportSectionIds: /* @__PURE__ */ new Map(),
1326
1326
  fieldIdsInLayout: /* @__PURE__ */ new Set(),
1327
1327
  reportIdsInLayout: /* @__PURE__ */ new Set()
1328
- }), V = (e, t, n) => {
1329
- let i = r(t ?? e) || e, a = n.get(i) ?? 0;
1330
- return n.set(i, a + 1), a === 0 ? i : `${i}-${a + 1}`;
1328
+ }), V = (e, t, r) => {
1329
+ let i = n(t ?? e) || e, a = r.get(i) ?? 0;
1330
+ return r.set(i, a + 1), a === 0 ? i : `${i}-${a + 1}`;
1331
1331
  }, fe = (e, t) => {
1332
1332
  if (!t.fieldIds.has(e)) throw TypeError(A.unknownFieldReference(e));
1333
1333
  }, pe = (e, t) => {
@@ -1,2 +1,2 @@
1
- import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, r as f, s as p, t as m, u as h } from "../primitives-CgFaSmAm.js";
1
+ import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, r as f, s as p, t as m, u as h } from "../primitives-ljp3c5R8.js";
2
2
  export { h as PrimitiveAsyncReportElement, d as PrimitiveDescriptorRegistry, i as PrimitiveFieldElement, n as PrimitiveFormElement, r as PrimitiveReportElement, f as createBuiltinPrimitiveRegistry, p as createPrimitiveDescriptorRegistry, s as createPrimitiveRegistry, c as focusPrimitiveField, m as mountForm, l as primitiveDefaultLabels, o as primitiveStaticText, a as primitiveTagNames, e as resolvePrimitiveText, t as toDescriptorNodes, u as unmountForm };
@@ -1,3 +1,3 @@
1
- import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _ } from "../runtime-zS0p2589.js";
1
+ import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _ } from "../runtime-C9ZioNpI.js";
2
2
  import { a as v, i as y } from "../transport-KUB3zfW9.js";
3
3
  export { r as EngineError, i as RegistryError, f as ReportPayloadError, l as SubmissionAbortedError, o as SubmitError, y as TransportError, a as ValidationError, h as createForm, h as createFormRuntime, m as createMultiBackendSubmissionSnapshot, n as createSubmissionSnapshot, u as defaultEquality, e as executeFormPipeline, d as executeMultiBackendPipeline, _ as executeReportFetches, c as identity, g as isPromiseLike, p as shallowArrayEquality, s as shallowEquality, t as shallowObjectEquality, v as transportErrorCodes };
@@ -1,2 +1,2 @@
1
- import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _ } from "../schema-CYsf2AFP.js";
2
- export { c as RegistryError, g as createRegistry, t as createReportContexts, h as createReportFetchRequest, r as defineFieldDefinition, i as defineReportDefinition, u as findUnknownKinds, d as getReportContext, f as mappedToKey, n as normalizeSchema, _ as normalizeSchemaId, l as resolveMappedReportPayload, o as resolveMappedReportResult, a as resolveMappedTargets, e as resolveMappedTo, m as resolveOneHotDisplayValue, p as toSchemaJsonSchema, s as validateSchema };
1
+ import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, y } from "../schema-CiCjXECD.js";
2
+ export { _ as RegistryError, r as SchemaNormalizationError, i as createRegistry, t as createReportContexts, g as createReportFetchRequest, a as defineFieldDefinition, p as defineReportDefinition, d as findUnknownKinds, f as getReportContext, u as mappedToKey, l as normalizeSchema, n as normalizeSchemaId, s as resolveMappedReportPayload, o as resolveMappedReportResult, e as resolveMappedRoutes, v as resolveMappedTargets, y as resolveMappedTo, h as resolveOneHotDisplayValue, m as toSchemaJsonSchema, c as validateSchema };
@@ -1876,16 +1876,12 @@ v([a({ attribute: !1 })], R.prototype, "controller", null), v([a({ attribute: !1
1876
1876
  var Ee = (e, t = {}) => ({
1877
1877
  reportId: t.reportId ?? "",
1878
1878
  backend: e.backend,
1879
- inputs: e.inputs ?? [],
1880
- displayValues: e.displayValues ?? {},
1881
- modelValues: e.modelValues ?? e.serializedValues,
1882
- values: e.values,
1883
- fieldValues: e.fieldValues,
1884
- serializedValues: e.serializedValues,
1885
- serializedFieldValues: e.serializedFieldValues,
1879
+ inputs: e.inputs,
1880
+ displayValues: e.displayValues,
1881
+ modelValues: e.modelValues,
1886
1882
  reports: e.reports,
1887
1883
  reportContext: t.reportId === void 0 ? void 0 : e.reportContexts?.[t.reportId],
1888
- reportContexts: e.reportContexts ?? {},
1884
+ reportContexts: e.reportContexts,
1889
1885
  meta: e.meta,
1890
1886
  raw: e.raw,
1891
1887
  signal: t.signal