mlform 0.1.4 → 0.1.6

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.
@@ -1,6 +1,6 @@
1
1
  import { f as e, h as t, r as n } from "./design-system-CrrSGfFB.js";
2
- import { E as r, l as i, t as a } from "./engine-nnhWPT2L.js";
3
- import { f as o, r as s, t as c } from "./primitives-Pi-ztAr6.js";
2
+ import { D as r, l as i, t as a } from "./engine-tP-QTA_5.js";
3
+ import { f as o, r as s, t as c } from "./primitives-BtI1xyZz.js";
4
4
  //#region src/kit/defaults.ts
5
5
  var l = { ...o }, u = {
6
6
  mode: "auto",
@@ -1,3 +1,3 @@
1
1
  import { K as e, q as t } from "../transport-A1RsnZhD.js";
2
- import { A as n, C as r, D as i, E as a, F as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, T as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, h as S, i as C, j as w, k as T, l as E, m as D, n as O, o as k, p as A, r as j, s as M, t as N, u as P, v as F, w as I, x as L, y as R } from "../engine-nnhWPT2L.js";
3
- export { u as EngineError, m as EngineRegistry, f as RegistryError, o as ReportPayloadError, s as SubmissionAbortedError, c as SubmitError, e as TransportError, p as ValidationError, I as booleanFieldDefinition, r as categoryFieldDefinition, y as classifierReportDefinition, E as createBuiltinRegistry, C as createExplanationController, N as createForm, a as createRegistry, R as dateFieldDefinition, g as defaultEquality, i as defineExplanationDefinition, l as defineExplanationKind, d as defineFieldDefinition, w as defineFieldKind, T as defineReportDefinition, n as defineReportKind, j as executeExplanations, O as executeFormPipeline, _ as identity, L as isPromiseLike, F as longTextFieldDefinition, h as multiChoiceFieldDefinition, x as numberFieldDefinition, S as ratingFieldDefinition, P as regressorReportDefinition, A as seriesFieldDefinition, k as shallowArrayEquality, M as shallowEquality, v as shallowObjectEquality, b as singleChoiceFieldDefinition, D as textFieldDefinition, t as transportErrorCodes };
2
+ import { A as n, C as r, D as i, E as a, F as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, T as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, h as S, i as C, j as w, k as T, l as E, m as D, n as O, o as k, p as A, r as j, s as M, t as N, u as P, v as F, w as I, x as L, y as R, z } from "../engine-tP-QTA_5.js";
3
+ export { f as EngineError, a as EngineRegistry, o as RegistryError, s as ReportPayloadError, c as SubmissionAbortedError, p as SubmitError, e as TransportError, z as ValidationError, m as booleanFieldDefinition, I as categoryFieldDefinition, y as classifierReportDefinition, E as createBuiltinRegistry, C as createExplanationController, N as createForm, i as createRegistry, R as dateFieldDefinition, g as defaultEquality, d as defineExplanationDefinition, u as defineExplanationKind, T as defineFieldDefinition, l as defineFieldKind, n as defineReportDefinition, w as defineReportKind, j as executeExplanations, O as executeFormPipeline, _ as identity, L as isPromiseLike, F as longTextFieldDefinition, r as mappedCategoryFieldDefinition, h as multiChoiceFieldDefinition, x as numberFieldDefinition, S as ratingFieldDefinition, P as regressorReportDefinition, A as seriesFieldDefinition, k as shallowArrayEquality, M as shallowEquality, v as shallowObjectEquality, b as singleChoiceFieldDefinition, D as textFieldDefinition, t as transportErrorCodes };
@@ -1,3 +1,3 @@
1
1
  import { A as e, C as t, D as n, E as r, F as i, M as a, N as o, O as s, P as c, R as l, S as u, T as d, _ as f, a as p, b as m, c as h, d as g, f as _, g as v, h as y, i as b, j as x, k as S, l as C, m as w, n as T, o as E, p as D, r as O, s as k, t as A, u as j, v as M, w as N, x as P, y as F, z as I } from "../transport-A1RsnZhD.js";
2
- import { i as L, n as R, r as z, t as B } from "../kit-Dt_1Fxlc.js";
2
+ import { i as L, n as R, r as z, t as B } from "../kit-fHGskli5.js";
3
3
  export { l as assertPayloadWithinLimits, I as assertTransportCapabilities, p as createFallbackTransport, E as createFanoutTransport, c as createGraphqlTransport, n as createGrpcSessionTransport, s as createGrpcStreamTransport, S as createGrpcTransport, e as createGrpcUnaryTransport, T as createHedgedTransport, i as createJsonTransport, h as createLoadBalancedTransport, f as createMemoryCircuitBreakerState, y as createMemorySharedRateLimiter, _ as createMemoryTransportCacheStore, A as createMemoryTransportHealthState, b as createPipelineTransport, k as createQuorumFanoutTransport, O as createRacingTransport, C as createRoutingTransport, a as createSessionTransport, o as createSseTransport, x as createWebSocketSessionTransport, j as createWeightedRoutingTransport, z as defaultKitDesignSystem, L as defaultKitLabels, B as mountForm, r as pipe, R as unmountForm, M as withAuth, g as withCache, v as withCircuitBreaker, D as withDedup, P as withLogging, F as withMetrics, w as withRateLimit, u as withRequestTransform, t as withResponseTransform, d as withRetry, N as withTimeout, m as withTracing };
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, f as n, i as r, l as i, m as a, n as o, p as s, r as c, s as l, t as u } from "../primitives-Pi-ztAr6.js";
1
+ import { a as e, c as t, f as n, i as r, l as i, m as a, n as o, p as s, r as c, s as l, t as u } from "../primitives-BtI1xyZz.js";
2
2
  export { e as PrimitiveAsyncReportElement, l as PrimitiveExplanationElement, i as PrimitiveFieldElement, t as PrimitiveReportElement, c as createBuiltinPrimitiveRegistry, r as createPrimitiveRegistry, u as mountForm, n as primitiveDefaultLabels, s as primitiveStaticText, a as resolvePrimitiveText, o as unmountForm };
