mlform 0.1.0

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.
Files changed (78) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +132 -0
  3. package/dist/FieldStrategy-pPekBtH-.js +2318 -0
  4. package/dist/ModelTypes-B9_veCKB.js +5 -0
  5. package/dist/ReportStrategy-DY3GC_mJ.js +23 -0
  6. package/dist/boolean-field-Cd3uhIPj.js +104 -0
  7. package/dist/category-field-D_Ms1x9u.js +73 -0
  8. package/dist/classifier-prediction-C5QzorTo.js +193 -0
  9. package/dist/custom-element-ttkHUa8w.js +13 -0
  10. package/dist/date-field-Cg_ja679.js +162 -0
  11. package/dist/error-card-BwjPChwf.js +195 -0
  12. package/dist/field-wrapper-DqIQl76d.js +177 -0
  13. package/dist/ml-layout-Dx63KKf7.js +332 -0
  14. package/dist/mlform/extensions.mjs +38 -0
  15. package/dist/mlform/strategies.mjs +292 -0
  16. package/dist/mlform.mjs +709 -0
  17. package/dist/number-field-CC2DrVEb.js +165 -0
  18. package/dist/property-jKFNMQpR.js +561 -0
  19. package/dist/range-field-Cr7LEtsJ.js +98 -0
  20. package/dist/regressor-prediction-C18dHlfK.js +236 -0
  21. package/dist/src/core/app/DescriptorItem.d.ts +6 -0
  22. package/dist/src/core/app/DescriptorRegistry.d.ts +13 -0
  23. package/dist/src/core/app/DescriptorService.d.ts +22 -0
  24. package/dist/src/core/app/DescriptorStrategy.d.ts +11 -0
  25. package/dist/src/core/app/index.d.ts +4 -0
  26. package/dist/src/core/domain/index.d.ts +24 -0
  27. package/dist/src/core/index.d.ts +3 -0
  28. package/dist/src/core/ui/error-card.d.ts +38 -0
  29. package/dist/src/core/ui/field-wrapper.d.ts +23 -0
  30. package/dist/src/core/ui/index.d.ts +3 -0
  31. package/dist/src/core/ui/ml-layout.d.ts +23 -0
  32. package/dist/src/extensions/app/FieldStrategy.d.ts +10 -0
  33. package/dist/src/extensions/app/ReportStrategy.d.ts +9 -0
  34. package/dist/src/extensions/app/index.d.ts +2 -0
  35. package/dist/src/extensions/domain/BaseField.d.ts +7 -0
  36. package/dist/src/extensions/domain/BaseModel.d.ts +6 -0
  37. package/dist/src/extensions/domain/index.d.ts +2 -0
  38. package/dist/src/extensions/index.d.ts +3 -0
  39. package/dist/src/extensions/ui/field-element.d.ts +9 -0
  40. package/dist/src/extensions/ui/index.d.ts +1 -0
  41. package/dist/src/index.d.ts +1 -0
  42. package/dist/src/mlform/index.d.ts +1 -0
  43. package/dist/src/mlform/mlform.d.ts +27 -0
  44. package/dist/src/mlform/mlform.types.d.ts +11 -0
  45. package/dist/src/strategies/app/BooleanStrategy.d.ts +12 -0
  46. package/dist/src/strategies/app/CategoryStrategy.d.ts +13 -0
  47. package/dist/src/strategies/app/ClassifierStrategy.d.ts +15 -0
  48. package/dist/src/strategies/app/DateStrategy.d.ts +15 -0
  49. package/dist/src/strategies/app/NumberStrategy.d.ts +29 -0
  50. package/dist/src/strategies/app/RegressorStrategy.d.ts +15 -0
  51. package/dist/src/strategies/app/TextStrategy.d.ts +16 -0
  52. package/dist/src/strategies/app/index.d.ts +7 -0
  53. package/dist/src/strategies/domain/BooleanField.d.ts +10 -0
  54. package/dist/src/strategies/domain/CategoryField.d.ts +11 -0
  55. package/dist/src/strategies/domain/ClassifierModel.d.ts +11 -0
  56. package/dist/src/strategies/domain/DateField.d.ts +13 -0
  57. package/dist/src/strategies/domain/FieldTypes.d.ts +7 -0
  58. package/dist/src/strategies/domain/ModelTypes.d.ts +4 -0
  59. package/dist/src/strategies/domain/NumberField.d.ts +15 -0
  60. package/dist/src/strategies/domain/RegressorModel.d.ts +11 -0
  61. package/dist/src/strategies/domain/TextField.d.ts +14 -0
  62. package/dist/src/strategies/domain/index.d.ts +9 -0
  63. package/dist/src/strategies/index.d.ts +1 -0
  64. package/dist/src/strategies/ui/boolean-field.d.ts +13 -0
  65. package/dist/src/strategies/ui/category-field.d.ts +14 -0
  66. package/dist/src/strategies/ui/classifier-prediction.d.ts +39 -0
  67. package/dist/src/strategies/ui/date-field.d.ts +18 -0
  68. package/dist/src/strategies/ui/index.d.ts +8 -0
  69. package/dist/src/strategies/ui/number-field.d.ts +19 -0
  70. package/dist/src/strategies/ui/range-field.d.ts +17 -0
  71. package/dist/src/strategies/ui/regressor-prediction.d.ts +29 -0
  72. package/dist/src/strategies/ui/text-field.d.ts +17 -0
  73. package/dist/state-CLlTRyl1.js +12 -0
  74. package/dist/test/_fixtures/DummyField.d.ts +9 -0
  75. package/dist/test/setup.d.ts +1 -0
  76. package/dist/test/unit/DummyField.test.d.ts +1 -0
  77. package/dist/text-field-DwP-Fa1w.js +114 -0
  78. package/package.json +57 -0
