mlform 0.1.15 → 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.
- package/README.md +2 -2
- package/dist/{builtins-CcS-sHJa.js → builtins-DQTX_dwn.js} +9 -8
- package/dist/mlform/builtins.mjs +1 -1
- package/dist/mlform/kit.mjs +251 -231
- package/dist/mlform/primitives.mjs +1 -1
- package/dist/mlform/runtime.mjs +3 -3
- package/dist/mlform/schema.mjs +2 -2
- package/dist/mlform/transport.mjs +1 -1
- package/dist/{primitives-9obTthA6.js → primitives-BcXt2QWI.js} +83 -53
- package/dist/{runtime-Bn_x46y-.js → runtime-BxMSso-p.js} +630 -519
- package/dist/schema-D9V7-AkU.js +169 -0
- package/dist/{transport-D173EDlB.js → transport-BG3HPc3-.js} +196 -188
- package/dist/types/src/builtins/definitions/fields/series-helpers.d.ts +1 -0
- package/dist/types/src/builtins/definitions/shared.d.ts +1 -0
- package/dist/types/src/kit/mount-types.d.ts +2 -0
- package/dist/types/src/kit/view-core-types.d.ts +4 -1
- package/dist/types/src/primitives/components/form-root-templates.d.ts +3 -1
- package/dist/types/src/primitives/components/form-root.d.ts +3 -1
- package/dist/types/src/primitives/components/report-frame.d.ts +2 -1
- package/dist/types/src/primitives/controller-types.d.ts +44 -0
- package/dist/types/src/primitives/types.d.ts +6 -2
- package/dist/types/src/runtime/index.d.ts +4 -2
- package/dist/types/src/runtime/submission/index.d.ts +2 -0
- package/dist/types/src/runtime/submission/multi-backend.d.ts +25 -0
- package/dist/types/src/runtime/submission/request.d.ts +14 -0
- package/dist/types/src/runtime/submission/snapshot.d.ts +12 -0
- package/dist/types/src/runtime/types/behavior.d.ts +4 -0
- package/dist/types/src/runtime/types/field.d.ts +1 -0
- package/dist/types/src/runtime/types/form.d.ts +4 -0
- package/dist/types/src/runtime/types/transport.d.ts +11 -2
- package/dist/types/src/schema/index.d.ts +2 -0
- package/dist/types/src/schema/mapped-to.d.ts +9 -1
- package/dist/types/src/schema/onehot-display.d.ts +15 -0
- package/dist/types/src/schema/report-context.d.ts +17 -0
- package/dist/types/src/schema/types/field.d.ts +1 -0
- package/dist/types/src/schema/types/report.d.ts +6 -1
- package/dist/types/src/schema/types/submit.d.ts +30 -0
- package/dist/types/src/transport/types/core.d.ts +17 -0
- package/package.json +1 -1
- 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.
|
|
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.
|
|
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 {
|
|
2
|
-
import { s as r } from "./primitives-
|
|
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,
|
|
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 = () =>
|
|
746
|
-
let e =
|
|
747
|
-
for (let
|
|
748
|
-
for (let
|
|
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:
|
|
752
|
+
descriptorRegistry: t,
|
|
752
753
|
behaviors: [Q()]
|
|
753
754
|
};
|
|
754
755
|
};
|
package/dist/mlform/builtins.mjs
CHANGED
|
@@ -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-
|
|
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 };
|