@@ -1,6 +1,6 @@
1
1
  import { f as e, h as t, r as n } from "../design-system-CrrSGfFB.js";
2
- import { E as r, I as i, S as a, l as o, t as s } from "../engine-nnhWPT2L.js";
3
- import { _ as c, b as l, d as u, g as d, h as f, m as p, o as m, p as h, r as g, u as _, v, x as y, y as b } from "../primitives-Pi-ztAr6.js";
2
+ import { D as r, L as i, S as a, l as o, t as s } from "../engine-tP-QTA_5.js";
3
+ import { _ as c, b as l, d as u, g as d, h as f, m as p, o as m, p as h, r as g, u as _, v, x as y, y as b } from "../primitives-BtI1xyZz.js";
4
4
  //#region src/questionnaire/constants.ts
5
5
  var x = {
6
6
  questionnaire: "mlf-questionnaire",
package/dist/mlform.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, K 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 _, W as v, _ as y, a as b, b as x, c as S, d as C, f as w, g as T, h as E, i as D, j as O, k, l as A, m as j, n as M, o as N, p as P, q as F, r as I, s as L, t as R, u as z, v as B, w as V, x as H, y as U, z as W } from "./transport-A1RsnZhD.js";
2
- import { A as G, D as K, M as q, i as J, j as Y, n as X, r as Z } from "./engine-nnhWPT2L.js";
3
- import { i as Q, n as $, r as ee, t as te } from "./kit-Dt_1Fxlc.js";
4
- export { c as TransportError, p as assertPayloadWithinLimits, W as assertTransportCapabilities, t as cloneCapabilities, J as createExplanationController, b as createFallbackTransport, N as createFanoutTransport, f as createGraphqlTransport, r as createGrpcSessionTransport, d as createGrpcStreamTransport, k as createGrpcTransport, e as createGrpcUnaryTransport, M as createHedgedTransport, a as createJsonTransport, S as createLoadBalancedTransport, y as createMemoryCircuitBreakerState, E as createMemorySharedRateLimiter, w as createMemoryTransportCacheStore, R as createMemoryTransportHealthState, D as createPipelineTransport, L as createQuorumFanoutTransport, I as createRacingTransport, A as createRoutingTransport, l as createSessionTransport, u as createSseTransport, O as createWebSocketSessionTransport, z as createWeightedRoutingTransport, ee as defaultKitDesignSystem, Q as defaultKitLabels, K as defineExplanationDefinition, q as defineExplanationKind, Y as defineFieldKind, G as defineReportKind, Z as executeExplanations, X as executeFormPipeline, _ as inferTransportCapabilities, s as mergeTransportCapabilities, te as mountForm, g as normalizeTransportCapabilities, i as pipe, v as transportDefaults, F as transportErrorCodes, o as transportErrorMessages, $ as unmountForm, B as withAuth, C as withCache, T as withCircuitBreaker, P as withDedup, H as withLogging, U as withMetrics, j as withRateLimit, m as withRequestTransform, n as withResponseTransform, h as withRetry, V as withTimeout, x as withTracing };
2
+ import { M as G, N as K, O as q, i as J, j as Y, n as X, r as Z } from "./engine-tP-QTA_5.js";
3
+ import { i as Q, n as $, r as ee, t as te } from "./kit-fHGskli5.js";
4
+ export { c as TransportError, p as assertPayloadWithinLimits, W as assertTransportCapabilities, t as cloneCapabilities, J as createExplanationController, b as createFallbackTransport, N as createFanoutTransport, f as createGraphqlTransport, r as createGrpcSessionTransport, d as createGrpcStreamTransport, k as createGrpcTransport, e as createGrpcUnaryTransport, M as createHedgedTransport, a as createJsonTransport, S as createLoadBalancedTransport, y as createMemoryCircuitBreakerState, E as createMemorySharedRateLimiter, w as createMemoryTransportCacheStore, R as createMemoryTransportHealthState, D as createPipelineTransport, L as createQuorumFanoutTransport, I as createRacingTransport, A as createRoutingTransport, l as createSessionTransport, u as createSseTransport, O as createWebSocketSessionTransport, z as createWeightedRoutingTransport, ee as defaultKitDesignSystem, Q as defaultKitLabels, q as defineExplanationDefinition, K as defineExplanationKind, G as defineFieldKind, Y as defineReportKind, Z as executeExplanations, X as executeFormPipeline, _ as inferTransportCapabilities, s as mergeTransportCapabilities, te as mountForm, g as normalizeTransportCapabilities, i as pipe, v as transportDefaults, F as transportErrorCodes, o as transportErrorMessages, $ as unmountForm, B as withAuth, C as withCache, T as withCircuitBreaker, P as withDedup, H as withLogging, U as withMetrics, j as withRateLimit, m as withRequestTransform, n as withResponseTransform, h as withRetry, V as withTimeout, x as withTracing };
@@ -1,4 +1,4 @@
1
- import { I as e } from "./engine-nnhWPT2L.js";
1
+ import { L as e } from "./engine-tP-QTA_5.js";
2
2
  //#region node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js