@@ -0,0 +1,7 @@
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';
@@ -0,0 +1,10 @@
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>;
@@ -0,0 +1,11 @@
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>;
@@ -0,0 +1,11 @@
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>;
@@ -0,0 +1,13 @@
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>;
@@ -0,0 +1,7 @@
1
+ export declare enum FieldTypes {
2
+ TEXT = "text",
3
+ NUMBER = "number",
4
+ BOOLEAN = "boolean",
5
+ CATEGORY = "category",
6
+ DATE = "date"
7
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum ModelTypes {
2
+ REGRESSOR = "regressor",
3
+ CLASSIFIER = "classifier"
4
+ }
@@ -0,0 +1,15 @@
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>;
@@ -0,0 +1,11 @@
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>;
@@ -0,0 +1,14 @@
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>;
@@ -0,0 +1,9 @@
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';
@@ -0,0 +1 @@
1
+ export { BooleanStrategy, CategoryStrategy, ClassifierStrategy, DateStrategy, NumberStrategy, RegressorStrategy, TextStrategy, } from './app';
@@ -0,0 +1,13 @@
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
+ }
@@ -0,0 +1,14 @@
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
+ }
@@ -0,0 +1,39 @@
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 {};
@@ -0,0 +1,18 @@
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
+ }
@@ -0,0 +1,8 @@
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';
@@ -0,0 +1,19 @@
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
+ }
@@ -0,0 +1,17 @@
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
+ }
@@ -0,0 +1,29 @@
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
+ }
@@ -0,0 +1,17 @@
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
+ }
@@ -0,0 +1,12 @@
1
+ import { n as r } from "./property-jKFNMQpR.js";
2
+ /**
3
+ * @license
4
+ * Copyright 2017 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ function n(t) {
8
+ return r({ ...t, state: !0, attribute: !1 });
9
+ }
10
+ export {
11
+ n as r
12
+ };
@@ -0,0 +1,9 @@
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
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,114 @@
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
+ };
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "mlform",
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "author": "UlloaSP <ulloasantinpablo2@gmail.com>",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/UlloaSP/mlform"
9
+ },
10
+ "private": false,
11
+ "type": "module",
12
+ "files": ["dist/**"],
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/types/index.d.ts",
16
+ "import": "./dist/mlform.mjs"
17
+ },
18
+ "./extensions": {
19
+ "types": "./dist/types/extensions/index.d.ts",
20
+ "import": "./dist/mlform/extensions.mjs"
21
+ },
22
+ "./strategies": {
23
+ "types": "./dist/types/strategies/index.d.ts",
24
+ "import": "./dist/mlform/strategies.mjs"
25
+ }
26
+ },
27
+ "engines": {
28
+ "node": ">=22.14.0"
29
+ },
30
+ "packageManager": "npm@11.5.1",
31
+ "scripts": {
32
+ "lint": "npx @biomejs/biome check --write",
33
+ "type": "tsc -p tsconfig.json --noEmit",
34
+ "build": "vite build",
35
+ "test": "vitest run",
36
+ "test:watch": "vitest",
37
+ "coverage": "vitest run --coverage",
38
+ "link": "npm run build && npm link",
39
+ "ci": "npm run lint && npm run type && npm run test && npm run build"
40
+ },
41
+ "dependencies": {
42
+ "lit": "3.3.1",
43
+ "zod": "4.0.10"
44
+ },
45
+ "devDependencies": {
46
+ "@biomejs/biome": "2.1.2",
47
+ "@types/node": "^24.1.0",
48
+ "globals": "^16.3.0",
49
+ "jsdom": "^26.1.0",
50
+ "rollup-plugin-visualizer": "^6.0.3",
51
+ "typescript": "~5.8.3",
52
+ "vite": "^7.0.6",
53
+ "vitest": "^3.2.4",
54
+ "vite-plugin-dts": "^4.5.4",
55
+ "@vitest/coverage-v8": "^3.2.4"
56
+ }
57
+ }