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 +2 -2
- package/dist/{builtins-CUN_bP93.js → builtins-B2U_ViF6.js} +7 -7
- package/dist/mlform/builtins.mjs +1 -1
- package/dist/mlform/kit.mjs +8 -8
- package/dist/mlform/primitives.mjs +1 -1
- package/dist/mlform/runtime.mjs +1 -1
- package/dist/mlform/schema.mjs +2 -2
- package/dist/{primitives-CgFaSmAm.js → primitives-ljp3c5R8.js} +4 -8
- package/dist/{runtime-zS0p2589.js → runtime-C9ZioNpI.js} +294 -304
- package/dist/{schema-CYsf2AFP.js → schema-CiCjXECD.js} +110 -63
- package/dist/types/src/primitives/controller-types.d.ts +8 -16
- package/dist/types/src/runtime/submission/request.d.ts +0 -4
- package/dist/types/src/runtime/types/behavior.d.ts +0 -4
- package/dist/types/src/runtime/types/transport.d.ts +0 -12
- package/dist/types/src/schema/mapped-to.d.ts +5 -0
- package/dist/types/src/schema/normalize.d.ts +5 -0
- package/dist/types/src/schema/report-context.d.ts +2 -2
- package/dist/types/src/schema/types/report.d.ts +4 -8
- package/dist/types/src/schema/types/submit.d.ts +4 -8
- package/dist/types/src/transport/types.d.ts +3 -7
- package/package.json +1 -1
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.
|
|
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.
|
|
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 {
|
|
2
|
-
import { s as r } from "./primitives-
|
|
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(
|
|
642
|
-
return
|
|
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(
|
|
670
|
-
return
|
|
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 = (
|
|
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);
|
package/dist/mlform/builtins.mjs
CHANGED
|
@@ -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-
|
|
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 };
|
package/dist/mlform/kit.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as e, t } from "../runtime-
|
|
2
|
-
import {
|
|
3
|
-
import { n as i } from "../builtins-
|
|
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-
|
|
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 =
|
|
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,
|
|
1329
|
-
let i =
|
|
1330
|
-
return
|
|
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-
|
|
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 };
|
package/dist/mlform/runtime.mjs
CHANGED
|
@@ -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-
|
|
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 };
|
package/dist/mlform/schema.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as e, a as t,
|
|
2
|
-
export {
|
|
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
|
|
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
|