mlform 0.1.7 → 0.1.9
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 +42 -13
- package/dist/builtins-ml-pjab8_gu.js +3878 -0
- package/dist/{design-system-CrrSGfFB.js → design-system-CIU_vH6O.js} +612 -415
- package/dist/errors-CTNw8fwS.js +8 -0
- package/dist/kit-QY6zff-h.js +1888 -0
- package/dist/mlform/behaviors.mjs +32 -0
- package/dist/mlform/builtins-ml.mjs +2 -0
- package/dist/mlform/design-system.mjs +2 -2
- package/dist/mlform/kit.mjs +3 -3
- package/dist/mlform/presentation.mjs +2 -0
- package/dist/mlform/primitives.mjs +2 -2
- package/dist/mlform/runtime.mjs +4 -0
- package/dist/mlform/schema.mjs +102 -0
- package/dist/mlform/transport.mjs +2 -2
- package/dist/mlform.mjs +8 -4
- package/dist/presentation-BrlVO4oV.js +200 -0
- package/dist/{primitives-BqjFDDhL.js → primitives-Di95y_ur.js} +1653 -1561
- package/dist/runtime-C5iTM3uu.js +1839 -0
- package/dist/strings-CWwrrYzz.js +4 -0
- package/dist/{transport-A1RsnZhD.js → transport-B6ePTLFK.js} +345 -372
- package/dist/types/behaviors/index.d.ts +3 -0
- package/dist/types/builtins-ml/definitions/fields/boolean.d.ts +9 -0
- package/dist/types/builtins-ml/definitions/fields/category.d.ts +12 -0
- package/dist/types/builtins-ml/definitions/fields/date.d.ts +10 -0
- package/dist/types/builtins-ml/definitions/fields/long-text.d.ts +11 -0
- package/dist/types/{src/engine/builtins → builtins-ml/definitions}/fields/mapped-category.d.ts +3 -2
- package/dist/types/{src/engine/builtins → builtins-ml/definitions}/fields/multi-choice.d.ts +3 -2
- package/dist/types/builtins-ml/definitions/fields/number.d.ts +12 -0
- package/dist/types/builtins-ml/definitions/fields/rating.d.ts +10 -0
- package/dist/types/builtins-ml/definitions/fields/series-helpers.d.ts +52 -0
- package/dist/types/builtins-ml/definitions/fields/series.d.ts +3 -0
- package/dist/types/{src/engine/builtins → builtins-ml/definitions}/fields/single-choice.d.ts +3 -2
- package/dist/types/builtins-ml/definitions/fields/text.d.ts +11 -0
- package/dist/types/{src/engine/builtins → builtins-ml/definitions}/index.d.ts +13 -34
- package/dist/types/builtins-ml/definitions/reports/classifier.d.ts +9 -0
- package/dist/types/builtins-ml/definitions/reports/regressor.d.ts +9 -0
- package/dist/types/{src/engine/builtins → builtins-ml/definitions}/shared.d.ts +25 -1
- package/dist/types/builtins-ml/index.d.ts +5 -0
- package/dist/types/design-system/recipes/index.d.ts +3 -0
- package/dist/types/{src/design-system → design-system}/registry/builtins.d.ts +0 -3
- package/dist/types/{src/design-system → design-system}/registry/index.d.ts +3 -1
- package/dist/types/design-system/runtime/controller-helpers.d.ts +12 -0
- package/dist/types/design-system/runtime/fingerprint.d.ts +8 -0
- package/dist/types/design-system/runtime/host-observer.d.ts +1 -0
- package/dist/types/design-system/runtime/hydration-state.d.ts +13 -0
- package/dist/types/design-system/runtime/inherited-scheme.d.ts +5 -0
- package/dist/types/design-system/runtime/media.d.ts +19 -0
- package/dist/types/design-system/themes/airbnb.d.ts +2 -0
- package/dist/types/design-system/themes/clickhouse.d.ts +2 -0
- package/dist/types/design-system/themes/index.d.ts +4 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/kit/accordion-root-styles.d.ts +1 -0
- package/dist/types/kit/accordion-root.d.ts +24 -0
- package/dist/types/kit/accordion.d.ts +2 -0
- package/dist/types/kit/constants.d.ts +33 -0
- package/dist/types/{src/kit → kit}/defaults.d.ts +4 -4
- package/dist/types/kit/error-navigation.d.ts +2 -0
- package/dist/types/kit/index.d.ts +9 -0
- package/dist/types/kit/layout-helpers.d.ts +29 -0
- package/dist/types/kit/layout-node-render.d.ts +18 -0
- package/dist/types/kit/layout-node-resolver.d.ts +3 -0
- package/dist/types/kit/layout-types.d.ts +124 -0
- package/dist/types/kit/layout-utils.d.ts +9 -0
- package/dist/types/kit/layout.d.ts +8 -0
- package/dist/types/{src/kit/types.d.ts → kit/mount-types.d.ts} +6 -4
- package/dist/types/kit/panel-nav.d.ts +9 -0
- package/dist/types/{src/questionnaire/primitives/components → kit}/step-indicator.d.ts +3 -3
- package/dist/types/kit/tabs-root-styles.d.ts +1 -0
- package/dist/types/kit/tabs-root.d.ts +24 -0
- package/dist/types/kit/tabs.d.ts +2 -0
- package/dist/types/kit/types.d.ts +5 -0
- package/dist/types/kit/view-layout-state.d.ts +14 -0
- package/dist/types/kit/view-navigation.d.ts +8 -0
- package/dist/types/kit/view-snapshot-cache.d.ts +14 -0
- package/dist/types/kit/view-snapshot.d.ts +15 -0
- package/dist/types/kit/view-types.d.ts +172 -0
- package/dist/types/kit/view.d.ts +8 -0
- package/dist/types/kit/wizard-constants.d.ts +19 -0
- package/dist/types/kit/wizard-root-styles.d.ts +1 -0
- package/dist/types/kit/wizard-root.d.ts +23 -0
- package/dist/types/kit/wizard.d.ts +2 -0
- package/dist/types/packs/default.d.ts +2 -0
- package/dist/types/packs/index.d.ts +3 -0
- package/dist/types/packs/ml.d.ts +2 -0
- package/dist/types/packs/shared.d.ts +24 -0
- package/dist/types/presentation/define-explanation-kind.d.ts +11 -0
- package/dist/types/presentation/define-field-kind.d.ts +18 -0
- package/dist/types/presentation/define-report-kind.d.ts +15 -0
- package/dist/types/presentation/index.d.ts +10 -0
- package/dist/types/presentation/register-kind.d.ts +6 -0
- package/dist/types/presentation/registry.d.ts +15 -0
- package/dist/types/presentation/types/explanation.d.ts +32 -0
- package/dist/types/presentation/types/field.d.ts +36 -0
- package/dist/types/presentation/types/report.d.ts +41 -0
- package/dist/types/{src/primitives → primitives}/base-explanation-element.d.ts +2 -1
- package/dist/types/{src/primitives → primitives}/base-field-element.d.ts +2 -1
- package/dist/types/{src/primitives → primitives}/base-report-element.d.ts +2 -1
- package/dist/types/primitives/components/error-focus.d.ts +4 -0
- package/dist/types/{src/primitives → primitives}/components/explanation-panel.d.ts +4 -2
- package/dist/types/primitives/components/field-frame-feedback.d.ts +9 -0
- package/dist/types/primitives/components/field-frame-styles.d.ts +1 -0
- package/dist/types/{src/primitives → primitives}/components/field-frame.d.ts +5 -3
- package/dist/types/{src/primitives → primitives}/components/form-errors.d.ts +1 -1
- package/dist/types/primitives/components/form-root-presenters.d.ts +17 -0
- package/dist/types/primitives/components/form-root-split-styles.d.ts +1 -0
- package/dist/types/primitives/components/form-root-state.d.ts +19 -0
- package/dist/types/primitives/components/form-root-styles.d.ts +1 -0
- package/dist/types/primitives/components/form-root-templates.d.ts +42 -0
- package/dist/types/{src/primitives → primitives}/components/form-root.d.ts +4 -2
- package/dist/types/{src/primitives → primitives}/components/presentation.d.ts +1 -1
- package/dist/types/{src/primitives → primitives}/components/report-frame.d.ts +4 -2
- package/dist/types/{src/primitives → primitives}/components/submit-button.d.ts +1 -1
- package/dist/types/{src/primitives → primitives}/constants.d.ts +1 -1
- package/dist/types/primitives/fields/series-field-helpers.d.ts +23 -0
- package/dist/types/primitives/fields/series-field-renderers.d.ts +18 -0
- package/dist/types/primitives/fields/series-field-styles.d.ts +1 -0
- package/dist/types/{src/primitives → primitives}/mount-form.d.ts +1 -1
- package/dist/types/primitives/presentation.d.ts +8 -0
- package/dist/types/{src/primitives → primitives}/types.d.ts +4 -1
- package/dist/types/runtime/create-runtime-helpers.d.ts +11 -0
- package/dist/types/{src/engine → runtime}/errors.d.ts +3 -3
- package/dist/types/runtime/fields/state-calculations.d.ts +25 -0
- package/dist/types/runtime/fields/state.d.ts +2 -0
- package/dist/types/runtime/form.d.ts +1 -0
- package/dist/types/runtime/index.d.ts +12 -0
- package/dist/types/runtime/runtime-behaviors.d.ts +23 -0
- package/dist/types/runtime/runtime-controller.d.ts +34 -0
- package/dist/types/runtime/runtime-refresh.d.ts +14 -0
- package/dist/types/runtime/runtime-values.d.ts +19 -0
- package/dist/types/runtime/submission/create-submitter.d.ts +2 -0
- package/dist/types/runtime/submission/error-flow.d.ts +19 -0
- package/dist/types/runtime/submission/field-updates.d.ts +14 -0
- package/dist/types/runtime/submission/pending-patches.d.ts +2 -0
- package/dist/types/runtime/submission/report-updates.d.ts +16 -0
- package/dist/types/runtime/submission/stream-events.d.ts +13 -0
- package/dist/types/runtime/submission/stream-progress.d.ts +4 -0
- package/dist/types/runtime/submission/submitter.d.ts +2 -0
- package/dist/types/runtime/submission/types.d.ts +60 -0
- package/dist/types/runtime/types/behavior.d.ts +32 -0
- package/dist/types/runtime/types/explanation.d.ts +15 -0
- package/dist/types/runtime/types/field.d.ts +17 -0
- package/dist/types/{src/engine → runtime}/types/form.d.ts +8 -11
- package/dist/types/{src/engine → runtime}/types/index.d.ts +1 -2
- package/dist/types/runtime/types/registry.d.ts +6 -0
- package/dist/types/runtime/types/report.d.ts +13 -0
- package/dist/types/{src/engine → runtime}/types/transport.d.ts +2 -2
- package/dist/types/{src/engine → runtime}/utils.d.ts +2 -2
- package/dist/types/{src/engine/validation/field.d.ts → runtime/validation/field-state.d.ts} +3 -19
- package/dist/types/runtime/validation/field-validator.d.ts +18 -0
- package/dist/types/runtime/validation/field.d.ts +2 -0
- package/dist/types/schema/index.d.ts +7 -0
- package/dist/types/schema/normalize.d.ts +2 -0
- package/dist/types/schema/registry.d.ts +9 -0
- package/dist/types/schema/types/explanation.d.ts +43 -0
- package/dist/types/{src/engine → schema}/types/field.d.ts +3 -45
- package/dist/types/schema/types/form.d.ts +13 -0
- package/dist/types/schema/types/report.d.ts +43 -0
- package/dist/types/shared/index.d.ts +3 -0
- package/dist/types/shared/object.d.ts +1 -0
- package/dist/types/shared/strings.d.ts +1 -0
- package/dist/types/transport/composition/fanout-helpers.d.ts +2 -0
- package/dist/types/transport/composition/fanout-options.d.ts +9 -0
- package/dist/types/transport/composition/fanout.d.ts +2 -0
- package/dist/types/{src/transport → transport}/composition/index.d.ts +1 -0
- package/dist/types/transport/composition/quorum-fanout.d.ts +2 -0
- package/dist/types/{src/transport → transport}/errors.d.ts +1 -1
- package/dist/types/transport/internal-core.d.ts +21 -0
- package/dist/types/transport/internal-errors.d.ts +21 -0
- package/dist/types/transport/internal-request.d.ts +21 -0
- package/dist/types/transport/internal-routing.d.ts +25 -0
- package/dist/types/transport/internal-sse.d.ts +14 -0
- package/dist/types/transport/internal-stream.d.ts +13 -0
- package/dist/types/transport/internal.d.ts +6 -0
- package/dist/types/transport/types/options-http.d.ts +85 -0
- package/dist/types/transport/types/options-middleware.d.ts +96 -0
- package/dist/types/transport/types/options-routing.d.ts +82 -0
- package/dist/types/transport/types/options.d.ts +3 -0
- package/dist/utils-J5o8lkea.js +29 -0
- package/package.json +26 -14
- package/dist/engine-CEy1IX7y.js +0 -5367
- package/dist/kit-DrrbtxI2.js +0 -76
- package/dist/mlform/engine.mjs +0 -3
- package/dist/mlform/questionnaire.mjs +0 -640
- package/dist/types/src/design-system/recipes/index.d.ts +0 -4
- package/dist/types/src/design-system/themes/index.d.ts +0 -5
- package/dist/types/src/engine/builtins/fields/boolean.d.ts +0 -8
- package/dist/types/src/engine/builtins/fields/category.d.ts +0 -11
- package/dist/types/src/engine/builtins/fields/date.d.ts +0 -9
- package/dist/types/src/engine/builtins/fields/long-text.d.ts +0 -10
- package/dist/types/src/engine/builtins/fields/number.d.ts +0 -11
- package/dist/types/src/engine/builtins/fields/rating.d.ts +0 -9
- package/dist/types/src/engine/builtins/fields/series.d.ts +0 -20
- package/dist/types/src/engine/builtins/fields/text.d.ts +0 -10
- package/dist/types/src/engine/builtins/reports/classifier.d.ts +0 -8
- package/dist/types/src/engine/builtins/reports/regressor.d.ts +0 -8
- package/dist/types/src/engine/declarative/explanation.d.ts +0 -2
- package/dist/types/src/engine/declarative/field.d.ts +0 -2
- package/dist/types/src/engine/declarative/report.d.ts +0 -2
- package/dist/types/src/engine/index.d.ts +0 -11
- package/dist/types/src/engine/registry/index.d.ts +0 -26
- package/dist/types/src/engine/submission/submitter.d.ts +0 -40
- package/dist/types/src/engine/types/explanation.d.ts +0 -109
- package/dist/types/src/engine/types/report.d.ts +0 -87
- package/dist/types/src/index.d.ts +0 -7
- package/dist/types/src/kit/constants.d.ts +0 -4
- package/dist/types/src/kit/index.d.ts +0 -4
- package/dist/types/src/questionnaire/constants.d.ts +0 -31
- package/dist/types/src/questionnaire/defaults.d.ts +0 -8
- package/dist/types/src/questionnaire/engine/controller.d.ts +0 -12
- package/dist/types/src/questionnaire/engine/schema.d.ts +0 -9
- package/dist/types/src/questionnaire/errors.d.ts +0 -3
- package/dist/types/src/questionnaire/index.d.ts +0 -6
- package/dist/types/src/questionnaire/mount.d.ts +0 -3
- package/dist/types/src/questionnaire/primitives/components/questionnaire-root.d.ts +0 -23
- package/dist/types/src/questionnaire/primitives/register.d.ts +0 -0
- package/dist/types/src/questionnaire/types.d.ts +0 -69
- package/dist/types/src/shared/index.d.ts +0 -1
- package/dist/types/src/transport/composition/fanout.d.ts +0 -3
- package/dist/types/src/transport/internal.d.ts +0 -110
- package/dist/types/src/transport/types/options.d.ts +0 -258
- package/dist/types/{src/design-system → design-system}/constants.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/contract/component-keys.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/contract/component-tokens.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/contract/global-tokens.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/contract/index.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/contract/token-keys.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/index.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/recipes/contrast.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/recipes/default.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/recipes/minimal.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/recipes/soft.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/registry/create-registry.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/registry/deep-freeze.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/registry/define-recipe.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/registry/define-theme.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/registry/define-token-maps.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/diagnostics.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/index.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/merge-config.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/migrate-tokens.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/resolve-mode.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/resolve-recipe.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/resolve-theme.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/resolve/resolve-tokens.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/apply-tokens.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/attach-design-system.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/create-stylesheet.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/declarations.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/design-system-controller.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/host-state.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/hydrate-design-system.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/runtime/index.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/themes/cobalt.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/themes/graphite.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/themes/neutral.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/themes/sage.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/themes/sunset.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/tokens/base.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/tokens/contrast.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/tokens/density.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/tokens/forced-colors.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/tokens/index.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/tokens/motion.d.ts +0 -0
- package/dist/types/{src/design-system → design-system}/types.d.ts +0 -0
- package/dist/types/{src/kit → kit}/mount-form.d.ts +0 -0
- package/dist/types/{src/engine/declarative → presentation/types}/presentation.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/base-async-report-element.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/components/declarative-explanation.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/unsupported-component.d.ts +0 -0
- package/dist/types/{src/primitives → primitives}/controller-binding.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.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}/index.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}/utils.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/comparison.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/constants.d.ts +0 -0
- package/dist/types/{src/engine/form.d.ts → runtime/create-runtime.d.ts} +0 -0
- package/dist/types/{src/engine → runtime}/equality.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/explanations/controller.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/explanations/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/fields/controller.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/fields/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/paths.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/reports/controller.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/reports/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/schema/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/state/engine.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/state/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/state/snapshots.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/state/store.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/abort.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/explanations.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/lifecycle.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/pipeline.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/reports.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/request.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/submission/result.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/types/pipeline.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/validation/conditions.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/validation/form.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/validation/index.d.ts +0 -0
- package/dist/types/{src/engine → runtime}/values.d.ts +0 -0
- package/dist/types/{src/engine → schema}/types/registry.d.ts +1 -1
- /package/dist/types/{src/shared → shared}/errors.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/capabilities.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/clone.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/composition/fallback.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/composition/hedged.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/composition/load-balancing.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/composition/pipeline.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/composition/racing.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/composition/routing.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/constants.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/index.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/auth.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/cache.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/circuit-breaker.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/dedup.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/index.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/logging.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/metrics.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/pipe.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/rate-limit.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/retry.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/timeout.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/tracing.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/middleware/transform.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/policy-context.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/protocols/graphql.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/protocols/grpc.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/protocols/index.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/protocols/json.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/protocols/sse.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/protocols/websocket.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/runtime.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/state/cache-store.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/state/circuit-breaker.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/state/health.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/state/index.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/state/rate-limiter.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/state/session.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/capabilities.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/core.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/events.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/index.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/middleware.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/session.d.ts +0 -0
- /package/dist/types/{src/transport → transport}/types/state.d.ts +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Registry } from '../schema';
|
|
2
|
+
import { InternalFieldController } from './fields';
|
|
3
|
+
import { CreateFormConfig, FormState, RuntimeBehavior, RuntimeBehaviorContext, RuntimeBehaviorValueChangeEvent } from './types';
|
|
4
|
+
type CreateRuntimeBehaviorsOptions = {
|
|
5
|
+
registry: Registry;
|
|
6
|
+
behaviors: RuntimeBehavior[];
|
|
7
|
+
fields: readonly InternalFieldController[];
|
|
8
|
+
getValues: () => Record<string, unknown>;
|
|
9
|
+
getSubmitCount: () => number;
|
|
10
|
+
getFormStatus: () => FormState["status"];
|
|
11
|
+
commitDerivedValue: (targetId: string, value: unknown) => void;
|
|
12
|
+
syncDerivedState: (values: Record<string, unknown>) => void;
|
|
13
|
+
onListenerError: CreateFormConfig["onListenerError"];
|
|
14
|
+
};
|
|
15
|
+
export declare const createRuntimeBehaviors: ({ registry, behaviors, fields, getValues, getSubmitCount, getFormStatus, commitDerivedValue, syncDerivedState, onListenerError, }: CreateRuntimeBehaviorsOptions) => {
|
|
16
|
+
createBehaviorContext: () => RuntimeBehaviorContext;
|
|
17
|
+
runBehaviorValueChange: (event: RuntimeBehaviorValueChangeEvent) => void;
|
|
18
|
+
runBeforeSubmitRecords: (records: import('./types').RuntimeBehaviorSubmissionRecords) => Promise<void>;
|
|
19
|
+
validateBehaviors: () => void;
|
|
20
|
+
fieldMap: Map<string, InternalFieldController>;
|
|
21
|
+
resolveField: (targetId: string) => InternalFieldController | undefined;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FormController, FormState, RuntimeBehaviorValueChangeEvent } from './types';
|
|
2
|
+
import { InternalExplanationController } from './explanations';
|
|
3
|
+
import { InternalFieldController } from './fields';
|
|
4
|
+
import { InternalReportController } from './reports';
|
|
5
|
+
import { EngineStore } from './state';
|
|
6
|
+
type CreateRuntimeControllerOptions = {
|
|
7
|
+
fields: InternalFieldController[];
|
|
8
|
+
reports: InternalReportController[];
|
|
9
|
+
explanations: InternalExplanationController[];
|
|
10
|
+
fieldMap: Map<string, InternalFieldController>;
|
|
11
|
+
reportMap: Map<string, InternalReportController>;
|
|
12
|
+
explanationMap: Map<string, InternalExplanationController>;
|
|
13
|
+
store: EngineStore;
|
|
14
|
+
getPublicState: () => FormState;
|
|
15
|
+
getValues: () => Record<string, unknown>;
|
|
16
|
+
getInternalValues: () => Record<string, unknown>;
|
|
17
|
+
formValidator: {
|
|
18
|
+
validate(): Promise<import('./types').FormValidationResult>;
|
|
19
|
+
};
|
|
20
|
+
formSubmitter: {
|
|
21
|
+
submit(options?: import('./types').SubmitOptions): Promise<import('./types').SubmitResult>;
|
|
22
|
+
abort(reason?: string): void;
|
|
23
|
+
reset(): void;
|
|
24
|
+
};
|
|
25
|
+
syncDerivedFieldState: (options?: import('./fields').RefreshOptions) => void;
|
|
26
|
+
shouldResetInactiveFields: () => boolean;
|
|
27
|
+
inactiveFieldPolicy: import('./types').InactiveFieldPolicy | undefined;
|
|
28
|
+
bumpLifecycleVersion: () => number;
|
|
29
|
+
resetReports: () => void;
|
|
30
|
+
resetExplanations: () => void;
|
|
31
|
+
runBehaviorValueChange: (event: RuntimeBehaviorValueChangeEvent) => void;
|
|
32
|
+
};
|
|
33
|
+
export declare const createRuntimeController: ({ fields, reports, explanations, fieldMap, reportMap, explanationMap, store, getPublicState, getValues, getInternalValues, formValidator, formSubmitter, syncDerivedFieldState, shouldResetInactiveFields, inactiveFieldPolicy, bumpLifecycleVersion, resetReports, resetExplanations, runBehaviorValueChange, }: CreateRuntimeControllerOptions) => FormController;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InternalFieldState, EngineStore } from './state';
|
|
2
|
+
import { RefreshOptions, InternalFieldController } from './fields';
|
|
3
|
+
type CreateRuntimeRefreshOptions = {
|
|
4
|
+
store: EngineStore;
|
|
5
|
+
fields: readonly InternalFieldController[];
|
|
6
|
+
shouldResetInactiveFields: () => boolean;
|
|
7
|
+
inactiveFieldPolicy: RefreshOptions["inactiveFieldPolicy"];
|
|
8
|
+
hasInteractiveFieldState: (fieldStates: Record<string, InternalFieldState>) => boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const createRuntimeRefresh: ({ store, fields, shouldResetInactiveFields, inactiveFieldPolicy, hasInteractiveFieldState, }: CreateRuntimeRefreshOptions) => {
|
|
11
|
+
syncDerivedFieldState: (options?: RefreshOptions) => void;
|
|
12
|
+
setRestingStatus: () => void;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RefreshOptions, InternalFieldController } from './fields';
|
|
2
|
+
import { InternalFieldState } from './state';
|
|
3
|
+
type GetFieldMap = () => Map<string, InternalFieldController>;
|
|
4
|
+
type GetValues = () => Record<string, unknown>;
|
|
5
|
+
type CreateRuntimeValuesOptions = {
|
|
6
|
+
getFieldMap: GetFieldMap;
|
|
7
|
+
getValues: GetValues;
|
|
8
|
+
getCurrentFieldState: (fieldId: string) => InternalFieldState | undefined;
|
|
9
|
+
syncDerivedFieldState: (options?: RefreshOptions) => void;
|
|
10
|
+
shouldResetInactiveFields: () => boolean;
|
|
11
|
+
inactiveFieldPolicy: RefreshOptions["inactiveFieldPolicy"];
|
|
12
|
+
};
|
|
13
|
+
export declare const createRuntimeValues: ({ getFieldMap, getValues, getCurrentFieldState, syncDerivedFieldState, shouldResetInactiveFields, inactiveFieldPolicy, }: CreateRuntimeValuesOptions) => {
|
|
14
|
+
getValues: () => {
|
|
15
|
+
[k: string]: unknown;
|
|
16
|
+
};
|
|
17
|
+
commitDerivedValue: (targetId: string, value: unknown) => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { CreateFormSubmitterOptions, FormSubmitter } from './types';
|
|
2
|
+
export declare const createFormSubmitter: ({ store, transport, hooks, hookFailurePolicy, normalizedSchema, fields, reports, validate, getSubmitCount, markReportsLoading, resetReports, resetExplanations, syncDerivedFieldState, shouldResetInactiveFields, resolveInactiveFieldPolicy, inactiveFieldPolicy, onRemoteFieldUpdate, beforeSubmitRecords, }: CreateFormSubmitterOptions) => FormSubmitter;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EngineStore } from '../state';
|
|
2
|
+
import { FormHooks } from '../types';
|
|
3
|
+
import { SubmissionValueRecords } from './request';
|
|
4
|
+
import { createSubmissionAbortManager } from './abort';
|
|
5
|
+
import { createSubmissionLifecycle } from './lifecycle';
|
|
6
|
+
type AbortManager = ReturnType<typeof createSubmissionAbortManager>;
|
|
7
|
+
type Lifecycle = ReturnType<typeof createSubmissionLifecycle>;
|
|
8
|
+
type CreateSubmissionErrorFlowOptions = {
|
|
9
|
+
hooks: FormHooks | undefined;
|
|
10
|
+
abortManager: AbortManager;
|
|
11
|
+
lifecycle: Lifecycle;
|
|
12
|
+
store: EngineStore;
|
|
13
|
+
};
|
|
14
|
+
export declare const createSubmissionErrorFlow: ({ hooks, abortManager, lifecycle, store, }: CreateSubmissionErrorFlowOptions) => {
|
|
15
|
+
notifySubmitError: (backend: string | undefined, records: SubmissionValueRecords, submitCount: number, error: unknown) => Promise<void>;
|
|
16
|
+
handleSubmissionAbort: (error: unknown, submissionRequestId: number, lifecycleVersion: number, submitCount: number, records: SubmissionValueRecords, backend: string | undefined) => Promise<never>;
|
|
17
|
+
handleSubmissionError: (error: unknown, submissionRequestId: number, lifecycleVersion: number, submitCount: number, records: SubmissionValueRecords, backend: string | undefined) => Promise<never>;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EngineStore } from '../state';
|
|
2
|
+
import { TransportStreamEvent } from '../types';
|
|
3
|
+
import { LiveSubmissionField } from './types';
|
|
4
|
+
type CreateFieldUpdatesOptions = {
|
|
5
|
+
store: EngineStore;
|
|
6
|
+
fieldMap: Map<string, LiveSubmissionField>;
|
|
7
|
+
onRemoteFieldUpdate?: (fieldId: string) => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
export declare const createFieldUpdates: ({ store, fieldMap, onRemoteFieldUpdate, }: CreateFieldUpdatesOptions) => {
|
|
10
|
+
applyFieldUpdate: (event: Extract<TransportStreamEvent, {
|
|
11
|
+
type: "field-update";
|
|
12
|
+
}>) => void;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LiveSubmissionReport } from './types';
|
|
2
|
+
import { SubmissionValueRecords } from './request';
|
|
3
|
+
type CreateReportUpdatesOptions = {
|
|
4
|
+
reportMap: Map<string, LiveSubmissionReport>;
|
|
5
|
+
getReportState: (reportId: string) => {
|
|
6
|
+
payload?: unknown;
|
|
7
|
+
} | undefined;
|
|
8
|
+
getReportStates: () => Record<string, unknown>;
|
|
9
|
+
getSubmissionMeta: () => Record<string, unknown>;
|
|
10
|
+
storePendingPatch: (reportId: string, patch: Record<string, unknown>) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const createReportUpdates: ({ reportMap, getReportState, getReportStates, getSubmissionMeta, storePendingPatch, }: CreateReportUpdatesOptions) => {
|
|
13
|
+
applyValidatedReportReplace: (reportId: string, payload: unknown, records: SubmissionValueRecords, backend: string | undefined) => Promise<void>;
|
|
14
|
+
applyValidatedReportPatch: (reportId: string, patch: unknown, strategy: "replace" | "shallow-merge" | "deep-merge" | undefined, records: SubmissionValueRecords, backend: string | undefined) => Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TransportStreamEvent } from '../types';
|
|
2
|
+
import { SubmissionValueRecords } from './request';
|
|
3
|
+
export type ApplySubmissionStreamEventOptions = {
|
|
4
|
+
event: TransportStreamEvent;
|
|
5
|
+
records: SubmissionValueRecords;
|
|
6
|
+
backend: string | undefined;
|
|
7
|
+
applyValidatedReportReplace: (reportId: string, payload: unknown, records: SubmissionValueRecords, backend: string | undefined) => Promise<void>;
|
|
8
|
+
applyValidatedReportPatch: (reportId: string, patch: unknown, strategy: "replace" | "shallow-merge" | "deep-merge" | undefined, records: SubmissionValueRecords, backend: string | undefined) => Promise<void>;
|
|
9
|
+
applyFieldUpdate: (event: Extract<TransportStreamEvent, {
|
|
10
|
+
type: "field-update";
|
|
11
|
+
}>) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const applySubmissionStreamEvent: ({ event, records, backend, applyValidatedReportReplace, applyValidatedReportPatch, applyFieldUpdate, }: ApplySubmissionStreamEventOptions) => Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { EngineStore } from '../state';
|
|
2
|
+
import { SubmissionProgressState, TransportStreamEvent } from '../types';
|
|
3
|
+
export declare const updateStreamProgress: (store: EngineStore, currentRequestId: () => number | null, progress: SubmissionProgressState, submissionRequestId: number, lifecycleVersion: number) => void;
|
|
4
|
+
export declare const toSubmissionProgress: (previous: SubmissionProgressState | null, event: TransportStreamEvent) => SubmissionProgressState;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { NormalizedFormSchema } from '../schema';
|
|
2
|
+
import { InternalFieldState, EngineStore } from '../state';
|
|
3
|
+
import { FormHooks, FormValidationResult, InactiveFieldPolicy, SubmissionProgressState, SubmitOptions, SubmitResult, Transport, TransportStreamEvent } from '../types';
|
|
4
|
+
import { buildSubmissionValueRecords, SubmissionValueRecords } from './request';
|
|
5
|
+
import { SubmissionReport } from './reports';
|
|
6
|
+
export type SubmissionField = Parameters<typeof buildSubmissionValueRecords>[0][number];
|
|
7
|
+
export type LiveSubmissionField = SubmissionField & {
|
|
8
|
+
coerceValue(value: unknown): unknown;
|
|
9
|
+
commitState(state: InternalFieldState): void;
|
|
10
|
+
};
|
|
11
|
+
export type LiveSubmissionReport = SubmissionReport;
|
|
12
|
+
export type SyncDerivedFieldStateOptions = {
|
|
13
|
+
values?: Record<string, unknown>;
|
|
14
|
+
preserveValidationErrors?: boolean;
|
|
15
|
+
preserveExternalErrors?: boolean;
|
|
16
|
+
resetInactiveToInitial?: boolean;
|
|
17
|
+
inactiveFieldPolicy?: InactiveFieldPolicy;
|
|
18
|
+
};
|
|
19
|
+
export type CreateFormSubmitterOptions = {
|
|
20
|
+
store: EngineStore;
|
|
21
|
+
transport: Transport;
|
|
22
|
+
hooks?: FormHooks;
|
|
23
|
+
hookFailurePolicy?: {
|
|
24
|
+
afterSubmit?: "fail-submit" | "preserve-success";
|
|
25
|
+
};
|
|
26
|
+
normalizedSchema: NormalizedFormSchema;
|
|
27
|
+
fields: readonly SubmissionField[];
|
|
28
|
+
reports: readonly SubmissionReport[];
|
|
29
|
+
validate: () => Promise<FormValidationResult>;
|
|
30
|
+
getSubmitCount: () => number;
|
|
31
|
+
markReportsLoading: () => void;
|
|
32
|
+
resetReports: () => void;
|
|
33
|
+
resetExplanations: () => void;
|
|
34
|
+
syncDerivedFieldState: (options?: SyncDerivedFieldStateOptions) => void;
|
|
35
|
+
shouldResetInactiveFields: () => boolean;
|
|
36
|
+
resolveInactiveFieldPolicy: (field: SubmissionField) => InactiveFieldPolicy;
|
|
37
|
+
inactiveFieldPolicy?: InactiveFieldPolicy;
|
|
38
|
+
onRemoteFieldUpdate?: (fieldId: string) => Promise<void>;
|
|
39
|
+
beforeSubmitRecords?: (records: SubmissionValueRecords) => Promise<void>;
|
|
40
|
+
};
|
|
41
|
+
export type FormSubmitter = {
|
|
42
|
+
submit(options?: SubmitOptions): Promise<SubmitResult>;
|
|
43
|
+
abort(reason?: string): void;
|
|
44
|
+
reset(): void;
|
|
45
|
+
};
|
|
46
|
+
export type SubmissionMaps = {
|
|
47
|
+
fieldMap: Map<string, LiveSubmissionField>;
|
|
48
|
+
reportMap: Map<string, LiveSubmissionReport>;
|
|
49
|
+
};
|
|
50
|
+
export type SubmissionRuntime = {
|
|
51
|
+
store: EngineStore;
|
|
52
|
+
maps: SubmissionMaps;
|
|
53
|
+
onRemoteFieldUpdate?: (fieldId: string) => Promise<void>;
|
|
54
|
+
};
|
|
55
|
+
export type StreamApplyContext = {
|
|
56
|
+
records: SubmissionValueRecords;
|
|
57
|
+
backend: string | undefined;
|
|
58
|
+
};
|
|
59
|
+
export type StreamProgressHandler = (progress: SubmissionProgressState, submissionRequestId: number, lifecycleVersion: number) => void;
|
|
60
|
+
export type StreamEventApplier = (event: TransportStreamEvent, context: StreamApplyContext) => Promise<void>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Registry } from '../../schema';
|
|
2
|
+
import { FieldHandle } from './field';
|
|
3
|
+
import { FormStatus } from './form';
|
|
4
|
+
type MaybePromise<T> = T | PromiseLike<T>;
|
|
5
|
+
export interface RuntimeBehaviorValueChangeEvent {
|
|
6
|
+
fieldId: string;
|
|
7
|
+
source: "local" | "remote";
|
|
8
|
+
values: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
export interface RuntimeBehaviorSubmissionRecords {
|
|
11
|
+
values: Record<string, unknown>;
|
|
12
|
+
fieldValues: Record<string, unknown>;
|
|
13
|
+
serializedValues: Record<string, unknown>;
|
|
14
|
+
serializedFieldValues: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export interface RuntimeBehaviorContext {
|
|
17
|
+
readonly registry: Registry;
|
|
18
|
+
readonly fields: readonly FieldHandle[];
|
|
19
|
+
getField(id: string): FieldHandle | undefined;
|
|
20
|
+
resolveFieldId(id: string): string | undefined;
|
|
21
|
+
getValues(): Record<string, unknown>;
|
|
22
|
+
getSubmitCount(): number;
|
|
23
|
+
getFormStatus(): FormStatus;
|
|
24
|
+
commitDerivedValue(fieldId: string, value: unknown): void;
|
|
25
|
+
syncDerivedState(values?: Record<string, unknown>): void;
|
|
26
|
+
}
|
|
27
|
+
export interface RuntimeBehavior {
|
|
28
|
+
validate?(context: RuntimeBehaviorContext): void;
|
|
29
|
+
onValuesChanged?(event: RuntimeBehaviorValueChangeEvent, context: RuntimeBehaviorContext): MaybePromise<void>;
|
|
30
|
+
beforeSubmitRecords?(records: RuntimeBehaviorSubmissionRecords, context: RuntimeBehaviorContext): MaybePromise<void>;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ExplanationDefinition as SchemaExplanationDefinition, ExplanationFetchRequest, ExplanationStateSnapshot, NormalizedExplanationConfig as SchemaNormalizedExplanationConfig } from '../../schema';
|
|
2
|
+
export type { BaseExplanationConfig, ExplanationConfig, ExplanationFetchContext, ExplanationFetchFactory, ExplanationFetchRequest, ExplanationFetchTransport, ExplanationStateSnapshot, ExplanationStatus, } from '../../schema';
|
|
3
|
+
export interface ExplanationHandle {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly kind: string;
|
|
6
|
+
readonly config: SchemaNormalizedExplanationConfig;
|
|
7
|
+
readonly state: ExplanationStateSnapshot;
|
|
8
|
+
fetch(request: ExplanationFetchRequest): Promise<void>;
|
|
9
|
+
abort(): void;
|
|
10
|
+
reset(): void;
|
|
11
|
+
subscribe(listener: (state: ExplanationStateSnapshot) => void): () => void;
|
|
12
|
+
}
|
|
13
|
+
export type ExplanationController = ExplanationHandle;
|
|
14
|
+
export type ExplanationDefinition<TConfig extends import('../../schema').ExplanationConfig = import('../../schema').ExplanationConfig> = SchemaExplanationDefinition<TConfig>;
|
|
15
|
+
export type NormalizedExplanationConfig<TConfig extends import('../../schema').ExplanationConfig = import('../../schema').ExplanationConfig> = SchemaNormalizedExplanationConfig<TConfig>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FieldDefinition as SchemaFieldDefinition, FieldStateSnapshot, FieldValidationResult, NormalizedFieldConfig } from '../../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 '../../schema';
|
|
3
|
+
export interface FieldHandle {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly kind: string;
|
|
6
|
+
readonly config: NormalizedFieldConfig;
|
|
7
|
+
readonly state: FieldStateSnapshot;
|
|
8
|
+
setValue(value: unknown): void;
|
|
9
|
+
blur(): void;
|
|
10
|
+
focus(): void;
|
|
11
|
+
validate(): Promise<FieldValidationResult>;
|
|
12
|
+
reset(): void;
|
|
13
|
+
subscribe(listener: (state: FieldStateSnapshot) => void): () => void;
|
|
14
|
+
}
|
|
15
|
+
export type FieldController = FieldHandle;
|
|
16
|
+
export type FieldDefinition<TConfig extends import('../../schema').FieldConfig = import('../../schema').FieldConfig, TValue = unknown> = SchemaFieldDefinition<TConfig, TValue>;
|
|
17
|
+
export type RuntimeFieldDefinition = FieldDefinition;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { ExplanationConfig, FieldConfig, FieldStateSnapshot, FormSchema, InactiveFieldPolicy, NormalizedFieldConfig, NormalizedReportConfig, Registry, ReportConfig, ReportStateSnapshot, SelectorSubscriptionOptions } from '../../schema';
|
|
2
|
+
import { RuntimeBehavior } from './behavior';
|
|
3
|
+
import { AfterSubmitContext, BeforeSubmitContext, SubmitErrorContext, SubmitOptions, SubmitResult, Transport, TransportStreamEvent } from './transport';
|
|
4
|
+
import { ExplanationController, ExplanationStateSnapshot } from './explanation';
|
|
5
|
+
import { FieldController } from './field';
|
|
6
|
+
import { ReportController } from './report';
|
|
6
7
|
type MaybePromise<T> = T | PromiseLike<T>;
|
|
7
8
|
export type FormStatus = "idle" | "editing" | "validating" | "submitting" | "success" | "error";
|
|
8
9
|
export interface FormValidationResult {
|
|
@@ -81,15 +82,11 @@ export interface FormHooks {
|
|
|
81
82
|
afterExplanation?: (context: AfterExplanationContext) => MaybePromise<void>;
|
|
82
83
|
onExplanationError?: (context: ExplanationErrorContext) => MaybePromise<void>;
|
|
83
84
|
}
|
|
84
|
-
export interface FormSchema {
|
|
85
|
-
fields: FieldConfig[];
|
|
86
|
-
reports?: ReportConfig[];
|
|
87
|
-
explanations?: ExplanationConfig[];
|
|
88
|
-
}
|
|
89
85
|
export interface CreateFormConfig {
|
|
90
86
|
schema: FormSchema;
|
|
91
87
|
registry: Registry;
|
|
92
88
|
transport: Transport;
|
|
89
|
+
behaviors?: RuntimeBehavior[];
|
|
93
90
|
initialValues?: Record<string, unknown>;
|
|
94
91
|
validators?: FormValidator[];
|
|
95
92
|
hooks?: FormHooks;
|
|
@@ -117,4 +114,4 @@ export interface FormController {
|
|
|
117
114
|
subscribe(listener: (state: FormState) => void): () => void;
|
|
118
115
|
subscribeSelector<TSelected>(selector: (state: FormState) => TSelected, listener: (selected: TSelected, state: FormState) => void, options?: SelectorSubscriptionOptions<TSelected>): () => void;
|
|
119
116
|
}
|
|
120
|
-
export type {
|
|
117
|
+
export type { ExplanationConfig, FieldConfig, FormSchema, Registry, ReportConfig };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export type MaybePromise<T> = T | PromiseLike<T>;
|
|
2
|
+
export * from './behavior';
|
|
2
3
|
export * from './explanation';
|
|
3
4
|
export * from './field';
|
|
4
5
|
export * from './form';
|
|
5
6
|
export * from './pipeline';
|
|
6
|
-
export * from './registry';
|
|
7
7
|
export * from './report';
|
|
8
8
|
export * from './transport';
|
|
9
|
-
export * from '../declarative/presentation';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExplanationDefinition, FieldDefinition, Registry as SchemaRegistry, ReportDefinition } from '../../schema';
|
|
2
|
+
export interface Registry extends Omit<SchemaRegistry, "registerExplanation" | "registerField" | "registerReport"> {
|
|
3
|
+
registerField(definition: FieldDefinition): Registry;
|
|
4
|
+
registerReport(definition: ReportDefinition): Registry;
|
|
5
|
+
registerExplanation(definition: ExplanationDefinition): Registry;
|
|
6
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NormalizedReportConfig as SchemaNormalizedReportConfig, ReportDefinition as SchemaReportDefinition, ReportStateSnapshot } from '../../schema';
|
|
2
|
+
export type { BaseReportConfig, PartialReportUpdatePolicy, ReportConfig, ReportPayloadContext, ReportPayloadValidationPolicy, ReportResolveContext, ReportStateSnapshot, ReportStatus, } from '../../schema';
|
|
3
|
+
export interface ReportHandle {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly kind: string;
|
|
6
|
+
readonly config: SchemaNormalizedReportConfig;
|
|
7
|
+
readonly state: ReportStateSnapshot;
|
|
8
|
+
subscribe(listener: (state: ReportStateSnapshot) => void): () => void;
|
|
9
|
+
}
|
|
10
|
+
export type ReportController = ReportHandle;
|
|
11
|
+
export type ReportDefinition<TConfig extends import('../../schema').ReportConfig = import('../../schema').ReportConfig> = SchemaReportDefinition<TConfig>;
|
|
12
|
+
export type NormalizedReportConfig<TConfig extends import('../../schema').ReportConfig = import('../../schema').ReportConfig> = SchemaNormalizedReportConfig<TConfig>;
|
|
13
|
+
export type RuntimeReportDefinition = ReportDefinition;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SubmitRequest as BaseSubmitRequest, SubmitResult as BaseSubmitResult, Transport as BaseTransport, TransportStreamEvent as BaseTransportStreamEvent } from '
|
|
1
|
+
import { SubmitRequest as BaseSubmitRequest, SubmitResult as BaseSubmitResult, Transport as BaseTransport, TransportStreamEvent as BaseTransportStreamEvent } from '../../transport';
|
|
2
2
|
import { NormalizedFieldConfig } from './field';
|
|
3
3
|
import { NormalizedReportConfig, ReportStateSnapshot } from './report';
|
|
4
|
-
export type { CapabilityRequirement, CircuitBreakerSharedState, CircuitBreakerStateSnapshot, RateLimitLeaseRequest, SharedRateLimiter, SharedRateLimiterLease, SubmitRequestMetadata, SubmitRequestTransportContext, TransportAuthKind, TransportBackpressureMode, TransportCacheEntry, TransportCacheStore, TransportCapabilities, TransportCollection, TransportConsistency, TransportDeliveryMode, TransportHealthSnapshot, TransportHealthState, TransportPolicyContext, TransportResponse, TransportSession, TransportSessionCloseEvent, TransportSessionErrorEvent, TransportSessionEvent, TransportSessionMessage, TransportSessionMessageEvent, TransportSessionMetaEvent, TransportSessionProgressEvent, TransportSessionResultEvent, TransportStreamChunkEvent, TransportStreamErrorEvent, TransportStreamMetaEvent, TransportStreamProgressEvent, TransportStreamReportPatchEvent, TransportStreamReportReplaceEvent, } from '
|
|
4
|
+
export type { CapabilityRequirement, CircuitBreakerSharedState, CircuitBreakerStateSnapshot, RateLimitLeaseRequest, SharedRateLimiter, SharedRateLimiterLease, SubmitRequestMetadata, SubmitRequestTransportContext, TransportAuthKind, TransportBackpressureMode, TransportCacheEntry, TransportCacheStore, TransportCapabilities, TransportCollection, TransportConsistency, TransportDeliveryMode, TransportHealthSnapshot, TransportHealthState, TransportPolicyContext, TransportResponse, TransportSession, TransportSessionCloseEvent, TransportSessionErrorEvent, TransportSessionEvent, TransportSessionMessage, TransportSessionMessageEvent, TransportSessionMetaEvent, TransportSessionProgressEvent, TransportSessionResultEvent, TransportStreamChunkEvent, TransportStreamErrorEvent, TransportStreamMetaEvent, TransportStreamProgressEvent, TransportStreamReportPatchEvent, TransportStreamReportReplaceEvent, } from '../../transport';
|
|
5
5
|
export type SubmitRequest = BaseSubmitRequest<NormalizedFieldConfig, NormalizedReportConfig>;
|
|
6
6
|
export type SubmitResult = Omit<BaseSubmitResult, "reportStates"> & {
|
|
7
7
|
reportStates: Record<string, ReportStateSnapshot>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MaybePromise } from './types';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
import { isRecord, slugify } from '../shared';
|
|
3
|
+
export { isRecord, slugify };
|
|
4
4
|
export declare const isPromiseLike: <T>(value: MaybePromise<T>) => value is PromiseLike<T>;
|
|
5
5
|
export declare const isEmptyValue: (value: unknown) => boolean;
|
|
6
6
|
export declare const toDate: (value: unknown) => Date | null;
|
|
@@ -1,29 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FieldDefinition,
|
|
1
|
+
import { InternalFieldState } from '../state';
|
|
2
|
+
import { FieldDefinition, FormStatus, NormalizedFieldConfig } from '../types';
|
|
3
3
|
import { DerivedFieldFlags } from './conditions';
|
|
4
|
-
export type FieldStateCommitter = (fieldId: string, nextState: InternalFieldState) => void;
|
|
5
|
-
export type FieldValidator = {
|
|
6
|
-
abort(reason?: string): void;
|
|
7
|
-
validate(currentState: InternalFieldState, validationVersion?: number): Promise<FieldValidationResult>;
|
|
8
|
-
};
|
|
9
4
|
export declare const combineErrors: (state: Pick<InternalFieldState, "syncErrors" | "validationErrors" | "externalErrors">) => string[];
|
|
10
5
|
export declare const toSnapshotState: (state: InternalFieldState) => InternalFieldState;
|
|
11
6
|
export declare const toValidatingState: (state: InternalFieldState) => InternalFieldState;
|
|
12
7
|
export declare const requiredErrors: (config: NormalizedFieldConfig, value: unknown) => string[];
|
|
13
|
-
export declare const normalizeValue: (definition: FieldDefinition, config: NormalizedFieldConfig, value: unknown) => unknown;
|
|
14
8
|
export declare const cloneFieldValue: (definition: FieldDefinition, config: NormalizedFieldConfig, value: unknown) => unknown;
|
|
9
|
+
export declare const normalizeValue: (definition: FieldDefinition, config: NormalizedFieldConfig, value: unknown) => unknown;
|
|
15
10
|
export declare const areFieldValuesEqual: (definition: FieldDefinition, config: NormalizedFieldConfig, previous: unknown, next: unknown) => boolean;
|
|
16
11
|
export declare const runSyncValidation: (definition: FieldDefinition, config: NormalizedFieldConfig, value: unknown, values: Record<string, unknown>, submitCount: number) => string[];
|
|
17
12
|
export declare const computeSyncErrors: (definition: FieldDefinition, config: NormalizedFieldConfig, value: unknown, values: Record<string, unknown>, submitCount: number, flags: DerivedFieldFlags) => string[];
|
|
18
13
|
export declare const makeFieldState: (definition: FieldDefinition, config: NormalizedFieldConfig, initialValue: unknown, values: Record<string, unknown>, submitCount: number, formStatus: FormStatus) => InternalFieldState;
|
|
19
|
-
type CreateFieldValidatorOptions = {
|
|
20
|
-
config: NormalizedFieldConfig;
|
|
21
|
-
definition: FieldDefinition;
|
|
22
|
-
store: EngineStore;
|
|
23
|
-
getValues: () => Record<string, unknown>;
|
|
24
|
-
getSubmitCount: () => number;
|
|
25
|
-
getFormStatus: () => FormStatus;
|
|
26
|
-
commitState: FieldStateCommitter;
|
|
27
|
-
};
|
|
28
|
-
export declare const createFieldValidator: ({ config, definition, store, getValues, getSubmitCount, getFormStatus, commitState, }: CreateFieldValidatorOptions) => FieldValidator;
|
|
29
|
-
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EngineStore, InternalFieldState } from '../state';
|
|
2
|
+
import { FieldDefinition, FieldValidationResult, FormStatus, NormalizedFieldConfig } from '../types';
|
|
3
|
+
export type FieldStateCommitter = (fieldId: string, nextState: InternalFieldState) => void;
|
|
4
|
+
export type FieldValidator = {
|
|
5
|
+
abort(reason?: string): void;
|
|
6
|
+
validate(currentState: InternalFieldState, validationVersion?: number): Promise<FieldValidationResult>;
|
|
7
|
+
};
|
|
8
|
+
type CreateFieldValidatorOptions = {
|
|
9
|
+
config: NormalizedFieldConfig;
|
|
10
|
+
definition: FieldDefinition;
|
|
11
|
+
store: EngineStore;
|
|
12
|
+
getValues: () => Record<string, unknown>;
|
|
13
|
+
getSubmitCount: () => number;
|
|
14
|
+
getFormStatus: () => FormStatus;
|
|
15
|
+
commitState: FieldStateCommitter;
|
|
16
|
+
};
|
|
17
|
+
export declare const createFieldValidator: ({ config, definition, store, getValues, getSubmitCount, getFormStatus, commitState, }: CreateFieldValidatorOptions) => FieldValidator;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MLFormError } from '../shared';
|
|
2
|
+
import { ExplanationConfig, ExplanationDefinition, FieldConfig, FieldDefinition, Registry, ReportConfig, ReportDefinition } from './index';
|
|
3
|
+
export declare class RegistryError extends MLFormError {
|
|
4
|
+
constructor(message: string);
|
|
5
|
+
}
|
|
6
|
+
export declare const createRegistry: () => Registry;
|
|
7
|
+
export declare const defineFieldDefinition: <TDefinition extends FieldDefinition<FieldConfig, unknown>>(definition: TDefinition) => TDefinition;
|
|
8
|
+
export declare const defineReportDefinition: <TDefinition extends ReportDefinition<ReportConfig>>(definition: TDefinition) => TDefinition;
|
|
9
|
+
export declare const defineExplanationDefinition: <TDefinition extends ExplanationDefinition<ExplanationConfig>>(definition: TDefinition) => TDefinition;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ZodType } from 'zod';
|
|
2
|
+
export type ExplanationStatus = "idle" | "loading" | "done" | "error";
|
|
3
|
+
export interface BaseExplanationConfig {
|
|
4
|
+
id?: string;
|
|
5
|
+
kind: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export type ExplanationConfig = BaseExplanationConfig;
|
|
11
|
+
export type NormalizedExplanationConfig<TConfig extends ExplanationConfig = ExplanationConfig> = TConfig & {
|
|
12
|
+
id: string;
|
|
13
|
+
};
|
|
14
|
+
export interface ExplanationStateSnapshot {
|
|
15
|
+
status: ExplanationStatus;
|
|
16
|
+
result: unknown;
|
|
17
|
+
error: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface ExplanationFetchContext<TConfig extends ExplanationConfig = ExplanationConfig> {
|
|
20
|
+
config: NormalizedExplanationConfig<TConfig>;
|
|
21
|
+
explanationId: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ExplanationFetchRequest {
|
|
24
|
+
explanationId: string;
|
|
25
|
+
backend?: string;
|
|
26
|
+
values: Record<string, unknown>;
|
|
27
|
+
fieldValues: Record<string, unknown>;
|
|
28
|
+
serializedValues: Record<string, unknown>;
|
|
29
|
+
serializedFieldValues: Record<string, unknown>;
|
|
30
|
+
reports: Record<string, unknown>;
|
|
31
|
+
meta: Record<string, unknown>;
|
|
32
|
+
raw: unknown;
|
|
33
|
+
signal?: AbortSignal;
|
|
34
|
+
}
|
|
35
|
+
export interface ExplanationFetchTransport {
|
|
36
|
+
submit: (request: ExplanationFetchRequest) => Promise<unknown>;
|
|
37
|
+
}
|
|
38
|
+
export type ExplanationFetchFactory<TConfig extends ExplanationConfig = ExplanationConfig> = (context: ExplanationFetchContext<TConfig>) => ExplanationFetchTransport;
|
|
39
|
+
export interface ExplanationDefinition<TConfig extends ExplanationConfig = ExplanationConfig> {
|
|
40
|
+
kind: string;
|
|
41
|
+
schema: ZodType<TConfig>;
|
|
42
|
+
transport: (config: TConfig) => ExplanationFetchTransport;
|
|
43
|
+
}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import { ZodType } from 'zod';
|
|
2
|
-
|
|
3
|
-
type
|
|
2
|
+
export type MaybePromise<T> = T | PromiseLike<T>;
|
|
3
|
+
export type FormStatus = "idle" | "editing" | "validating" | "submitting" | "success" | "error";
|
|
4
4
|
export type FieldStatus = "idle" | "validating" | "valid" | "invalid";
|
|
5
5
|
export type InactiveFieldPolicy = "include" | "omit" | "reset-on-hide";
|
|
6
|
-
export interface FieldDescriptor {
|
|
7
|
-
component: string;
|
|
8
|
-
props: Record<string, unknown>;
|
|
9
|
-
meta?: Record<string, unknown>;
|
|
10
|
-
}
|
|
11
6
|
export interface BaseFieldConfig {
|
|
12
7
|
id?: string;
|
|
13
8
|
kind: string;
|
|
14
9
|
label: string;
|
|
15
10
|
description?: string;
|
|
11
|
+
showDescriptionInline?: boolean;
|
|
16
12
|
required?: boolean;
|
|
17
13
|
disabled?: boolean;
|
|
18
14
|
hidden?: boolean;
|
|
@@ -108,12 +104,6 @@ export interface NotCondition {
|
|
|
108
104
|
}
|
|
109
105
|
export type DeclarativeFieldCondition = FieldValueCondition | FieldComparisonCondition | FormStatusCondition | SubmitCountCondition | AllConditions | AnyConditions | NotCondition;
|
|
110
106
|
export type FieldCondition<TConfig extends FieldConfig = FieldConfig> = DeclarativeFieldCondition | ((context: FieldConditionContext<TConfig>) => boolean);
|
|
111
|
-
export interface FieldDescriptorContext {
|
|
112
|
-
fieldId: string;
|
|
113
|
-
state: FieldStateSnapshot;
|
|
114
|
-
}
|
|
115
|
-
export type FieldWidget = "text" | "number" | "boolean" | "select" | "date" | "series";
|
|
116
|
-
export type FieldRenderHints = Record<string, unknown>;
|
|
117
107
|
export interface FieldValueAdapter<TConfig extends FieldConfig = FieldConfig, TValue = unknown> {
|
|
118
108
|
default?: (config: TConfig) => TValue;
|
|
119
109
|
normalize?: (value: unknown, config: TConfig) => TValue;
|
|
@@ -125,23 +115,6 @@ export interface FieldValidationFnContext<TConfig extends FieldConfig = FieldCon
|
|
|
125
115
|
config: TConfig;
|
|
126
116
|
value: TValue;
|
|
127
117
|
}
|
|
128
|
-
export interface FieldRenderSpecContext<TConfig extends FieldConfig = FieldConfig, TValue = unknown> {
|
|
129
|
-
config: TConfig;
|
|
130
|
-
fieldId: string;
|
|
131
|
-
state: FieldStateSnapshot;
|
|
132
|
-
value: TValue;
|
|
133
|
-
}
|
|
134
|
-
export interface FieldRenderSpec<TConfig extends FieldConfig = FieldConfig, TValue = unknown> {
|
|
135
|
-
widget: FieldWidget;
|
|
136
|
-
hints?: FieldRenderHints | ((context: FieldRenderSpecContext<TConfig, TValue>) => FieldRenderHints);
|
|
137
|
-
}
|
|
138
|
-
export interface DeclarativeFieldKind<TConfig extends FieldConfig = FieldConfig, TValue = unknown> {
|
|
139
|
-
kind: string;
|
|
140
|
-
schema: ZodType<TConfig>;
|
|
141
|
-
value?: FieldValueAdapter<TConfig, TValue>;
|
|
142
|
-
validate?: (context: FieldValidationFnContext<TConfig, TValue>) => MaybePromise<string[]>;
|
|
143
|
-
render: FieldRenderSpec<TConfig, TValue>;
|
|
144
|
-
}
|
|
145
118
|
export interface FieldDefinition<TConfig extends FieldConfig = FieldConfig, TValue = unknown> {
|
|
146
119
|
kind: string;
|
|
147
120
|
schema: ZodType<TConfig>;
|
|
@@ -151,23 +124,8 @@ export interface FieldDefinition<TConfig extends FieldConfig = FieldConfig, TVal
|
|
|
151
124
|
isEqual?: (previous: TValue, next: TValue, config: TConfig) => boolean;
|
|
152
125
|
serializeValue?: (value: TValue, config: TConfig) => unknown;
|
|
153
126
|
validate?: (value: TValue, config: TConfig, context: FieldValidationContext<TConfig>) => MaybePromise<string[]>;
|
|
154
|
-
describe: (config: TConfig, context: FieldDescriptorContext) => FieldDescriptor;
|
|
155
|
-
}
|
|
156
|
-
export interface FieldController {
|
|
157
|
-
readonly id: string;
|
|
158
|
-
readonly kind: string;
|
|
159
|
-
readonly config: NormalizedFieldConfig;
|
|
160
|
-
readonly state: FieldStateSnapshot;
|
|
161
|
-
readonly descriptor: FieldDescriptor;
|
|
162
|
-
setValue(value: unknown): void;
|
|
163
|
-
blur(): void;
|
|
164
|
-
focus(): void;
|
|
165
|
-
validate(): Promise<FieldValidationResult>;
|
|
166
|
-
reset(): void;
|
|
167
|
-
subscribe(listener: (state: FieldStateSnapshot) => void): () => void;
|
|
168
127
|
}
|
|
169
128
|
export interface SelectorSubscriptionOptions<TSelected> {
|
|
170
129
|
emitInitial?: boolean;
|
|
171
130
|
equality?: (previous: TSelected, next: TSelected) => boolean;
|
|
172
131
|
}
|
|
173
|
-
export {};
|