mlform 0.1.2 → 0.1.4
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 +241 -88
- package/dist/design-system-CrrSGfFB.js +1352 -0
- package/dist/engine-nnhWPT2L.js +5301 -0
- package/dist/kit-Dt_1Fxlc.js +76 -0
- package/dist/mlform/design-system.mjs +2 -0
- package/dist/mlform/engine.mjs +3 -0
- package/dist/mlform/kit.mjs +3 -0
- package/dist/mlform/primitives.mjs +2 -0
- package/dist/mlform/questionnaire.mjs +640 -0
- package/dist/mlform/transport.mjs +2 -0
- package/dist/mlform.mjs +4 -709
- package/dist/primitives-Pi-ztAr6.js +5063 -0
- package/dist/transport-A1RsnZhD.js +2143 -0
- package/dist/types/src/design-system/constants.d.ts +34 -0
- package/dist/types/src/design-system/contract/component-keys.d.ts +2 -0
- package/dist/types/src/design-system/contract/component-tokens.d.ts +5 -0
- package/dist/types/src/design-system/contract/global-tokens.d.ts +7 -0
- package/dist/types/src/design-system/contract/index.d.ts +4 -0
- package/dist/types/src/design-system/contract/token-keys.d.ts +12 -0
- package/dist/types/src/design-system/index.d.ts +8 -0
- package/dist/types/src/design-system/recipes/contrast.d.ts +2 -0
- package/dist/types/src/design-system/recipes/default.d.ts +2 -0
- package/dist/types/src/design-system/recipes/index.d.ts +4 -0
- package/dist/types/src/design-system/recipes/minimal.d.ts +2 -0
- package/dist/types/src/design-system/recipes/soft.d.ts +2 -0
- package/dist/types/src/design-system/registry/builtins.d.ts +5 -0
- package/dist/types/src/design-system/registry/create-registry.d.ts +2 -0
- package/dist/types/src/design-system/registry/deep-freeze.d.ts +5 -0
- package/dist/types/src/design-system/registry/define-recipe.d.ts +2 -0
- package/dist/types/src/design-system/registry/define-theme.d.ts +2 -0
- package/dist/types/src/design-system/registry/define-token-maps.d.ts +6 -0
- package/dist/types/src/design-system/registry/index.d.ts +5 -0
- package/dist/types/src/design-system/resolve/diagnostics.d.ts +9 -0
- package/dist/types/src/design-system/resolve/index.d.ts +5 -0
- package/dist/types/src/design-system/resolve/merge-config.d.ts +2 -0
- package/dist/types/src/design-system/resolve/migrate-tokens.d.ts +44 -0
- package/dist/types/src/design-system/resolve/resolve-mode.d.ts +6 -0
- package/dist/types/src/design-system/resolve/resolve-recipe.d.ts +2 -0
- package/dist/types/src/design-system/resolve/resolve-theme.d.ts +2 -0
- package/dist/types/src/design-system/resolve/resolve-tokens.d.ts +2 -0
- package/dist/types/src/design-system/runtime/apply-tokens.d.ts +4 -0
- package/dist/types/src/design-system/runtime/attach-design-system.d.ts +11 -0
- package/dist/types/src/design-system/runtime/create-stylesheet.d.ts +11 -0
- package/dist/types/src/design-system/runtime/declarations.d.ts +5 -0
- package/dist/types/src/design-system/runtime/design-system-controller.d.ts +9 -0
- package/dist/types/src/design-system/runtime/host-state.d.ts +3 -0
- package/dist/types/src/design-system/runtime/hydrate-design-system.d.ts +25 -0
- package/dist/types/src/design-system/runtime/index.d.ts +8 -0
- package/dist/types/src/design-system/themes/cobalt.d.ts +2 -0
- package/dist/types/src/design-system/themes/graphite.d.ts +2 -0
- package/dist/types/src/design-system/themes/index.d.ts +5 -0
- package/dist/types/src/design-system/themes/neutral.d.ts +2 -0
- package/dist/types/src/design-system/themes/sage.d.ts +2 -0
- package/dist/types/src/design-system/themes/sunset.d.ts +2 -0
- package/dist/types/src/design-system/tokens/base.d.ts +5 -0
- package/dist/types/src/design-system/tokens/contrast.d.ts +8 -0
- package/dist/types/src/design-system/tokens/density.d.ts +9 -0
- package/dist/types/src/design-system/tokens/forced-colors.d.ts +12 -0
- package/dist/types/src/design-system/tokens/index.d.ts +5 -0
- package/dist/types/src/design-system/tokens/motion.d.ts +2 -0
- package/dist/types/src/design-system/types.d.ts +225 -0
- package/dist/types/src/engine/builtins/fields/boolean.d.ts +8 -0
- package/dist/types/src/engine/builtins/fields/category.d.ts +11 -0
- package/dist/types/src/engine/builtins/fields/date.d.ts +9 -0
- package/dist/types/src/engine/builtins/fields/long-text.d.ts +10 -0
- package/dist/types/src/engine/builtins/fields/multi-choice.d.ts +12 -0
- package/dist/types/src/engine/builtins/fields/number.d.ts +11 -0
- package/dist/types/src/engine/builtins/fields/rating.d.ts +9 -0
- package/dist/types/src/engine/builtins/fields/series.d.ts +20 -0
- package/dist/types/src/engine/builtins/fields/single-choice.d.ts +12 -0
- package/dist/types/src/engine/builtins/fields/text.d.ts +10 -0
- package/dist/types/src/engine/builtins/index.d.ts +97 -0
- package/dist/types/src/engine/builtins/reports/classifier.d.ts +8 -0
- package/dist/types/src/engine/builtins/reports/regressor.d.ts +8 -0
- package/dist/types/src/engine/builtins/shared.d.ts +49 -0
- package/dist/types/src/engine/comparison.d.ts +2 -0
- package/dist/types/src/engine/constants.d.ts +51 -0
- package/dist/types/src/engine/declarative/explanation.d.ts +2 -0
- package/dist/types/src/engine/declarative/field.d.ts +2 -0
- package/dist/types/src/engine/declarative/presentation.d.ts +61 -0
- package/dist/types/src/engine/declarative/report.d.ts +2 -0
- package/dist/types/src/engine/equality.d.ts +4 -0
- package/dist/types/src/engine/errors.d.ts +28 -0
- package/dist/types/src/engine/explanations/controller.d.ts +13 -0
- package/dist/types/src/engine/explanations/index.d.ts +1 -0
- package/dist/types/src/engine/fields/controller.d.ts +30 -0
- package/dist/types/src/engine/fields/index.d.ts +1 -0
- package/dist/types/src/engine/form.d.ts +2 -0
- package/dist/types/src/engine/index.d.ts +11 -0
- package/dist/types/src/engine/paths.d.ts +2 -0
- package/dist/types/src/engine/registry/index.d.ts +26 -0
- package/dist/types/src/engine/reports/controller.d.ts +19 -0
- package/dist/types/src/engine/reports/index.d.ts +1 -0
- package/dist/types/src/engine/schema/index.d.ts +7 -0
- package/dist/types/src/engine/state/engine.d.ts +60 -0
- package/dist/types/src/engine/state/index.d.ts +3 -0
- package/dist/types/src/engine/state/snapshots.d.ts +5 -0
- package/dist/types/src/engine/state/store.d.ts +13 -0
- package/dist/types/src/engine/submission/abort.d.ts +15 -0
- package/dist/types/src/engine/submission/explanations.d.ts +2 -0
- package/dist/types/src/engine/submission/index.d.ts +5 -0
- package/dist/types/src/engine/submission/lifecycle.d.ts +16 -0
- package/dist/types/src/engine/submission/pipeline.d.ts +2 -0
- package/dist/types/src/engine/submission/reports.d.ts +12 -0
- package/dist/types/src/engine/submission/request.d.ts +23 -0
- package/dist/types/src/engine/submission/result.d.ts +4 -0
- package/dist/types/src/engine/submission/submitter.d.ts +40 -0
- package/dist/types/src/engine/types/explanation.d.ts +109 -0
- package/dist/types/src/engine/types/field.d.ts +172 -0
- package/dist/types/src/engine/types/form.d.ts +120 -0
- package/dist/types/src/engine/types/index.d.ts +9 -0
- package/dist/types/src/engine/types/pipeline.d.ts +31 -0
- package/dist/types/src/engine/types/registry.d.ts +17 -0
- package/dist/types/src/engine/types/report.d.ts +87 -0
- package/dist/types/src/engine/types/transport.d.ts +41 -0
- package/dist/types/src/engine/utils.d.ts +9 -0
- package/dist/types/src/engine/validation/conditions.d.ts +11 -0
- package/dist/types/src/engine/validation/field.d.ts +29 -0
- package/dist/types/src/engine/validation/form.d.ts +35 -0
- package/dist/types/src/engine/validation/index.d.ts +3 -0
- package/dist/types/src/engine/values.d.ts +2 -0
- package/dist/types/src/index.d.ts +7 -0
- package/dist/types/src/kit/constants.d.ts +4 -0
- package/dist/types/src/kit/defaults.d.ts +11 -0
- package/dist/types/src/kit/index.d.ts +4 -0
- package/dist/types/src/kit/mount-form.d.ts +3 -0
- package/dist/types/src/kit/types.d.ts +52 -0
- package/dist/types/src/primitives/base-async-report-element.d.ts +19 -0
- package/dist/types/src/primitives/base-explanation-element.d.ts +21 -0
- package/dist/types/src/primitives/base-field-element.d.ts +21 -0
- package/dist/types/src/primitives/base-report-element.d.ts +15 -0
- package/dist/types/src/primitives/components/declarative-explanation.d.ts +5 -0
- package/dist/types/src/primitives/components/declarative-field.d.ts +6 -0
- package/dist/types/src/primitives/components/declarative-report.d.ts +5 -0
- package/dist/types/src/primitives/components/explanation-panel.d.ts +22 -0
- package/dist/types/src/primitives/components/field-frame.d.ts +21 -0
- package/dist/types/src/primitives/components/form-errors.d.ts +19 -0
- package/dist/types/src/primitives/components/form-root.d.ts +29 -0
- package/dist/types/src/primitives/components/presentation.d.ts +4 -0
- package/dist/types/src/primitives/components/report-frame.d.ts +22 -0
- package/dist/types/src/primitives/components/submit-button.d.ts +21 -0
- package/dist/types/src/primitives/components/unsupported-component.d.ts +14 -0
- package/dist/types/src/primitives/constants.d.ts +94 -0
- package/dist/types/src/primitives/controller-binding.d.ts +32 -0
- package/dist/types/src/primitives/fields/boolean-field.d.ts +6 -0
- package/dist/types/src/primitives/fields/category-field.d.ts +6 -0
- package/dist/types/src/primitives/fields/date-field.d.ts +6 -0
- package/dist/types/src/primitives/fields/long-text-field.d.ts +6 -0
- package/dist/types/src/primitives/fields/multi-choice-field.d.ts +6 -0
- package/dist/types/src/primitives/fields/number-field.d.ts +8 -0
- package/dist/types/src/primitives/fields/rating-field.d.ts +6 -0
- package/dist/types/src/primitives/fields/series-field.d.ts +8 -0
- package/dist/types/src/primitives/fields/single-choice-field.d.ts +6 -0
- package/dist/types/src/primitives/fields/text-field.d.ts +6 -0
- package/dist/types/src/primitives/index.d.ts +8 -0
- package/dist/types/src/primitives/mount-form.d.ts +4 -0
- package/dist/types/src/primitives/register.d.ts +0 -0
- package/dist/types/src/primitives/registry.d.ts +3 -0
- package/dist/types/src/primitives/reports/classifier-report.d.ts +5 -0
- package/dist/types/src/primitives/reports/regressor-report.d.ts +5 -0
- package/dist/types/src/primitives/types.d.ts +128 -0
- package/dist/types/src/primitives/utils.d.ts +3 -0
- package/dist/types/src/questionnaire/constants.d.ts +31 -0
- package/dist/types/src/questionnaire/defaults.d.ts +8 -0
- package/dist/types/src/questionnaire/engine/controller.d.ts +12 -0
- package/dist/types/src/questionnaire/engine/schema.d.ts +9 -0
- package/dist/types/src/questionnaire/errors.d.ts +3 -0
- package/dist/types/src/questionnaire/index.d.ts +6 -0
- package/dist/types/src/questionnaire/mount.d.ts +3 -0
- package/dist/types/src/questionnaire/primitives/components/questionnaire-root.d.ts +23 -0
- package/dist/types/src/questionnaire/primitives/components/step-indicator.d.ts +14 -0
- package/dist/types/src/questionnaire/primitives/register.d.ts +0 -0
- package/dist/types/src/questionnaire/types.d.ts +69 -0
- package/dist/types/src/shared/errors.d.ts +3 -0
- package/dist/types/src/shared/index.d.ts +1 -0
- package/dist/types/src/transport/capabilities.d.ts +7 -0
- package/dist/types/src/transport/clone.d.ts +6 -0
- package/dist/types/src/transport/composition/fallback.d.ts +2 -0
- package/dist/types/src/transport/composition/fanout.d.ts +3 -0
- package/dist/types/src/transport/composition/hedged.d.ts +2 -0
- package/dist/types/src/transport/composition/index.d.ts +7 -0
- package/dist/types/src/transport/composition/load-balancing.d.ts +2 -0
- package/dist/types/src/transport/composition/pipeline.d.ts +2 -0
- package/dist/types/src/transport/composition/racing.d.ts +2 -0
- package/dist/types/src/transport/composition/routing.d.ts +3 -0
- package/dist/types/src/transport/constants.d.ts +34 -0
- package/dist/types/src/transport/errors.d.ts +36 -0
- package/dist/types/src/transport/index.d.ts +9 -0
- package/dist/types/src/transport/internal.d.ts +110 -0
- package/dist/types/src/transport/middleware/auth.d.ts +2 -0
- package/dist/types/src/transport/middleware/cache.d.ts +2 -0
- package/dist/types/src/transport/middleware/circuit-breaker.d.ts +2 -0
- package/dist/types/src/transport/middleware/dedup.d.ts +2 -0
- package/dist/types/src/transport/middleware/index.d.ts +12 -0
- package/dist/types/src/transport/middleware/logging.d.ts +2 -0
- package/dist/types/src/transport/middleware/metrics.d.ts +2 -0
- package/dist/types/src/transport/middleware/pipe.d.ts +2 -0
- package/dist/types/src/transport/middleware/rate-limit.d.ts +2 -0
- package/dist/types/src/transport/middleware/retry.d.ts +2 -0
- package/dist/types/src/transport/middleware/timeout.d.ts +2 -0
- package/dist/types/src/transport/middleware/tracing.d.ts +2 -0
- package/dist/types/src/transport/middleware/transform.d.ts +3 -0
- package/dist/types/src/transport/policy-context.d.ts +3 -0
- package/dist/types/src/transport/protocols/graphql.d.ts +2 -0
- package/dist/types/src/transport/protocols/grpc.d.ts +5 -0
- package/dist/types/src/transport/protocols/index.d.ts +5 -0
- package/dist/types/src/transport/protocols/json.d.ts +2 -0
- package/dist/types/src/transport/protocols/sse.d.ts +2 -0
- package/dist/types/src/transport/protocols/websocket.d.ts +2 -0
- package/dist/types/src/transport/runtime.d.ts +4 -0
- package/dist/types/src/transport/state/cache-store.d.ts +2 -0
- package/dist/types/src/transport/state/circuit-breaker.d.ts +2 -0
- package/dist/types/src/transport/state/health.d.ts +2 -0
- package/dist/types/src/transport/state/index.d.ts +5 -0
- package/dist/types/src/transport/state/rate-limiter.d.ts +2 -0
- package/dist/types/src/transport/state/session.d.ts +2 -0
- package/dist/types/src/transport/types/capabilities.d.ts +35 -0
- package/dist/types/src/transport/types/core.d.ts +57 -0
- package/dist/types/src/transport/types/events.d.ts +50 -0
- package/dist/types/src/transport/types/index.d.ts +7 -0
- package/dist/types/src/transport/types/middleware.d.ts +3 -0
- package/dist/types/src/transport/types/options.d.ts +258 -0
- package/dist/types/src/transport/types/session.d.ts +48 -0
- package/dist/types/src/transport/types/state.d.ts +46 -0
- package/package.json +93 -37
- package/dist/FieldStrategy-pPekBtH-.js +0 -2318
- package/dist/ModelTypes-B9_veCKB.js +0 -5
- package/dist/ReportStrategy-DY3GC_mJ.js +0 -23
- package/dist/boolean-field-Cd3uhIPj.js +0 -104
- package/dist/category-field-D_Ms1x9u.js +0 -73
- package/dist/classifier-prediction-C5QzorTo.js +0 -193
- package/dist/custom-element-ttkHUa8w.js +0 -13
- package/dist/date-field-Cg_ja679.js +0 -162
- package/dist/error-card-BwjPChwf.js +0 -195
- package/dist/field-wrapper-DqIQl76d.js +0 -177
- package/dist/ml-layout-Dx63KKf7.js +0 -332
- package/dist/mlform/extensions.mjs +0 -38
- package/dist/mlform/strategies.mjs +0 -292
- package/dist/number-field-CC2DrVEb.js +0 -165
- package/dist/property-jKFNMQpR.js +0 -561
- package/dist/range-field-Cr7LEtsJ.js +0 -98
- package/dist/regressor-prediction-C18dHlfK.js +0 -236
- package/dist/src/core/app/DescriptorItem.d.ts +0 -6
- package/dist/src/core/app/DescriptorRegistry.d.ts +0 -13
- package/dist/src/core/app/DescriptorService.d.ts +0 -22
- package/dist/src/core/app/DescriptorStrategy.d.ts +0 -11
- package/dist/src/core/app/index.d.ts +0 -4
- package/dist/src/core/domain/index.d.ts +0 -24
- package/dist/src/core/index.d.ts +0 -3
- package/dist/src/core/ui/error-card.d.ts +0 -38
- package/dist/src/core/ui/field-wrapper.d.ts +0 -23
- package/dist/src/core/ui/index.d.ts +0 -3
- package/dist/src/core/ui/ml-layout.d.ts +0 -23
- package/dist/src/extensions/app/FieldStrategy.d.ts +0 -10
- package/dist/src/extensions/app/ReportStrategy.d.ts +0 -9
- package/dist/src/extensions/app/index.d.ts +0 -2
- package/dist/src/extensions/domain/BaseField.d.ts +0 -7
- package/dist/src/extensions/domain/BaseModel.d.ts +0 -6
- package/dist/src/extensions/domain/index.d.ts +0 -2
- package/dist/src/extensions/index.d.ts +0 -3
- package/dist/src/extensions/ui/field-element.d.ts +0 -9
- package/dist/src/extensions/ui/index.d.ts +0 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/mlform/index.d.ts +0 -1
- package/dist/src/mlform/mlform.d.ts +0 -27
- package/dist/src/mlform/mlform.types.d.ts +0 -11
- package/dist/src/strategies/app/BooleanStrategy.d.ts +0 -12
- package/dist/src/strategies/app/CategoryStrategy.d.ts +0 -13
- package/dist/src/strategies/app/ClassifierStrategy.d.ts +0 -15
- package/dist/src/strategies/app/DateStrategy.d.ts +0 -15
- package/dist/src/strategies/app/NumberStrategy.d.ts +0 -29
- package/dist/src/strategies/app/RegressorStrategy.d.ts +0 -15
- package/dist/src/strategies/app/TextStrategy.d.ts +0 -16
- package/dist/src/strategies/app/index.d.ts +0 -7
- package/dist/src/strategies/domain/BooleanField.d.ts +0 -10
- package/dist/src/strategies/domain/CategoryField.d.ts +0 -11
- package/dist/src/strategies/domain/ClassifierModel.d.ts +0 -11
- package/dist/src/strategies/domain/DateField.d.ts +0 -13
- package/dist/src/strategies/domain/FieldTypes.d.ts +0 -7
- package/dist/src/strategies/domain/ModelTypes.d.ts +0 -4
- package/dist/src/strategies/domain/NumberField.d.ts +0 -15
- package/dist/src/strategies/domain/RegressorModel.d.ts +0 -11
- package/dist/src/strategies/domain/TextField.d.ts +0 -14
- package/dist/src/strategies/domain/index.d.ts +0 -9
- package/dist/src/strategies/index.d.ts +0 -1
- package/dist/src/strategies/ui/boolean-field.d.ts +0 -13
- package/dist/src/strategies/ui/category-field.d.ts +0 -14
- package/dist/src/strategies/ui/classifier-prediction.d.ts +0 -39
- package/dist/src/strategies/ui/date-field.d.ts +0 -18
- package/dist/src/strategies/ui/index.d.ts +0 -8
- package/dist/src/strategies/ui/number-field.d.ts +0 -19
- package/dist/src/strategies/ui/range-field.d.ts +0 -17
- package/dist/src/strategies/ui/regressor-prediction.d.ts +0 -29
- package/dist/src/strategies/ui/text-field.d.ts +0 -17
- package/dist/state-CLlTRyl1.js +0 -12
- package/dist/test/_fixtures/DummyField.d.ts +0 -9
- package/dist/test/setup.d.ts +0 -1
- package/dist/test/unit/DummyField.test.d.ts +0 -1
- package/dist/text-field-DwP-Fa1w.js +0 -114
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { BooleanStrategy } from './BooleanStrategy';
|
|
2
|
-
export { CategoryStrategy } from './CategoryStrategy';
|
|
3
|
-
export { ClassifierStrategy } from './ClassifierStrategy';
|
|
4
|
-
export { DateStrategy } from './DateStrategy';
|
|
5
|
-
export { NumberStrategy } from './NumberStrategy';
|
|
6
|
-
export { RegressorStrategy } from './RegressorStrategy';
|
|
7
|
-
export { TextStrategy } from './TextStrategy';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FieldTypes } from './FieldTypes';
|
|
2
|
-
import * as z from "zod";
|
|
3
|
-
export declare const BooleanFieldSchema: z.ZodObject<{
|
|
4
|
-
type: z.ZodLiteral<FieldTypes.BOOLEAN>;
|
|
5
|
-
value: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
-
title: z.ZodString;
|
|
7
|
-
description: z.ZodOptional<z.ZodString>;
|
|
8
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
9
|
-
}, z.core.$strict>;
|
|
10
|
-
export type BooleanField = z.infer<typeof BooleanFieldSchema>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FieldTypes } from './FieldTypes';
|
|
2
|
-
import * as z from "zod";
|
|
3
|
-
export declare const CategoryFieldSchema: z.ZodObject<{
|
|
4
|
-
type: z.ZodLiteral<FieldTypes.CATEGORY>;
|
|
5
|
-
value: z.ZodOptional<z.ZodString>;
|
|
6
|
-
options: z.ZodArray<z.ZodString>;
|
|
7
|
-
title: z.ZodString;
|
|
8
|
-
description: z.ZodOptional<z.ZodString>;
|
|
9
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
10
|
-
}, z.core.$strict>;
|
|
11
|
-
export type CategoryField = z.infer<typeof CategoryFieldSchema>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ModelTypes } from './ModelTypes';
|
|
2
|
-
import * as z from "zod";
|
|
3
|
-
export declare const ClassifierModelSchema: z.ZodObject<{
|
|
4
|
-
type: z.ZodLiteral<ModelTypes.CLASSIFIER>;
|
|
5
|
-
mapping: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
|
-
probabilities: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodNumber>>>;
|
|
7
|
-
details: z.ZodDefault<z.ZodBoolean>;
|
|
8
|
-
title: z.ZodOptional<z.ZodString>;
|
|
9
|
-
execution_time: z.ZodOptional<z.ZodNumber>;
|
|
10
|
-
}, z.core.$strict>;
|
|
11
|
-
export type ClassifierModel = z.infer<typeof ClassifierModelSchema>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FieldTypes } from './FieldTypes';
|
|
2
|
-
import * as z from "zod";
|
|
3
|
-
export declare const DateFieldSchema: z.ZodObject<{
|
|
4
|
-
type: z.ZodLiteral<FieldTypes.DATE>;
|
|
5
|
-
value: z.ZodOptional<z.ZodISODateTime>;
|
|
6
|
-
min: z.ZodOptional<z.ZodISODateTime>;
|
|
7
|
-
max: z.ZodOptional<z.ZodISODateTime>;
|
|
8
|
-
step: z.ZodOptional<z.ZodDefault<z.ZodInt>>;
|
|
9
|
-
title: z.ZodString;
|
|
10
|
-
description: z.ZodOptional<z.ZodString>;
|
|
11
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
-
}, z.core.$strict>;
|
|
13
|
-
export type DateField = z.infer<typeof DateFieldSchema>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FieldTypes } from './FieldTypes';
|
|
2
|
-
import * as z from "zod";
|
|
3
|
-
export declare const NumberFieldSchema: z.ZodObject<{
|
|
4
|
-
type: z.ZodLiteral<FieldTypes.NUMBER>;
|
|
5
|
-
min: z.ZodOptional<z.ZodNumber>;
|
|
6
|
-
max: z.ZodOptional<z.ZodNumber>;
|
|
7
|
-
step: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
8
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
9
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
10
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
11
|
-
title: z.ZodString;
|
|
12
|
-
description: z.ZodOptional<z.ZodString>;
|
|
13
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
14
|
-
}, z.core.$strict>;
|
|
15
|
-
export type NumberField = z.infer<typeof NumberFieldSchema>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ModelTypes } from './ModelTypes';
|
|
2
|
-
import * as z from "zod";
|
|
3
|
-
export declare const RegressorModelSchema: z.ZodObject<{
|
|
4
|
-
type: z.ZodLiteral<ModelTypes.REGRESSOR>;
|
|
5
|
-
values: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
6
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
7
|
-
interval: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
8
|
-
title: z.ZodOptional<z.ZodString>;
|
|
9
|
-
execution_time: z.ZodOptional<z.ZodNumber>;
|
|
10
|
-
}, z.core.$strict>;
|
|
11
|
-
export type RegressorModel = z.infer<typeof RegressorModelSchema>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FieldTypes } from './FieldTypes';
|
|
2
|
-
import * as z from "zod";
|
|
3
|
-
export declare const TextFieldSchema: z.ZodObject<{
|
|
4
|
-
type: z.ZodLiteral<FieldTypes.TEXT>;
|
|
5
|
-
value: z.ZodOptional<z.ZodString>;
|
|
6
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
7
|
-
minLength: z.ZodOptional<z.ZodInt>;
|
|
8
|
-
maxLength: z.ZodOptional<z.ZodInt>;
|
|
9
|
-
pattern: z.ZodOptional<z.ZodString>;
|
|
10
|
-
title: z.ZodString;
|
|
11
|
-
description: z.ZodOptional<z.ZodString>;
|
|
12
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
13
|
-
}, z.core.$strict>;
|
|
14
|
-
export type TextField = z.infer<typeof TextFieldSchema>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { type BooleanField, BooleanFieldSchema } from './BooleanField';
|
|
2
|
-
export { type CategoryField, CategoryFieldSchema } from './CategoryField';
|
|
3
|
-
export { type ClassifierModel, ClassifierModelSchema } from './ClassifierModel';
|
|
4
|
-
export { type DateField, DateFieldSchema } from './DateField';
|
|
5
|
-
export { FieldTypes } from './FieldTypes';
|
|
6
|
-
export { ModelTypes } from './ModelTypes';
|
|
7
|
-
export { type NumberField, NumberFieldSchema } from './NumberField';
|
|
8
|
-
export { type RegressorModel, RegressorModelSchema } from './RegressorModel';
|
|
9
|
-
export { type TextField, TextFieldSchema } from './TextField';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BooleanStrategy, CategoryStrategy, ClassifierStrategy, DateStrategy, NumberStrategy, RegressorStrategy, TextStrategy, } from './app';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FieldElement } from '../../extensions/ui';
|
|
2
|
-
export declare class BooleanField extends FieldElement<boolean> {
|
|
3
|
-
static styles: import('lit').CSSResultGroup[];
|
|
4
|
-
defaultValue: string;
|
|
5
|
-
firstUpdated(): void;
|
|
6
|
-
private onChange;
|
|
7
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
8
|
-
}
|
|
9
|
-
declare global {
|
|
10
|
-
interface HTMLElementTagNameMap {
|
|
11
|
-
"boolean-field": BooleanField;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FieldElement } from '../../extensions/ui';
|
|
2
|
-
export declare class CategoryField extends FieldElement<string> {
|
|
3
|
-
static styles: import('lit').CSSResultGroup[];
|
|
4
|
-
optionList: string[];
|
|
5
|
-
defaultValue: string;
|
|
6
|
-
firstUpdated(): void;
|
|
7
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
8
|
-
private handleChange;
|
|
9
|
-
}
|
|
10
|
-
declare global {
|
|
11
|
-
interface HTMLElementTagNameMap {
|
|
12
|
-
"category-field": CategoryField;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
/**
|
|
3
|
-
* <classifier-prediction>
|
|
4
|
-
* --------------------------------------------------
|
|
5
|
-
* Visualiza las predicciones de un clasificador.
|
|
6
|
-
* - `mapping` → lista de etiquetas CSV
|
|
7
|
-
* - `probabilities` → array plano o matriz de probabilidades
|
|
8
|
-
* - `details` → modo detallado (true) o compacto (false)
|
|
9
|
-
* - `title` → título del bloque
|
|
10
|
-
*
|
|
11
|
-
* Ejemplo de uso:
|
|
12
|
-
* <classifier-prediction
|
|
13
|
-
* title="Vehicle type"
|
|
14
|
-
* mapping="Car,Motorcycle,Train"
|
|
15
|
-
* probabilities="0.12,0.68,0.20"
|
|
16
|
-
* details="true">
|
|
17
|
-
* </classifier-prediction>
|
|
18
|
-
* --------------------------------------------------
|
|
19
|
-
*/
|
|
20
|
-
type FlatProbs = number[];
|
|
21
|
-
type MatrixProbs = number[][];
|
|
22
|
-
export declare class ClassifierPrediction extends LitElement {
|
|
23
|
-
static styles: import('lit').CSSResult;
|
|
24
|
-
title: string;
|
|
25
|
-
mapping: string[];
|
|
26
|
-
probabilities: FlatProbs | MatrixProbs;
|
|
27
|
-
details: boolean;
|
|
28
|
-
private _resolveMapping;
|
|
29
|
-
private _flatToMatrix;
|
|
30
|
-
private get _probMatrix();
|
|
31
|
-
private get _predictions();
|
|
32
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
33
|
-
}
|
|
34
|
-
declare global {
|
|
35
|
-
interface HTMLElementTagNameMap {
|
|
36
|
-
"classifier-prediction": ClassifierPrediction;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FieldElement } from '../../extensions/ui';
|
|
2
|
-
export declare class DateField extends FieldElement<Date> {
|
|
3
|
-
static styles: import('lit').CSSResultGroup[];
|
|
4
|
-
step: string;
|
|
5
|
-
min: Date;
|
|
6
|
-
max: Date;
|
|
7
|
-
defaultValue: Date;
|
|
8
|
-
protected firstUpdated(): void;
|
|
9
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
10
|
-
private onInput;
|
|
11
|
-
private startOfDayUTC;
|
|
12
|
-
private formatDateUTC;
|
|
13
|
-
}
|
|
14
|
-
declare global {
|
|
15
|
-
interface HTMLElementTagNameMap {
|
|
16
|
-
"date-field": DateField;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { BooleanField } from './boolean-field';
|
|
2
|
-
export { CategoryField } from './category-field';
|
|
3
|
-
export { ClassifierPrediction } from './classifier-prediction';
|
|
4
|
-
export { DateField } from './date-field';
|
|
5
|
-
export { NumberField } from './number-field';
|
|
6
|
-
export { RangeField } from './range-field';
|
|
7
|
-
export { RegressorPrediction } from './regressor-prediction';
|
|
8
|
-
export { TextField } from './text-field';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { FieldElement } from '../../extensions/ui';
|
|
2
|
-
export declare class NumberField extends FieldElement<number> {
|
|
3
|
-
static styles: import('lit').CSSResultGroup[];
|
|
4
|
-
unit: string;
|
|
5
|
-
step: string;
|
|
6
|
-
min: string;
|
|
7
|
-
max: string;
|
|
8
|
-
defaultValue: string;
|
|
9
|
-
placeholder: string;
|
|
10
|
-
firstUpdated(): void;
|
|
11
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
12
|
-
private onInput;
|
|
13
|
-
private parseLocaleNumber;
|
|
14
|
-
}
|
|
15
|
-
declare global {
|
|
16
|
-
interface HTMLElementTagNameMap {
|
|
17
|
-
"number-field": NumberField;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FieldElement } from '../../extensions/ui';
|
|
2
|
-
export declare class RangeField extends FieldElement<number> {
|
|
3
|
-
static styles: import('lit').CSSResultGroup[];
|
|
4
|
-
unit: string;
|
|
5
|
-
step: string;
|
|
6
|
-
min: string;
|
|
7
|
-
max: string;
|
|
8
|
-
defaultValue: string;
|
|
9
|
-
protected firstUpdated(): void;
|
|
10
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
11
|
-
private onInput;
|
|
12
|
-
}
|
|
13
|
-
declare global {
|
|
14
|
-
interface HTMLElementTagNameMap {
|
|
15
|
-
"range-field": RangeField;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
/**
|
|
3
|
-
* <regressor-prediction>
|
|
4
|
-
* – Barra ±3 × (max-min) con gradiente lineal continuo.
|
|
5
|
-
* – Límites representados con marcadores más finos que sobresalen verticalmente
|
|
6
|
-
* respecto a la barra.
|
|
7
|
-
* – Etiquetas de los límites alineadas directamente bajo su marcador.
|
|
8
|
-
*/
|
|
9
|
-
export declare class RegressorPrediction extends LitElement {
|
|
10
|
-
static styles: import('lit').CSSResult;
|
|
11
|
-
title: string;
|
|
12
|
-
values: number[];
|
|
13
|
-
unit: string;
|
|
14
|
-
interval: [number, number];
|
|
15
|
-
private min;
|
|
16
|
-
private max;
|
|
17
|
-
protected firstUpdated(): void;
|
|
18
|
-
private _barExtents;
|
|
19
|
-
private _hasInterval;
|
|
20
|
-
private _calcPercent;
|
|
21
|
-
/** Gradiente lineal continuo: rojo → naranja → amarillo → verde → amarillo → naranja → rojo */
|
|
22
|
-
private _buildGradient;
|
|
23
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
24
|
-
}
|
|
25
|
-
declare global {
|
|
26
|
-
interface HTMLElementTagNameMap {
|
|
27
|
-
"regressor-prediction": RegressorPrediction;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FieldElement } from '../../extensions/ui';
|
|
2
|
-
export declare class TextField extends FieldElement<string> {
|
|
3
|
-
static styles: import('lit').CSSResultGroup[];
|
|
4
|
-
placeholder: string;
|
|
5
|
-
pattern: string;
|
|
6
|
-
defaultValue: string;
|
|
7
|
-
minlength: string;
|
|
8
|
-
maxlength: string;
|
|
9
|
-
firstUpdated(): void;
|
|
10
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
11
|
-
private onInput;
|
|
12
|
-
}
|
|
13
|
-
declare global {
|
|
14
|
-
interface HTMLElementTagNameMap {
|
|
15
|
-
"text-field": TextField;
|
|
16
|
-
}
|
|
17
|
-
}
|
package/dist/state-CLlTRyl1.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { DescriptorItem } from '../../src/core/app/DescriptorItem';
|
|
3
|
-
export declare class DummyField {
|
|
4
|
-
readonly type: string;
|
|
5
|
-
readonly schema: z.ZodString;
|
|
6
|
-
readonly comment: string;
|
|
7
|
-
constructor(type?: string, schema?: z.ZodString, comment?: string);
|
|
8
|
-
buildDescriptor(payload: Record<string, unknown>): DescriptorItem;
|
|
9
|
-
}
|
package/dist/test/setup.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { FieldElement as u } from "./mlform/extensions.mjs";
|
|
2
|
-
import { x as m, a as d, n as l } from "./property-jKFNMQpR.js";
|
|
3
|
-
import { t as c } from "./custom-element-ttkHUa8w.js";
|
|
4
|
-
var p = Object.defineProperty, g = Object.getOwnPropertyDescriptor, v = (t, e, r) => e in t ? p(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, a = (t, e, r, h) => {
|
|
5
|
-
for (var n = h > 1 ? void 0 : h ? g(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
6
|
-
(o = t[s]) && (n = (h ? o(e, r, n) : o(n)) || n);
|
|
7
|
-
return h && n && p(e, r, n), n;
|
|
8
|
-
}, f = (t, e, r) => v(t, e + "", r);
|
|
9
|
-
let i = class extends u {
|
|
10
|
-
placeholder = "Enter text...";
|
|
11
|
-
pattern = "";
|
|
12
|
-
firstUpdated() {
|
|
13
|
-
if (this.defaultValue) {
|
|
14
|
-
this.value = this.defaultValue, console.log(this.value);
|
|
15
|
-
const t = new InputEvent("input", {
|
|
16
|
-
bubbles: !0,
|
|
17
|
-
composed: !0
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(t, "target", {
|
|
20
|
-
value: { value: this.defaultValue },
|
|
21
|
-
writable: !1
|
|
22
|
-
}), this.onInput(t);
|
|
23
|
-
} else
|
|
24
|
-
this.value = "";
|
|
25
|
-
}
|
|
26
|
-
render() {
|
|
27
|
-
return m`
|
|
28
|
-
<div class="input-wrapper">
|
|
29
|
-
<input
|
|
30
|
-
type="text"
|
|
31
|
-
autocomplete="off"
|
|
32
|
-
@input=${this.onInput}
|
|
33
|
-
.value=${this.value}
|
|
34
|
-
.placeholder=${this.placeholder}
|
|
35
|
-
.minlength=${this.minlength}
|
|
36
|
-
.maxlength=${this.maxlength}
|
|
37
|
-
/>
|
|
38
|
-
</div>
|
|
39
|
-
`;
|
|
40
|
-
}
|
|
41
|
-
onInput(t) {
|
|
42
|
-
if (this.value = t.target.value, this.value === "") {
|
|
43
|
-
this.dispatchState("empty");
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
if (this.minlength && this.maxlength && this.value.length < Number(this.minlength) && this.value.length > Number(this.maxlength)) {
|
|
47
|
-
this.dispatchState(
|
|
48
|
-
"error",
|
|
49
|
-
`Length must be between ${this.minlength} and ${this.maxlength} characters.`
|
|
50
|
-
);
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
if (this.minlength && this.value.length < Number(this.minlength)) {
|
|
54
|
-
this.dispatchState(
|
|
55
|
-
"error",
|
|
56
|
-
`Minimum length is ${this.minlength} characters.`
|
|
57
|
-
);
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
if (this.maxlength && this.value.length > Number(this.maxlength)) {
|
|
61
|
-
this.dispatchState(
|
|
62
|
-
"error",
|
|
63
|
-
`Maximum length of ${this.maxlength} characters exceeded.`
|
|
64
|
-
);
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
if (this.pattern !== "" && !new RegExp(this.pattern).test(this.value)) {
|
|
68
|
-
this.dispatchState("error", "Invalid characters detected.");
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
this.dispatchState(
|
|
72
|
-
"success",
|
|
73
|
-
this.maxlength ? `Note recorded (${this.value.length}/${this.maxlength}).` : `Note recorded (Length: ${this.value.length}).`
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
f(i, "styles", [
|
|
78
|
-
u.baseStyles,
|
|
79
|
-
d`
|
|
80
|
-
input[type="text"] {
|
|
81
|
-
width: 100%;
|
|
82
|
-
padding: 0.75rem 1rem;
|
|
83
|
-
font-size: 1rem;
|
|
84
|
-
border: 1px solid var(--ml-color-border);
|
|
85
|
-
border-radius: var(--radius);
|
|
86
|
-
outline: none;
|
|
87
|
-
transition: border-color 0.2s ease;
|
|
88
|
-
}
|
|
89
|
-
input[type="text"]:focus {
|
|
90
|
-
border-color: var(--ml-color-accent);
|
|
91
|
-
}
|
|
92
|
-
`
|
|
93
|
-
]);
|
|
94
|
-
a([
|
|
95
|
-
l({ type: String })
|
|
96
|
-
], i.prototype, "placeholder", 2);
|
|
97
|
-
a([
|
|
98
|
-
l({ type: String })
|
|
99
|
-
], i.prototype, "pattern", 2);
|
|
100
|
-
a([
|
|
101
|
-
l({ type: String })
|
|
102
|
-
], i.prototype, "defaultValue", 2);
|
|
103
|
-
a([
|
|
104
|
-
l({ type: String })
|
|
105
|
-
], i.prototype, "minlength", 2);
|
|
106
|
-
a([
|
|
107
|
-
l({ type: String })
|
|
108
|
-
], i.prototype, "maxlength", 2);
|
|
109
|
-
i = a([
|
|
110
|
-
c("text-field")
|
|
111
|
-
], i);
|
|
112
|
-
export {
|
|
113
|
-
i as TextField
|
|
114
|
-
};
|