mlform 0.1.10 → 0.1.12

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.10` is the current release in this repository.
12
+ Version `0.1.12` is the current release in this repository.
13
13
 
14
14
  ## Why MLForm
15
15
 
@@ -196,14 +196,14 @@ When built-in kinds are not enough, define your own field and report kinds witho
196
196
 
197
197
  ```ts
198
198
  import { createMlRegistryPack } from "mlform/builtins";
199
- import { defineFieldKind, registerDefinedFieldKind } from "mlform/presentation";
199
+ import { defineFieldKind, registerDefinedFieldKind } from "mlform/kit";
200
200
  import { z } from "zod";
201
201
 
202
202
  const pack = createMlRegistryPack();
203
203
 
204
204
  registerDefinedFieldKind(
205
205
  pack.registry,
206
- pack.presentationRegistry,
206
+ pack.descriptorRegistry,
207
207
  defineFieldKind({
208
208
  kind: "score",
209
209
  schema: z.object({
@@ -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.10`, use the repository release entry and the published docs as the source of truth:
309
+ For `0.1.12`, 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
1
  import { i as e, s as t } from "./schema-DSAZ6bts.js";
2
- import { s as n } from "./primitives-k9HTnd72.js";
2
+ import { s as n } from "./primitives-WssgAn8W.js";
3
3
  import * as r from "zod";
4
4
  //#region src/builtins/constants.ts
5
5
  var i = {
@@ -28,7 +28,6 @@ var i = {
28
28
  }, l = {
29
29
  invalidNumber: "Value must be a valid number.",
30
30
  textPatternMismatch: "Value does not match the expected pattern.",
31
- booleanRequired: "This field must be accepted.",
32
31
  categoryOptionMismatch: "Value must match one of the available options.",
33
32
  invalidTextLengthRange: "Minimum length cannot exceed maximum length.",
34
33
  invalidNumericRange: "Minimum value cannot exceed maximum value.",
@@ -167,9 +166,6 @@ var i = {
167
166
  normalizeValue(e) {
168
167
  return !!e;
169
168
  },
170
- validate(e, t) {
171
- return t.required && e !== !0 ? [l.booleanRequired] : [];
172
- },
173
169
  describe(e, t) {
174
170
  return y("boolean-field", e, {
175
171
  checked: t.state.value,
@@ -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-D8rXH4ED.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-DpaxP2NX.js";
2
2
  export { s as booleanFieldDefinition, t as builtinFieldKinds, y as builtinLegacyOutputTypes, x as builtinReportFallbacks, r as builtinReportKinds, b as builtinReportLabels, e as builtinValidationMessages, c as categoryFieldDefinition, n as classifierReportDefinition, _ as createBuiltinMlRegistry, h as createMappedCategoryBehavior, f as createMlRegistryPack, m as dateFieldDefinition, o as longTextFieldDefinition, d as mappedCategoryFieldDefinition, a as multiChoiceFieldDefinition, v as numberFieldDefinition, u as ratingFieldDefinition, l as regressorReportDefinition, g as seriesFieldDefinition, p as singleChoiceFieldDefinition, i as textFieldDefinition };
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "../runtime-CI7vlp9i.js";
2
2
  import { i as t, s as n } from "../schema-DSAZ6bts.js";
3
- import { n as r } from "../builtins-D8rXH4ED.js";
4
- import { _ as i, a, h as o, l as s, m as c, p as l, r as u, t as d } from "../primitives-k9HTnd72.js";
3
+ import { n as r } from "../builtins-DpaxP2NX.js";
4
+ import { _ as i, a, h as o, l as s, m as c, p as l, r as u, t as d } from "../primitives-WssgAn8W.js";
5
5
  import { d as f, h as p, r as m } from "../design-6suKVQDo.js";
6
6
  import { LitElement as h, css as g, html as _, nothing as v } from "lit";
7
7
  import { customElement as y, property as b, state as x } from "lit/decorators.js";
@@ -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-k9HTnd72.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-WssgAn8W.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 };
@@ -842,11 +842,11 @@ var re = () => new Promise((e) => {
842
842
  `, ce = (e) => ({
843
843
  component: "unsupported-field",
844
844
  props: { label: e.config.label ?? e.id }
845
- }), le = (e, t) => t?.getField(e.kind)?.describe(e.config, {
845
+ }), w = (e, t) => t?.getField(e.kind)?.describe(e.config, {
846
846
  fieldId: e.id,
847
847
  state: e.state,
848
848
  value: e.state.value
849
- }) ?? ce(e), ue = (e, t, n) => {
849
+ }) ?? ce(e), le = (e, t, n) => {
850
850
  let r = n?.getReport(e.kind);
851
851
  return r ? r.describe(e.config, {
852
852
  reportId: e.id,
@@ -854,25 +854,26 @@ var re = () => new Promise((e) => {
854
854
  payload: e.state.payload,
855
855
  result: t.state.lastResult
856
856
  }) : null;
857
- }, de = (e, t, n) => t.map((t) => e.getField(t)).filter((e) => e !== void 0).map((e) => ({
857
+ }, ue = (e, t, n) => t.map((t) => e.getField(t)).filter((e) => e !== void 0).map((e) => ({
858
858
  controller: e,
859
- descriptor: le(e, n)
860
- })), fe = (e, t, n, r) => (n === "always" ? e.reports : t.map((t) => e.getReport(t)).filter((e) => e !== void 0)).map((t) => ({
859
+ descriptor: w(e, n)
860
+ })), de = (e, t, n, r) => (n === "always" ? e.reports : t.map((t) => e.getReport(t)).filter((e) => e !== void 0)).map((t) => ({
861
861
  controller: t,
862
- descriptor: ue(t, e, r)
863
- })).filter((e) => e.descriptor !== null), pe = (e, t, r) => n`
862
+ descriptor: le(t, e, r)
863
+ })).filter((e) => e.descriptor !== null), fe = (e, t, r, i) => n`
864
864
  <div class="collection" part="field-list">
865
865
  ${s(e, (e) => e.controller.id, (e) => n`
866
866
  <mlf-field-frame
867
867
  data-field-id=${e.controller.id}
868
868
  .controller=${e.controller}
869
869
  .descriptor=${e.descriptor}
870
+ .descriptorRegistry=${r}
870
871
  .registry=${t}
871
- .text=${r}
872
+ .text=${i}
872
873
  ></mlf-field-frame>
873
874
  `)}
874
875
  </div>
875
- `, w = (e, t, r, i, a) => n`
876
+ `, pe = (e, t, r, i, a) => n`
876
877
  <div class="collection" part="report-list">
877
878
  ${s(e, (e) => e.controller.id, (e) => n`
878
879
  <mlf-report-frame
@@ -904,7 +905,7 @@ var re = () => new Promise((e) => {
904
905
  </div>
905
906
 
906
907
  <mlf-form-errors .form=${e.form} .text=${e.text}></mlf-form-errors>
907
- ${pe(e.visibleFields, e.registry, e.text)}
908
+ ${fe(e.visibleFields, e.registry, e.descriptorRegistry, e.text)}
908
909
  </div>
909
910
 
910
911
  <div class="actions" part="actions">
@@ -933,7 +934,7 @@ var re = () => new Promise((e) => {
933
934
  </header>
934
935
 
935
936
  <div class="pane-body">
936
- ${w(e.reportsToRender, e.registry, e.text, e.reportTransport, e.form.state.lastResult ?? null)}
937
+ ${pe(e.reportsToRender, e.registry, e.text, e.reportTransport, e.form.state.lastResult ?? null)}
937
938
  </div>
938
939
  </aside>
939
940
  ` : r}
@@ -956,7 +957,7 @@ var re = () => new Promise((e) => {
956
957
  </div>
957
958
 
958
959
  <mlf-form-errors .form=${e.form} .text=${e.text}></mlf-form-errors>
959
- ${pe(e.visibleFields, e.registry, e.text)}
960
+ ${fe(e.visibleFields, e.registry, e.descriptorRegistry, e.text)}
960
961
  </div>
961
962
  </div>
962
963
 
@@ -984,7 +985,7 @@ var re = () => new Promise((e) => {
984
985
  </header>
985
986
 
986
987
  <div class="split-content">
987
- ${e.reportsToRender.length > 0 ? w(e.reportsToRender, e.registry, e.text, e.reportTransport, e.form.state.lastResult ?? null) : n`
988
+ ${e.reportsToRender.length > 0 ? pe(e.reportsToRender, e.registry, e.text, e.reportTransport, e.form.state.lastResult ?? null) : n`
988
989
  <div class="empty-report-state">
989
990
  <p class="empty-report-title">${e.text.reportsEmptyTitle}</p>
990
991
  <p class="empty-report-copy">${e.text.reportsEmptyBody}</p>
@@ -1118,7 +1119,7 @@ var re = () => new Promise((e) => {
1118
1119
  render() {
1119
1120
  let e = this.form, t = this.formState;
1120
1121
  if (!e || !t) return n``;
1121
- let r = this.text, i = de(e, t.visibleFieldIds, this.descriptorRegistry), a = fe(e, t.visibleReportIds, this.reportPane, this.descriptorRegistry), o = this.reportPane !== "hidden" && (e.reports.length > 0 || t.hasFormErrors), s = this.layout === "split" ? o : this.reportPane === "always" ? e.reports.length > 0 : this.reportPane === "auto" ? a.length > 0 : !1;
1122
+ let r = this.text, i = ue(e, t.visibleFieldIds, this.descriptorRegistry), a = de(e, t.visibleReportIds, this.reportPane, this.descriptorRegistry), o = this.reportPane !== "hidden" && (e.reports.length > 0 || t.hasFormErrors), s = this.layout === "split" ? o : this.reportPane === "always" ? e.reports.length > 0 : this.reportPane === "auto" ? a.length > 0 : !1;
1122
1123
  return this.layout === "split" ? he({
1123
1124
  form: e,
1124
1125
  state: t,
@@ -1126,6 +1127,7 @@ var re = () => new Promise((e) => {
1126
1127
  reportsToRender: a,
1127
1128
  showReports: s,
1128
1129
  registry: this.registry,
1130
+ descriptorRegistry: this.descriptorRegistry,
1129
1131
  text: r,
1130
1132
  formLabel: this.formLabel,
1131
1133
  reportsLabel: this.reportsLabel,
@@ -1141,6 +1143,7 @@ var re = () => new Promise((e) => {
1141
1143
  reportsToRender: a,
1142
1144
  showReports: s,
1143
1145
  registry: this.registry,
1146
+ descriptorRegistry: this.descriptorRegistry,
1144
1147
  text: r,
1145
1148
  formLabel: this.formLabel,
1146
1149
  reportsLabel: this.reportsLabel,
@@ -1732,62 +1735,69 @@ var N = class {
1732
1735
  this.#t = e;
1733
1736
  }
1734
1737
  #n;
1735
- get registry() {
1738
+ get descriptorRegistry() {
1736
1739
  return this.#n;
1737
1740
  }
1738
- set registry(e) {
1741
+ set descriptorRegistry(e) {
1739
1742
  this.#n = e;
1740
1743
  }
1741
- #r = m;
1742
- get text() {
1744
+ #r;
1745
+ get registry() {
1743
1746
  return this.#r;
1744
1747
  }
1745
- set text(e) {
1748
+ set registry(e) {
1746
1749
  this.#r = e;
1747
1750
  }
1748
- #i = null;
1749
- get resolvedDescriptor() {
1751
+ #i = m;
1752
+ get text() {
1750
1753
  return this.#i;
1751
1754
  }
1752
- set resolvedDescriptor(e) {
1755
+ set text(e) {
1753
1756
  this.#i = e;
1754
1757
  }
1755
1758
  #a = null;
1756
- get fieldState() {
1759
+ get resolvedDescriptor() {
1757
1760
  return this.#a;
1758
1761
  }
1759
- set fieldState(e) {
1762
+ set resolvedDescriptor(e) {
1760
1763
  this.#a = e;
1761
1764
  }
1762
1765
  #o = null;
1763
- get descriptionVisibilityOverride() {
1766
+ get fieldState() {
1764
1767
  return this.#o;
1765
1768
  }
1766
- set descriptionVisibilityOverride(e) {
1769
+ set fieldState(e) {
1767
1770
  this.#o = e;
1768
1771
  }
1769
- #s = ++we;
1770
- #c;
1771
- #l = null;
1772
+ #s = null;
1773
+ get descriptionVisibilityOverride() {
1774
+ return this.#s;
1775
+ }
1776
+ set descriptionVisibilityOverride(e) {
1777
+ this.#s = e;
1778
+ }
1779
+ #c = ++we;
1780
+ #l;
1772
1781
  #u = null;
1773
- #d = "";
1782
+ #d = null;
1774
1783
  #f = "";
1775
- #p = new N(this, (e) => {
1776
- this.resolvedDescriptor = this.descriptor, this.fieldState = e?.state ?? null, this.resolvedDescriptor?.props.description || (this.descriptionVisibilityOverride = null);
1784
+ #p = "";
1785
+ #m = new N(this, (e) => {
1786
+ this.resolvedDescriptor = this.#g(e), this.fieldState = e?.state ?? null, this.resolvedDescriptor?.props.description || (this.descriptionVisibilityOverride = null);
1777
1787
  });
1778
1788
  willUpdate(e) {
1779
- e.has("controller") && this.#p.bind(this.controller), e.has("descriptor") && (this.resolvedDescriptor = this.descriptor), e.has("descriptor") && !this.resolvedDescriptor?.props.description && (this.descriptionVisibilityOverride = null);
1789
+ e.has("controller") && this.#m.bind(this.controller), (e.has("controller") || e.has("descriptor") || e.has("descriptorRegistry")) && (this.resolvedDescriptor = this.#g(this.controller)), e.has("descriptor") && !this.resolvedDescriptor?.props.description && (this.descriptionVisibilityOverride = null);
1780
1790
  }
1781
1791
  render() {
1782
1792
  let e = this.resolvedDescriptor, t = this.fieldState;
1783
1793
  if (!e || !t || !t.visible) return c``;
1784
- let n = e.props, r = this.registry?.resolveField(e.component), i = F(n.label, this.controller?.config.label ?? ""), a = F(n.description), o = this.#v(a), s = Se(e.component, n, t, this.controller?.config.defaultValue), l = ye(t.errors), u = Ce(e.component, n, t, this.text), d = l.length > 0 && (t.touched || s), f = d ? {
1794
+ let n = e.props, r = this.registry?.resolveField(e.component), i = F(n.label, this.controller?.config.label ?? ""), a = F(n.description), o = this.#b(a), s = Se(e.component, n, t, this.controller?.config.defaultValue), l = ye(t.errors), u = Ce(e.component, n, t, this.text), d = l.length > 0 && (t.touched || s), f = d ? {
1785
1795
  tone: "error",
1786
1796
  message: l
1787
1797
  } : s && t.valid ? {
1788
1798
  tone: "success",
1789
1799
  message: u
1790
- } : null, p = d ? "error" : s && t.valid ? "success" : "", m = `${g.fieldControl}-${this.controller?.id}-${this.#s}`, h = `${g.fieldErrors}-${this.controller?.id}-${this.#s}`, _ = `${g.fieldDescription}-${this.controller?.id}-${this.#s}-details`;
1800
+ } : null, p = d ? "error" : s && t.valid ? "success" : "", m = `${g.fieldControl}-${this.controller?.id}-${this.#c}`, h = `${g.fieldErrors}-${this.controller?.id}-${this.#c}`, _ = `${g.fieldDescription}-${this.controller?.id}-${this.#c}-details`;
1791
1801
  return c`
1792
1802
  <section
1793
1803
  class="tile ${p}"
@@ -1803,7 +1813,7 @@ var N = class {
1803
1813
  aria-expanded=${String(o)}
1804
1814
  aria-controls=${_}
1805
1815
  ?disabled=${a.length === 0}
1806
- @click=${this.#_}
1816
+ @click=${this.#y}
1807
1817
  >
1808
1818
  ${this.text.helpActionGlyph}
1809
1819
  </button>
@@ -1816,7 +1826,7 @@ var N = class {
1816
1826
  ` : c``}
1817
1827
 
1818
1828
  <div class="control-slot">
1819
- ${r ? this.#m(r, m, h) : c`
1829
+ ${r ? this.#h(r, m, h) : c`
1820
1830
  <mlf-unsupported-component
1821
1831
  role="field"
1822
1832
  component=${e.component}
@@ -1837,8 +1847,8 @@ var N = class {
1837
1847
  </section>
1838
1848
  `;
1839
1849
  }
1840
- #m(e, t, n) {
1841
- let r = l(e), i = this.#h(t, n), a = this.resolvedDescriptor;
1850
+ #h(e, t, n) {
1851
+ let r = l(e), i = this.#_(t, n), a = this.resolvedDescriptor;
1842
1852
  return c`
1843
1853
  <${r}
1844
1854
  .controller=${this.controller}
@@ -1848,14 +1858,17 @@ var N = class {
1848
1858
  ></${r}>
1849
1859
  `;
1850
1860
  }
1851
- #h(e, t) {
1852
- if (this.resolvedDescriptor === this.#l && this.fieldState === this.#u && e === this.#d && t === this.#f) return this.#c;
1853
- let n = this.#g(this.resolvedDescriptor?.props ?? {}, this.fieldState, e, t);
1854
- return this.#l = this.resolvedDescriptor, this.#u = this.fieldState, this.#d = e, this.#f = t, this.#c = n, n;
1861
+ #g(e) {
1862
+ return e && this.descriptorRegistry ? w(e, this.descriptorRegistry) : this.descriptor;
1863
+ }
1864
+ #_(e, t) {
1865
+ if (this.resolvedDescriptor === this.#u && this.fieldState === this.#d && e === this.#f && t === this.#p) return this.#l;
1866
+ let n = this.#v(this.resolvedDescriptor?.props ?? {}, this.fieldState, e, t);
1867
+ return this.#u = this.resolvedDescriptor, this.#d = this.fieldState, this.#f = e, this.#p = t, this.#l = n, n;
1855
1868
  }
1856
- #g(e, t, n, r) {
1869
+ #v(e, t, n, r) {
1857
1870
  if (!this.controller || !t) return;
1858
- let i = typeof e.description == "string" && e.description.length > 0 ? e.description : void 0, a = i ? `${g.fieldDescription}-${this.controller.id}-${this.#s}` : void 0, o = [a, r].filter(Boolean).join(" ") || void 0;
1871
+ let i = typeof e.description == "string" && e.description.length > 0 ? e.description : void 0, a = i ? `${g.fieldDescription}-${this.controller.id}-${this.#c}` : void 0, o = [a, r].filter(Boolean).join(" ") || void 0;
1859
1872
  return {
1860
1873
  controlId: n,
1861
1874
  label: F(e.label, this.controller.config.label),
@@ -1870,14 +1883,14 @@ var N = class {
1870
1883
  readOnly: t.readOnly
1871
1884
  };
1872
1885
  }
1873
- #_ = () => {
1874
- this.resolvedDescriptor?.props.description && (this.descriptionVisibilityOverride = !this.#v(F(this.resolvedDescriptor.props.description)));
1886
+ #y = () => {
1887
+ this.resolvedDescriptor?.props.description && (this.descriptionVisibilityOverride = !this.#b(F(this.resolvedDescriptor.props.description)));
1875
1888
  };
1876
- #v(e) {
1889
+ #b(e) {
1877
1890
  return e.length === 0 ? !1 : this.descriptionVisibilityOverride ?? this.resolvedDescriptor?.props.showDescriptionInline === !0;
1878
1891
  }
1879
1892
  };
1880
- _([a({ attribute: !1 })], R.prototype, "controller", null), _([a({ attribute: !1 })], R.prototype, "descriptor", null), _([a({ attribute: !1 })], R.prototype, "registry", null), _([a({ attribute: !1 })], R.prototype, "text", null), _([o()], R.prototype, "resolvedDescriptor", null), _([o()], R.prototype, "fieldState", null), _([o()], R.prototype, "descriptionVisibilityOverride", null), R = _([i(d.fieldFrame)], R);
1893
+ _([a({ attribute: !1 })], R.prototype, "controller", null), _([a({ attribute: !1 })], R.prototype, "descriptor", null), _([a({ attribute: !1 })], R.prototype, "descriptorRegistry", null), _([a({ attribute: !1 })], R.prototype, "registry", null), _([a({ attribute: !1 })], R.prototype, "text", null), _([o()], R.prototype, "resolvedDescriptor", null), _([o()], R.prototype, "fieldState", null), _([o()], R.prototype, "descriptionVisibilityOverride", null), R = _([i(d.fieldFrame)], R);
1881
1894
  //#endregion
1882
1895
  //#region src/primitives/controller-types.ts
1883
1896
  var Te = (e, t = {}) => ({
@@ -29,7 +29,6 @@ export declare const builtinReportFallbacks: {
29
29
  export declare const builtinValidationMessages: {
30
30
  readonly invalidNumber: "Value must be a valid number.";
31
31
  readonly textPatternMismatch: "Value does not match the expected pattern.";
32
- readonly booleanRequired: "This field must be accepted.";
33
32
  readonly categoryOptionMismatch: "Value must match one of the available options.";
34
33
  readonly invalidTextLengthRange: "Minimum length cannot exceed maximum length.";
35
34
  readonly invalidNumericRange: "Minimum value cannot exceed maximum value.";
@@ -33,7 +33,7 @@ export declare const builtinFieldDefinitions: readonly [import('./shared').Built
33
33
  min?: string;
34
34
  max?: string;
35
35
  step?: number;
36
- }, Date | null>, import('./shared').BuiltinFieldDefinition<import('./fields/series-helpers').SeriesFieldConfig, import('./fields/series-helpers').SeriesPoint[]>, import('./shared').BuiltinFieldDefinition<import('../../schema').BaseFieldConfig & {
36
+ }, Date | null>, import('./shared').BuiltinFieldDefinition<import('.').SeriesFieldConfig, import('.').SeriesPoint[]>, import('./shared').BuiltinFieldDefinition<import('../../schema').BaseFieldConfig & {
37
37
  kind: "long-text";
38
38
  placeholder?: string;
39
39
  minLength?: number;
@@ -12,3 +12,5 @@ export { textFieldDefinition } from './fields/text';
12
12
  export { classifierReportDefinition } from './reports/classifier';
13
13
  export { regressorReportDefinition } from './reports/regressor';
14
14
  export { builtinFieldDefinitions, builtinReportDefinitions } from './collections';
15
+ export type { SeriesFieldConfig, SeriesPoint, SeriesSubFieldConfig } from './fields/series-helpers';
16
+ export type { BuiltinFieldConfig, BuiltinFieldDefinition, BuiltinReportConfig, BuiltinReportDefinition, } from './shared';
@@ -1,5 +1,6 @@
1
1
  export * from './constants';
2
2
  export { booleanFieldDefinition, categoryFieldDefinition, classifierReportDefinition, dateFieldDefinition, longTextFieldDefinition, mappedCategoryFieldDefinition, multiChoiceFieldDefinition, numberFieldDefinition, ratingFieldDefinition, regressorReportDefinition, seriesFieldDefinition, singleChoiceFieldDefinition, textFieldDefinition, } from './definitions';
3
+ export type { BuiltinFieldConfig, BuiltinFieldDefinition, BuiltinReportConfig, BuiltinReportDefinition, SeriesFieldConfig, SeriesPoint, SeriesSubFieldConfig, } from './definitions';
3
4
  export { createMappedCategoryBehavior } from './mapped-category-behavior';
4
5
  export { createBuiltinMlRegistry, createMlRegistryPack } from './registry-pack';
5
6
  export type { MlRegistryPack } from './registry-pack';
@@ -1,6 +1,6 @@
1
1
  export type { AttachDesignSystemOptions, AttachedDesignSystem, ComponentManifest, Density, DesignSystemConfig, DesignSystemControllerOptions, DesignSystemMode, DesignSystemRegistry, DesignSystemRegistryChangeEvent, DesignSystemRegistryChangeListener, DesignSystemRegistryChangeType, DesignSystemScheme, DesignSystemTransitionContext, DesignSystemTransition, DesignSystemWarning, DesignSystemWarningCode, EffectiveModeSource, Motion, GlobalTokenKey, GlobalTokenMap, ComponentTokenKey, ComponentTokenMap, RecipeManifest, ResolvedComponentConfig, ResolvedDesignSystem, ResolveDesignSystemRuntimeOptions, ThemeManifest, ThemeScheme, ThemeVariant, TokenMap, } from './types';
2
2
  export { componentKeys, componentTokenDefaults, globalTokenDefaults, mlfTokenKeys, } from './contract';
3
- export type { MlfTokenKey } from './contract';
3
+ export type { ComponentKey, ComponentTokenManifest, MlfTokenKey } from './contract';
4
4
  export { builtinRecipes, builtinThemes, builtinDesignSystemRegistry, createBuiltinDesignSystemRegistry, createDesignSystemRegistry, defineComponentTokens, defineGlobalTokens, defineRecipe, defineTheme, } from './registry';
5
5
  export { mergeDesignSystemConfig, migrateTokens, migrateThemeTokens, resolveDesignSystem, } from './resolve';
6
6
  export type { TokenMigration, TokenMigrationConflict } from './resolve';
@@ -4,4 +4,5 @@ export { mountForm, unmountForm } from './mount-form';
4
4
  export { createFormView } from './view';
5
5
  export { defineFieldKind, defineReportKind } from './kinds';
6
6
  export { registerDefinedFieldKind, registerDefinedReportKind } from './kinds';
7
+ export type { DeclarativeFieldKind, DeclarativeReportKind, DefinedFieldKind, DefinedReportKind, ReportRenderSpec, ReportRenderSpecContext, } from './kinds';
7
8
  export type { CreateFormViewOptions, DisclosureState, FormLayoutConfig, FormLayoutFieldNode, FormLayoutGroupNode, FormLayoutNode, FormLayoutReportNode, FormLayoutSectionNode, FormViewController, FormViewFieldItem, FormViewReportItem, FormViewSnapshot, FormViewState, KitDesignSystemSnapshot, KitLabels, MountFormOptions, MountedForm, PanelState, ResolvedFormLayout, ResolvedFormLayoutFieldNode, ResolvedFormLayoutGroupNode, ResolvedFormLayoutNode, ResolvedFormLayoutReportNode, ResolvedFormLayoutSectionNode, ResolvedTabLayout, ResolvedTabsLayout, TabsLayoutConfig, TabsState, TabLayoutConfig, WizardLayoutConfig, WizardState, WizardStepConfig, } from './types';
@@ -1,6 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
2
  import { PrimitiveFieldController } from '../controller-types';
3
- import { FieldDescriptor } from '../descriptors';
3
+ import { FieldDescriptor, PrimitiveDescriptorRegistry } from '../descriptors';
4
4
  import { primitiveTagNames, PrimitiveText } from '../constants';
5
5
  import { PrimitiveRegistry } from '../types';
6
6
  export declare class PrimitiveFieldFrameElement extends LitElement {
@@ -8,6 +8,7 @@ export declare class PrimitiveFieldFrameElement extends LitElement {
8
8
  static styles: import('lit').CSSResult;
9
9
  accessor controller: PrimitiveFieldController | undefined;
10
10
  accessor descriptor: FieldDescriptor | null;
11
+ accessor descriptorRegistry: PrimitiveDescriptorRegistry | undefined;
11
12
  accessor registry: PrimitiveRegistry | undefined;
12
13
  accessor text: PrimitiveText;
13
14
  private accessor resolvedDescriptor;
@@ -1,5 +1,6 @@
1
1
  import { TemplateResult } from 'lit';
2
2
  import { PrimitiveFormController } from '../controller-types';
3
+ import { PrimitiveDescriptorRegistry } from '../descriptors';
3
4
  import { PrimitiveText } from '../constants';
4
5
  import { PrimitiveRegistry, PrimitiveReportTransport } from '../types';
5
6
  import { FormRenderState } from './form-root-state';
@@ -11,6 +12,7 @@ export declare const renderStackedLayout: (options: {
11
12
  reportsToRender: readonly PresentedReport[];
12
13
  showReports: boolean;
13
14
  registry: PrimitiveRegistry | undefined;
15
+ descriptorRegistry: PrimitiveDescriptorRegistry | undefined;
14
16
  text: PrimitiveText;
15
17
  formLabel: string;
16
18
  reportsLabel: string;
@@ -27,6 +29,7 @@ export declare const renderSplitLayout: (options: {
27
29
  reportsToRender: readonly PresentedReport[];
28
30
  showReports: boolean;
29
31
  registry: PrimitiveRegistry | undefined;
32
+ descriptorRegistry: PrimitiveDescriptorRegistry | undefined;
30
33
  text: PrimitiveText;
31
34
  formLabel: string;
32
35
  reportsLabel: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mlform",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "private": false,
5
5
  "description": "Composable form generation utilities for machine learning backend integration",
6
6
  "keywords": [
@@ -52,31 +52,31 @@
52
52
  "type": "module",
53
53
  "exports": {
54
54
  "./kit": {
55
- "types": "./dist/types/src/kit/index.d.ts",
55
+ "types": "./dist/types/kit/index.d.ts",
56
56
  "import": "./dist/mlform/kit.mjs"
57
57
  },
58
58
  "./runtime": {
59
- "types": "./dist/types/src/runtime/index.d.ts",
59
+ "types": "./dist/types/runtime/index.d.ts",
60
60
  "import": "./dist/mlform/runtime.mjs"
61
61
  },
62
62
  "./schema": {
63
- "types": "./dist/types/src/schema/index.d.ts",
63
+ "types": "./dist/types/schema/index.d.ts",
64
64
  "import": "./dist/mlform/schema.mjs"
65
65
  },
66
66
  "./builtins": {
67
- "types": "./dist/types/src/builtins/index.d.ts",
67
+ "types": "./dist/types/builtins/index.d.ts",
68
68
  "import": "./dist/mlform/builtins.mjs"
69
69
  },
70
70
  "./transport": {
71
- "types": "./dist/types/src/transport/index.d.ts",
71
+ "types": "./dist/types/transport/index.d.ts",
72
72
  "import": "./dist/mlform/transport.mjs"
73
73
  },
74
74
  "./primitives": {
75
- "types": "./dist/types/src/primitives/index.d.ts",
75
+ "types": "./dist/types/primitives/index.d.ts",
76
76
  "import": "./dist/mlform/primitives.mjs"
77
77
  },
78
78
  "./design": {
79
- "types": "./dist/types/src/design/index.d.ts",
79
+ "types": "./dist/types/design/index.d.ts",
80
80
  "import": "./dist/mlform/design.mjs"
81
81
  }
82
82
  },