3
3
  var t = globalThis, n = t.ShadowRoot && (t.ShadyCSS === void 0 || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, r = Symbol(), i = /* @__PURE__ */ new WeakMap(), a = class {
4
4
  constructor(e, t, n) {
@@ -0,0 +1,12 @@
1
+ import { BaseFieldConfig, FieldDefinition } from '../../types';
2
+ type MappedCategoryOption = {
3
+ label: string;
4
+ value: string;
5
+ mapping: Record<string, unknown>;
6
+ };
7
+ type MappedCategoryFieldConfig = BaseFieldConfig & {
8
+ kind: "mapped-category";
9
+ options: MappedCategoryOption[];
10
+ };
11
+ export declare const mappedCategoryFieldDefinition: FieldDefinition<MappedCategoryFieldConfig, string | null>;
12
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { Registry } from '../types';
2
2
  import { booleanFieldDefinition } from './fields/boolean';
3
3
  import { categoryFieldDefinition } from './fields/category';
4
+ import { mappedCategoryFieldDefinition } from './fields/mapped-category';
4
5
  import { dateFieldDefinition } from './fields/date';
5
6
  import { longTextFieldDefinition } from './fields/long-text';
6
7
  import { multiChoiceFieldDefinition } from './fields/multi-choice';
@@ -11,7 +12,7 @@ import { singleChoiceFieldDefinition } from './fields/single-choice';
11
12
  import { textFieldDefinition } from './fields/text';
12
13
  import { classifierReportDefinition } from './reports/classifier';
13
14
  import { regressorReportDefinition } from './reports/regressor';
14
- export { booleanFieldDefinition, categoryFieldDefinition, classifierReportDefinition, dateFieldDefinition, longTextFieldDefinition, multiChoiceFieldDefinition, numberFieldDefinition, ratingFieldDefinition, regressorReportDefinition, seriesFieldDefinition, singleChoiceFieldDefinition, textFieldDefinition, };
15
+ export { booleanFieldDefinition, categoryFieldDefinition, classifierReportDefinition, dateFieldDefinition, mappedCategoryFieldDefinition, longTextFieldDefinition, multiChoiceFieldDefinition, numberFieldDefinition, ratingFieldDefinition, regressorReportDefinition, seriesFieldDefinition, singleChoiceFieldDefinition, textFieldDefinition, };
15
16
  export declare const builtinFieldDefinitions: readonly [import('..').FieldDefinition<import('..').BaseFieldConfig & {
16
17
  kind: "text";
17
18
  placeholder?: string;
@@ -35,6 +36,13 @@ export declare const builtinFieldDefinitions: readonly [import('..').FieldDefini
35
36
  label: string;
36
37
  value: string;
37
38
  })[];
39
+ }, string | null>, import('..').FieldDefinition<import('..').BaseFieldConfig & {
40
+ kind: "mapped-category";
41
+ options: {
42
+ label: string;
43
+ value: string;
44
+ mapping: Record<string, unknown>;
45
+ }[];
38
46
  }, string | null>, import('..').FieldDefinition<import('..').BaseFieldConfig & {
39
47
  kind: "date";
40
48
  min?: string;
@@ -18,6 +18,7 @@ export declare const baseFieldShape: {
18
18
  omit: "omit";
19
19
  "reset-on-hide": "reset-on-hide";
20
20
  }>>;
21
+ includeInSubmission: z.ZodOptional<z.ZodBoolean>;
21
22
  valuePath: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
22
23
  defaultValue: z.ZodOptional<z.ZodUnknown>;
23
24
  ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -1,5 +1,5 @@
1
1
  export { createBuiltinRegistry } from './builtins';
2
- export { booleanFieldDefinition, categoryFieldDefinition, classifierReportDefinition, dateFieldDefinition, longTextFieldDefinition, multiChoiceFieldDefinition, numberFieldDefinition, ratingFieldDefinition, regressorReportDefinition, seriesFieldDefinition, singleChoiceFieldDefinition, textFieldDefinition, } from './builtins';
2
+ export { booleanFieldDefinition, categoryFieldDefinition, classifierReportDefinition, dateFieldDefinition, mappedCategoryFieldDefinition, longTextFieldDefinition, multiChoiceFieldDefinition, numberFieldDefinition, ratingFieldDefinition, regressorReportDefinition, seriesFieldDefinition, singleChoiceFieldDefinition, textFieldDefinition, } from './builtins';
3
3
  export { createExplanationController } from './explanations';
4
4
  export { executeExplanations, executeFormPipeline } from './submission';
5
5
  export { EngineError, ReportPayloadError, RegistryError, SubmissionAbortedError, SubmitError, TransportError, transportErrorCodes, ValidationError, } from './errors';
@@ -22,6 +22,7 @@ export interface BaseFieldConfig {
22
22
  readOnlyWhen?: FieldCondition;
23
23
  asyncValidationDebounceMs?: number;
24
24
  inactiveFieldPolicy?: InactiveFieldPolicy;
25
+ includeInSubmission?: boolean;
25
26
  valuePath?: string | string[];
26
27
  defaultValue?: unknown;
27
28
  ui?: Record<string, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mlform",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "private": false,
5
5
  "description": "Composable form generation utilities for machine learning backend integration",
6
6
  "keywords": [