mlform 0.1.23 → 0.1.24
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 +98 -229
- package/dist/builtins-jvAitKUC.js +560 -0
- package/dist/{design-Dr7o4rR9.js → design-D8zce4Mh.js} +13 -12
- package/dist/mlform/builtins.mjs +2 -2
- package/dist/mlform/design.mjs +1 -1
- package/dist/mlform/kit.mjs +435 -275
- package/dist/mlform/primitives.mjs +2 -2
- package/dist/mlform/runtime.mjs +1 -1
- package/dist/mlform/schema.mjs +1 -1
- package/dist/{primitives-ljp3c5R8.js → primitives-ChLgMFl9.js} +452 -450
- package/dist/{runtime-BQsOz8iz.js → runtime-B_vnmwya.js} +9 -9
- package/dist/{schema-BI-Ia-h9.js → schema-C34LJ8aV.js} +5 -5
- package/dist/types/{src/builtins → builtins}/definitions/collections.d.ts +12 -12
- package/dist/types/{src/builtins → builtins}/definitions/fields/boolean.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/category.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/date.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/long-text.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/mapped-category.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/multi-choice.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/number.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/onehot-category.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/rating.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/series-helpers.d.ts +4 -4
- package/dist/types/{src/builtins → builtins}/definitions/fields/single-choice.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/fields/text.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/reports/classifier.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/reports/regressor.d.ts +1 -1
- package/dist/types/{src/builtins → builtins}/definitions/shared.d.ts +3 -28
- package/dist/types/{src/builtins → builtins}/index.d.ts +2 -3
- package/dist/types/{src/builtins → builtins}/mapped-category-behavior.d.ts +1 -1
- package/dist/types/builtins/registry.d.ts +2 -0
- package/dist/types/kit/builtin-presenters.d.ts +2 -0
- package/dist/types/{src/kit → kit}/defaults.d.ts +3 -3
- package/dist/types/{src/kit → kit}/index.d.ts +3 -0
- package/dist/types/{src/kit → kit}/kinds/define-field-kind.d.ts +4 -3
- package/dist/types/{src/kit → kit}/kinds/define-report-kind.d.ts +4 -3
- package/dist/types/kit/kinds/register-kind.d.ts +6 -0
- package/dist/types/{src/kit → kit}/layout-helpers.d.ts +1 -1
- package/dist/types/{src/kit → kit}/layout-node-render.d.ts +1 -1
- package/dist/types/{src/kit → kit}/layout-root.d.ts +1 -1
- package/dist/types/{src/kit → kit}/layout-utils.d.ts +1 -1
- package/dist/types/{src/kit → kit}/layout.d.ts +1 -1
- package/dist/types/{src/kit → kit}/mount-types.d.ts +5 -3
- package/dist/types/kit/plugin.d.ts +19 -0
- package/dist/types/kit/registry-pack.d.ts +16 -0
- package/dist/types/{src/kit → kit}/tabs-root.d.ts +1 -1
- package/dist/types/{src/kit → kit}/view-core-types.d.ts +4 -2
- package/dist/types/{src/kit → kit}/view-navigation.d.ts +1 -1
- package/dist/types/{src/kit → kit}/view-snapshot-cache.d.ts +2 -2
- package/dist/types/{src/kit → kit}/view-snapshot.d.ts +2 -2
- package/dist/types/{src/kit → kit}/wizard-root.d.ts +1 -1
- package/dist/types/{src/primitives → primitives}/descriptors/registry.d.ts +2 -1
- package/dist/types/{src/primitives → primitives}/index.d.ts +1 -1
- package/dist/types/primitives/mount-form.d.ts +4 -0
- package/dist/types/{src/runtime → runtime}/errors.d.ts +1 -1
- package/dist/types/{src/runtime → runtime}/runtime-behaviors.d.ts +1 -1
- package/dist/types/{src/runtime → runtime}/submission/request.d.ts +1 -1
- package/dist/types/{src/runtime → runtime}/submission/types.d.ts +1 -1
- package/dist/types/{src/runtime → runtime}/types/behavior.d.ts +2 -2
- package/dist/types/{src/runtime → runtime}/types/field.d.ts +3 -3
- package/dist/types/{src/runtime → runtime}/types/form.d.ts +3 -2
- package/dist/types/{src/runtime → runtime}/types/index.d.ts +1 -0
- package/dist/types/{src/runtime → runtime}/types/registry.d.ts +1 -1
- package/dist/types/{src/runtime → runtime}/types/report.d.ts +5 -5
- package/dist/types/runtime/types/status.d.ts +1 -0
- package/dist/types/{src/runtime → runtime}/types/transport.d.ts +5 -5
- package/dist/types/{src/runtime → runtime}/validation/form.d.ts +1 -1
- package/dist/types/{src/schema → schema}/index.d.ts +1 -0
- package/dist/types/{src/schema → schema}/mapped-to.d.ts +2 -6
- package/dist/types/{src/schema → schema}/normalize.d.ts +2 -1
- package/dist/types/{src/schema → schema}/registry.d.ts +3 -1
- package/dist/types/{src/schema → schema}/types/field.d.ts +1 -1
- package/dist/types/schema/types/mapping.d.ts +6 -0
- package/dist/types/{src/schema → schema}/types/report.d.ts +1 -1
- package/dist/types/{src/schema → schema}/types/submit.d.ts +1 -1
- package/dist/types/{src/schema → schema}/validation.d.ts +2 -1
- package/dist/types/{src/transport → transport}/types.d.ts +1 -1
- package/package.json +27 -20
- package/dist/builtins-rkxD-h7K.js +0 -749
- package/dist/types/src/builtins/registry-pack.d.ts +0 -10
- package/dist/types/src/kit/kinds/register-kind.d.ts +0 -5
- package/dist/types/src/primitives/mount-form.d.ts +0 -4
- /package/dist/types/{src/builtins → builtins}/constants.d.ts +0 -0
- /package/dist/types/{src/builtins → builtins}/definitions/fields/series.d.ts +0 -0
- /package/dist/types/{src/builtins → builtins}/definitions/fields/value-helpers.d.ts +0 -0
- /package/dist/types/{src/builtins → builtins}/definitions/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/constants.d.ts +0 -0
- /package/dist/types/{src/design → design}/contract/component-keys.d.ts +0 -0
- /package/dist/types/{src/design → design}/contract/component-tokens.d.ts +0 -0
- /package/dist/types/{src/design → design}/contract/global-tokens.d.ts +0 -0
- /package/dist/types/{src/design → design}/contract/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/contract/token-keys.d.ts +0 -0
- /package/dist/types/{src/design → design}/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/recipes/collections.d.ts +0 -0
- /package/dist/types/{src/design → design}/recipes/contrast.d.ts +0 -0
- /package/dist/types/{src/design → design}/recipes/default.d.ts +0 -0
- /package/dist/types/{src/design → design}/recipes/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/recipes/minimal.d.ts +0 -0
- /package/dist/types/{src/design → design}/recipes/soft.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/builtins.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/create-registry.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/deep-freeze.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/define-recipe.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/define-theme.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/define-token-maps.d.ts +0 -0
- /package/dist/types/{src/design → design}/registry/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/diagnostics.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/merge-config.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/migrate-tokens.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/resolve-design.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/resolve-mode.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/resolve-recipe.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/resolve-theme.d.ts +0 -0
- /package/dist/types/{src/design → design}/resolve/resolve-tokens.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/apply-tokens.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/attach-design.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/controller-helpers.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/create-stylesheet.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/declarations.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/design-controller.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/fingerprint.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/host-observer.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/host-state.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/hydrate-design.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/hydration-state.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/inherited-scheme.d.ts +0 -0
- /package/dist/types/{src/design → design}/runtime/media.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/airbnb.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/clickhouse.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/cobalt.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/collections.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/graphite.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/neutral.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/sage.d.ts +0 -0
- /package/dist/types/{src/design → design}/themes/sunset.d.ts +0 -0
- /package/dist/types/{src/design → design}/tokens/base.d.ts +0 -0
- /package/dist/types/{src/design → design}/tokens/contrast.d.ts +0 -0
- /package/dist/types/{src/design → design}/tokens/density.d.ts +0 -0
- /package/dist/types/{src/design → design}/tokens/forced-colors.d.ts +0 -0
- /package/dist/types/{src/design → design}/tokens/index.d.ts +0 -0
- /package/dist/types/{src/design → design}/tokens/motion.d.ts +0 -0
- /package/dist/types/{src/design → design}/types.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/constants.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/disclosure-root-styles.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/error-navigation.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/kinds/index.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/layout-node-resolver.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/layout-types.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/mount-form.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/panel-nav.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/step-indicator.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/tabs-root-styles.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/types.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/view-layout-state.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/view-types.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/view.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/wizard-constants.d.ts +0 -0
- /package/dist/types/{src/kit → kit}/wizard-root-styles.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/base-async-report-element.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/base-field-element.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/base-report-element.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/declarative-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/declarative-report.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/descriptor-content.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/error-focus.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/field-frame-feedback.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/field-frame-styles.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/field-frame.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-errors.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-root-presenters.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-root-split-styles.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-root-state.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-root-styles.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-root-templates.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/form-root.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/mounted-report.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/report-frame.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/submit-button.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/components/unsupported-component.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/constants.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/controller-binding.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/controller-types.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/descriptor-resolution.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/descriptors/content.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/descriptors/field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/descriptors/index.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/descriptors/report.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/boolean-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/category-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/date-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/long-text-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/multi-choice-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/number-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/rating-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/series-field-helpers.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/series-field-renderers.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/series-field-styles.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/series-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/single-choice-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/fields/text-field.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/register.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/registry.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/reports/classifier-report.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/reports/regressor-report.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/request-runner.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/types.d.ts +0 -0
- /package/dist/types/{src/primitives → primitives}/utils.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/comparison.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/create-runtime-helpers.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/create-runtime.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/equality.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/fields/controller.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/fields/index.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/fields/state-calculations.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/fields/state.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/form.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/index.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/paths.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/reports/controller.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/reports/index.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/runtime-controller.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/runtime-refresh.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/runtime-values.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/state/engine.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/state/index.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/state/snapshots.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/state/store.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/abort.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/create-submitter.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/error-flow.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/index.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/lifecycle.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/multi-backend.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/pipeline.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/report-fetches.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/reports.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/result.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/snapshot.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/submitter.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/submission/transport-response.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/types/pipeline.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/utils.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/validation/conditions.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/validation/field-state.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/validation/field-validator.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/validation/field.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/validation/index.d.ts +0 -0
- /package/dist/types/{src/runtime → runtime}/values.d.ts +0 -0
- /package/dist/types/{src/schema → schema}/ids.d.ts +0 -0
- /package/dist/types/{src/schema → schema}/onehot-display.d.ts +0 -0
- /package/dist/types/{src/schema → schema}/report-context.d.ts +0 -0
- /package/dist/types/{src/schema → schema}/report-fetch-request.d.ts +0 -0
- /package/dist/types/{src/schema → schema}/types/form.d.ts +0 -0
- /package/dist/types/{src/schema → schema}/types/registry.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/errors.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/fanout.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/index.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/request-runner.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PrimitiveDescriptorRegistry } from '
|
|
2
|
-
import { FormController } from '
|
|
1
|
+
import { PrimitiveDescriptorRegistry } from 'mlform/primitives';
|
|
2
|
+
import { FormController } from 'mlform/runtime';
|
|
3
3
|
import { FormViewSnapshot } from './types';
|
|
4
4
|
import { ResolvedLayoutResult } from './layout';
|
|
5
5
|
type BuildSnapshotOptions = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { PrimitiveRegistry, PrimitiveText } from '
|
|
2
|
+
import { PrimitiveRegistry, PrimitiveText } from 'mlform/primitives';
|
|
3
3
|
import { kitTagNames } from './constants';
|
|
4
4
|
import { FormViewController } from './types';
|
|
5
5
|
export declare class KitWizardElement extends LitElement {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FieldPresenter
|
|
1
|
+
import { FieldPresenter } from './field';
|
|
2
|
+
import { ReportPresenter } from './report';
|
|
2
3
|
export declare class PrimitiveDescriptorRegistry {
|
|
3
4
|
private readonly fieldPresenters;
|
|
4
5
|
private readonly reportPresenters;
|
|
@@ -2,7 +2,7 @@ export { PrimitiveFieldElement } from './base-field-element';
|
|
|
2
2
|
export { PrimitiveAsyncReportElement } from './base-async-report-element';
|
|
3
3
|
export { PrimitiveReportElement } from './base-report-element';
|
|
4
4
|
export { PrimitiveFormElement } from './components/form-root';
|
|
5
|
-
export {
|
|
5
|
+
export { mountPrimitiveForm, unmountPrimitiveForm } from './mount-form';
|
|
6
6
|
export { focusPrimitiveField } from './components/error-focus';
|
|
7
7
|
export { createBuiltinPrimitiveRegistry, createPrimitiveRegistry } from './registry';
|
|
8
8
|
export { createPrimitiveDescriptorRegistry, PrimitiveDescriptorRegistry } from './descriptors';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PrimitiveFormController } from './controller-types';
|
|
2
|
+
import { MountFormOptions, MountedForm } from './types';
|
|
3
|
+
export declare const mountPrimitiveForm: (container: HTMLElement, form: PrimitiveFormController, options?: MountFormOptions) => MountedForm;
|
|
4
|
+
export declare const unmountPrimitiveForm: (mounted: MountedForm) => void;
|
|
@@ -23,4 +23,4 @@ export declare class SubmissionAbortedError extends SubmitError {
|
|
|
23
23
|
}
|
|
24
24
|
export declare const createAbortError: (reason?: string) => SubmissionAbortedError;
|
|
25
25
|
export declare const isAbortLikeError: (error: unknown) => boolean;
|
|
26
|
-
export { TransportError, transportErrorCodes } from '
|
|
26
|
+
export { TransportError, transportErrorCodes } from 'mlform/transport';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Registry } from '
|
|
1
|
+
import { Registry } from 'mlform/schema';
|
|
2
2
|
import { InternalFieldController } from './fields';
|
|
3
3
|
import { CreateFormConfig, FormState, RuntimeBehavior, RuntimeBehaviorContext, RuntimeBehaviorValueChangeEvent } from './types';
|
|
4
4
|
type CreateRuntimeBehaviorsOptions = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NormalizedFormSchema } from '
|
|
1
|
+
import { NormalizedFormSchema } from 'mlform/schema';
|
|
2
2
|
import { EngineStore } from '../state';
|
|
3
3
|
import { FormHooks, FormValidationResult, InactiveFieldPolicy, SubmitOptions, SubmitResult, Transport } from '../types';
|
|
4
4
|
import { buildSubmissionValueRecords, SubmissionValueRecords } from './request';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Registry, SubmissionInputRecord } from '
|
|
1
|
+
import { Registry, SubmissionInputRecord } from 'mlform/schema';
|
|
2
2
|
import { FieldHandle } from './field';
|
|
3
|
-
import { FormStatus } from './
|
|
3
|
+
import { FormStatus } from './status';
|
|
4
4
|
type MaybePromise<T> = T | PromiseLike<T>;
|
|
5
5
|
export interface RuntimeBehaviorValueChangeEvent {
|
|
6
6
|
fieldId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FieldDefinition as SchemaFieldDefinition, FieldStateSnapshot, FieldValidationResult, NormalizedFieldConfig } from '
|
|
2
|
-
export type { AllConditions, AnyConditions, BaseFieldConfig, DeclarativeFieldCondition, FieldComparisonCondition, FieldCondition, FieldConditionContext, FieldConfig, FieldStateSnapshot, FieldStatus, FieldValidationContext, FieldValidationFnContext, FieldValidationResult, FieldValueAdapter, FieldValueCondition, FormStatusCondition, InactiveFieldPolicy, NormalizedFieldConfig, NotCondition, SelectorSubscriptionOptions, SubmitCountCondition, } from '
|
|
1
|
+
import { FieldDefinition as SchemaFieldDefinition, FieldStateSnapshot, FieldValidationResult, NormalizedFieldConfig } from 'mlform/schema';
|
|
2
|
+
export type { AllConditions, AnyConditions, BaseFieldConfig, DeclarativeFieldCondition, FieldComparisonCondition, FieldCondition, FieldConditionContext, FieldConfig, FieldStateSnapshot, FieldStatus, FieldValidationContext, FieldValidationFnContext, FieldValidationResult, FieldValueAdapter, FieldValueCondition, FormStatusCondition, InactiveFieldPolicy, NormalizedFieldConfig, NotCondition, SelectorSubscriptionOptions, SubmitCountCondition, } from 'mlform/schema';
|
|
3
3
|
export interface FieldHandle {
|
|
4
4
|
readonly id: string;
|
|
5
5
|
readonly kind: string;
|
|
@@ -14,5 +14,5 @@ export interface FieldHandle {
|
|
|
14
14
|
subscribe(listener: (state: FieldStateSnapshot) => void): () => void;
|
|
15
15
|
}
|
|
16
16
|
export type FieldController = FieldHandle;
|
|
17
|
-
export type FieldDefinition<TConfig extends import('
|
|
17
|
+
export type FieldDefinition<TConfig extends import('mlform/schema').FieldConfig = import('mlform/schema').FieldConfig, TValue = unknown> = SchemaFieldDefinition<TConfig, TValue>;
|
|
18
18
|
export type RuntimeFieldDefinition = FieldDefinition;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FieldConfig, FieldStateSnapshot, FormSchema, InactiveFieldPolicy, NormalizedFieldConfig, NormalizedReportConfig, Registry, ReportConfig, ReportStateSnapshot, SelectorSubscriptionOptions } from '
|
|
1
|
+
import { FieldConfig, FieldStateSnapshot, FormSchema, InactiveFieldPolicy, NormalizedFieldConfig, NormalizedReportConfig, Registry, ReportConfig, ReportStateSnapshot, SelectorSubscriptionOptions } from 'mlform/schema';
|
|
2
2
|
import { RuntimeBehavior } from './behavior';
|
|
3
3
|
import { AfterSubmitContext, BeforeSubmitContext, SubmitErrorContext, SubmitOptions, SubmitResult, Transport } from './transport';
|
|
4
4
|
import { FieldController } from './field';
|
|
5
5
|
import { ReportController } from './report';
|
|
6
|
+
import { FormStatus } from './status';
|
|
6
7
|
type MaybePromise<T> = T | PromiseLike<T>;
|
|
7
|
-
export type FormStatus = "idle" | "editing" | "validating" | "submitting" | "success" | "error";
|
|
8
8
|
export interface FormValidationResult {
|
|
9
9
|
valid: boolean;
|
|
10
10
|
fields: Record<string, string[]>;
|
|
@@ -102,3 +102,4 @@ export interface FormController {
|
|
|
102
102
|
subscribeSelector<TSelected>(selector: (state: FormState) => TSelected, listener: (selected: TSelected, state: FormState) => void, options?: SelectorSubscriptionOptions<TSelected>): () => void;
|
|
103
103
|
}
|
|
104
104
|
export type { FieldConfig, FormSchema, Registry, ReportConfig };
|
|
105
|
+
export type { FormStatus } from './status';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldDefinition, Registry as SchemaRegistry, ReportDefinition } from '
|
|
1
|
+
import { FieldDefinition, Registry as SchemaRegistry, ReportDefinition } from 'mlform/schema';
|
|
2
2
|
export interface Registry extends Omit<SchemaRegistry, "registerField" | "registerReport"> {
|
|
3
3
|
registerField(definition: FieldDefinition): Registry;
|
|
4
4
|
registerReport(definition: ReportDefinition): Registry;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { NormalizedReportConfig as SchemaNormalizedReportConfig, ReportDefinition as SchemaReportDefinition, ReportStateSnapshot } from '
|
|
2
|
-
export type { BaseReportConfig, ReportConfig, ReportFetchContext, ReportFetchFactory, ReportFetchRequest, ReportFetchStatus, ReportFetchTransport, ReportPayloadContext, ReportPayloadValidationPolicy, ReportResolveContext, ReportStateSnapshot, ReportStatus, } from '
|
|
1
|
+
import { NormalizedReportConfig as SchemaNormalizedReportConfig, ReportDefinition as SchemaReportDefinition, ReportStateSnapshot } from 'mlform/schema';
|
|
2
|
+
export type { BaseReportConfig, ReportConfig, ReportFetchContext, ReportFetchFactory, ReportFetchRequest, ReportFetchStatus, ReportFetchTransport, ReportPayloadContext, ReportPayloadValidationPolicy, ReportResolveContext, ReportStateSnapshot, ReportStatus, } from 'mlform/schema';
|
|
3
3
|
export interface ReportHandle {
|
|
4
4
|
readonly id: string;
|
|
5
5
|
readonly kind: string;
|
|
6
6
|
readonly config: SchemaNormalizedReportConfig;
|
|
7
7
|
readonly state: ReportStateSnapshot;
|
|
8
8
|
readonly canFetch: boolean;
|
|
9
|
-
fetch(request: import('
|
|
9
|
+
fetch(request: import('mlform/schema').ReportFetchRequest): Promise<void>;
|
|
10
10
|
abort(): void;
|
|
11
11
|
subscribe(listener: (state: ReportStateSnapshot) => void): () => void;
|
|
12
12
|
}
|
|
13
13
|
export type ReportController = ReportHandle;
|
|
14
|
-
export type ReportDefinition<TConfig extends import('
|
|
15
|
-
export type NormalizedReportConfig<TConfig extends import('
|
|
14
|
+
export type ReportDefinition<TConfig extends import('mlform/schema').ReportConfig = import('mlform/schema').ReportConfig> = SchemaReportDefinition<TConfig>;
|
|
15
|
+
export type NormalizedReportConfig<TConfig extends import('mlform/schema').ReportConfig = import('mlform/schema').ReportConfig> = SchemaNormalizedReportConfig<TConfig>;
|
|
16
16
|
export type RuntimeReportDefinition = ReportDefinition;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type FormStatus = "idle" | "editing" | "validating" | "submitting" | "success" | "error";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SubmitRequest as BaseSubmitRequest, Transport as BaseTransport } from '
|
|
2
|
-
import { SubmissionInputRecord, SubmitResult as SchemaSubmitResult } from '
|
|
1
|
+
import { SubmitRequest as BaseSubmitRequest, Transport as BaseTransport } from 'mlform/transport';
|
|
2
|
+
import { SubmissionInputRecord, SubmitResult as SchemaSubmitResult } from 'mlform/schema';
|
|
3
3
|
import { NormalizedFieldConfig } from './field';
|
|
4
4
|
import { NormalizedReportConfig, ReportStateSnapshot } from './report';
|
|
5
|
-
export type { SubmissionInputRecord } from '
|
|
6
|
-
export type { ReportContext, ReportResult, ReportResultContext } from '
|
|
7
|
-
export type { TransportResponse } from '
|
|
5
|
+
export type { SubmissionInputRecord } from 'mlform/schema';
|
|
6
|
+
export type { ReportContext, ReportResult, ReportResultContext } from 'mlform/schema';
|
|
7
|
+
export type { TransportResponse } from 'mlform/transport';
|
|
8
8
|
export type SubmitRequest = BaseSubmitRequest<NormalizedFieldConfig, NormalizedReportConfig>;
|
|
9
9
|
export type SubmitResult = SchemaSubmitResult<ReportStateSnapshot>;
|
|
10
10
|
export type Transport = BaseTransport<NormalizedFieldConfig, NormalizedReportConfig>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NormalizedFormSchema } from '
|
|
1
|
+
import { NormalizedFormSchema } from 'mlform/schema';
|
|
2
2
|
import { EngineStore } from '../state';
|
|
3
3
|
import { FieldValidationResult, FormHooks, FormStatus, FormValidationIssue, FormValidationResult, FormValidator, InactiveFieldPolicy } from '../types';
|
|
4
4
|
type FormValidationField = {
|
|
@@ -8,6 +8,7 @@ export { createReportFetchRequest } from './report-fetch-request';
|
|
|
8
8
|
export * from './registry';
|
|
9
9
|
export type * from './types/field';
|
|
10
10
|
export type * from './types/form';
|
|
11
|
+
export type * from './types/mapping';
|
|
11
12
|
export type * from './types/registry';
|
|
12
13
|
export type * from './types/report';
|
|
13
14
|
export type * from './types/submit';
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { ReportResult } from './types/submit';
|
|
2
|
-
|
|
3
|
-
export type MappedTo
|
|
4
|
-
export type MappedToRoute = {
|
|
5
|
-
backend: string;
|
|
6
|
-
mappedTo: MappedToTarget;
|
|
7
|
-
};
|
|
2
|
+
import { MappedTo, MappedToRoute, MappedToTarget } from './types/mapping';
|
|
3
|
+
export type { MappedTo, MappedToRoute, MappedToTarget } from './types/mapping';
|
|
8
4
|
export declare const resolveMappedTo: (mappedTo: MappedTo | undefined, backend: string | undefined) => MappedToTarget | undefined;
|
|
9
5
|
export declare const mappedToKey: (target: MappedToTarget) => string;
|
|
10
6
|
export declare const resolveMappedTargets: (mappedTo: MappedTo | undefined, backend: string | undefined) => MappedToTarget[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FormSchema, NormalizedFormSchema
|
|
1
|
+
import { FormSchema, NormalizedFormSchema } from './types/form';
|
|
2
|
+
import { Registry } from './types/registry';
|
|
2
3
|
export declare class SchemaNormalizationError extends Error {
|
|
3
4
|
readonly path: readonly (string | number)[];
|
|
4
5
|
readonly code: "invalid-config" | "unknown-kind";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { FieldConfig, FieldDefinition
|
|
1
|
+
import { FieldConfig, FieldDefinition } from './types/field';
|
|
2
|
+
import { Registry } from './types/registry';
|
|
3
|
+
import { ReportConfig, ReportDefinition } from './types/report';
|
|
2
4
|
export declare class RegistryError extends Error {
|
|
3
5
|
constructor(message: string);
|
|
4
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ZodType } from 'zod';
|
|
2
|
-
import { MappedTo } from '
|
|
2
|
+
import { MappedTo } from './mapping';
|
|
3
3
|
export type MaybePromise<T> = T | PromiseLike<T>;
|
|
4
4
|
export type FormStatus = "idle" | "editing" | "validating" | "submitting" | "success" | "error";
|
|
5
5
|
export type FieldStatus = "idle" | "validating" | "valid" | "invalid";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ZodType } from 'zod';
|
|
2
2
|
import { MaybePromise } from './field';
|
|
3
|
-
import { MappedTo } from '
|
|
3
|
+
import { MappedTo } from './mapping';
|
|
4
4
|
import { ReportContext, SubmitResult, SubmissionInputRecord } from './submit';
|
|
5
5
|
export type ReportStatus = "idle" | "loading" | "ready" | "skipped" | "error";
|
|
6
6
|
export type ReportFetchStatus = ReportStatus;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { NormalizedFormSchema
|
|
1
|
+
import { NormalizedFormSchema } from './types/form';
|
|
2
|
+
import { Registry } from './types/registry';
|
|
2
3
|
export type SchemaIssuePath = readonly (string | number)[];
|
|
3
4
|
export type SchemaValidationIssue = {
|
|
4
5
|
path: SchemaIssuePath;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReportResult, SubmissionInputRecord } from '
|
|
1
|
+
import { ReportResult, SubmissionInputRecord } from 'mlform/schema';
|
|
2
2
|
export interface SubmitRequest<TField extends Record<string, unknown> = Record<string, unknown>, TReport extends Record<string, unknown> = Record<string, unknown>> {
|
|
3
3
|
backend?: string;
|
|
4
4
|
inputs: SubmissionInputRecord[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mlform",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Composable form generation utilities for machine learning backend integration",
|
|
6
6
|
"keywords": [
|
|
@@ -51,32 +51,36 @@
|
|
|
51
51
|
],
|
|
52
52
|
"type": "module",
|
|
53
53
|
"exports": {
|
|
54
|
+
".": {
|
|
55
|
+
"types": "./dist/types/kit/index.d.ts",
|
|
56
|
+
"import": "./dist/mlform/kit.mjs"
|
|
57
|
+
},
|
|
54
58
|
"./kit": {
|
|
55
|
-
"types": "./dist/types/
|
|
59
|
+
"types": "./dist/types/kit/index.d.ts",
|
|
56
60
|
"import": "./dist/mlform/kit.mjs"
|
|
57
61
|
},
|
|
58
62
|
"./runtime": {
|
|
59
|
-
"types": "./dist/types/
|
|
63
|
+
"types": "./dist/types/runtime/index.d.ts",
|
|
60
64
|
"import": "./dist/mlform/runtime.mjs"
|
|
61
65
|
},
|
|
62
66
|
"./schema": {
|
|
63
|
-
"types": "./dist/types/
|
|
67
|
+
"types": "./dist/types/schema/index.d.ts",
|
|
64
68
|
"import": "./dist/mlform/schema.mjs"
|
|
65
69
|
},
|
|
66
70
|
"./builtins": {
|
|
67
|
-
"types": "./dist/types/
|
|
71
|
+
"types": "./dist/types/builtins/index.d.ts",
|
|
68
72
|
"import": "./dist/mlform/builtins.mjs"
|
|
69
73
|
},
|
|
70
74
|
"./transport": {
|
|
71
|
-
"types": "./dist/types/
|
|
75
|
+
"types": "./dist/types/transport/index.d.ts",
|
|
72
76
|
"import": "./dist/mlform/transport.mjs"
|
|
73
77
|
},
|
|
74
78
|
"./primitives": {
|
|
75
|
-
"types": "./dist/types/
|
|
79
|
+
"types": "./dist/types/primitives/index.d.ts",
|
|
76
80
|
"import": "./dist/mlform/primitives.mjs"
|
|
77
81
|
},
|
|
78
82
|
"./design": {
|
|
79
|
-
"types": "./dist/types/
|
|
83
|
+
"types": "./dist/types/design/index.d.ts",
|
|
80
84
|
"import": "./dist/mlform/design.mjs"
|
|
81
85
|
}
|
|
82
86
|
},
|
|
@@ -86,28 +90,31 @@
|
|
|
86
90
|
},
|
|
87
91
|
"dependencies": {
|
|
88
92
|
"lit": "3.3.3",
|
|
89
|
-
"zod": "4.
|
|
93
|
+
"zod": "4.6.5"
|
|
90
94
|
},
|
|
91
95
|
"devDependencies": {
|
|
92
|
-
"@types/node": "^26.
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
+
"@types/node": "^26.5.1",
|
|
97
|
+
"@typescript/typescript6": "^6.0.2",
|
|
98
|
+
"jsdom": "^30.0.1",
|
|
99
|
+
"playwright": "^1.63.0",
|
|
100
|
+
"tsx": "^4.23.13",
|
|
101
|
+
"typescript": "~7.0.2",
|
|
96
102
|
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
|
97
|
-
"vite-plugin-dts": "^5.0
|
|
103
|
+
"vite-plugin-dts": "^5.1.0",
|
|
98
104
|
"vite-plus": "latest",
|
|
99
|
-
"vitest": "
|
|
105
|
+
"vitest": "^4.1.11"
|
|
100
106
|
},
|
|
101
107
|
"overrides": {
|
|
102
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@latest"
|
|
103
|
-
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
|
|
108
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@latest"
|
|
104
109
|
},
|
|
105
110
|
"engines": {
|
|
106
|
-
"node": ">=
|
|
111
|
+
"node": ">=20.19.0"
|
|
107
112
|
},
|
|
108
113
|
"scripts": {
|
|
109
|
-
"typecheck": "vp exec tsc -p tsconfig.json --noEmit",
|
|
114
|
+
"typecheck": "vp exec tsc -p tsconfig.json --noEmit && vp exec tsc -p tsconfig.scripts.json",
|
|
110
115
|
"coverage": "vp test run --coverage",
|
|
111
|
-
"ci": "vp check && vp run typecheck && vp test run && vp build"
|
|
116
|
+
"ci": "vp check && vp run typecheck && vp test run && vp build && vp run check:bundle && vp run test:package",
|
|
117
|
+
"check:bundle": "tsx scripts/check-bundle-size.ts",
|
|
118
|
+
"test:package": "tsx scripts/test-package-consumer.ts"
|
|
112
119
|
}
|
|
113
120
|
}
|