diff --git a/.changeset/large-jokes-train.md b/.changeset/large-jokes-train.md new file mode 100644 index 000000000..84573842d --- /dev/null +++ b/.changeset/large-jokes-train.md @@ -0,0 +1,5 @@ +--- +'@lion/form-core': patch +--- + +Add index.d.ts file so that its types can be used across lion. Add package root index.js to TSC build config exclude filter to prevent TSC from erroring on already existing type definition files. diff --git a/packages/form-core/index.d.ts b/packages/form-core/index.d.ts new file mode 100644 index 000000000..fc1db61f0 --- /dev/null +++ b/packages/form-core/index.d.ts @@ -0,0 +1,52 @@ +export { FocusMixin } from './src/FocusMixin.js'; +export { FormatMixin } from './src/FormatMixin.js'; +export { FormControlMixin } from './src/FormControlMixin.js'; +export { InteractionStateMixin } from './src/InteractionStateMixin.js'; // applies FocusMixin +export { LionField } from './src/LionField.js'; +export { FormRegisteringMixin } from './src/registration/FormRegisteringMixin.js'; +export { FormRegistrarMixin } from './src/registration/FormRegistrarMixin.js'; +export { FormRegistrarPortalMixin } from './src/registration/FormRegistrarPortalMixin.js'; +export { FormControlsCollection } from './src/registration/FormControlsCollection.js'; + +// validate + +export { ValidateMixin } from './src/validate/ValidateMixin.js'; +export { Unparseable } from './src/validate/Unparseable.js'; +export { Validator } from './src/validate/Validator.js'; +export { ResultValidator } from './src/validate/ResultValidator.js'; + +export { Required } from './src/validate/validators/Required.js'; + +export { + IsString, + EqualsLength, + MinLength, + MaxLength, + MinMaxLength, + IsEmail, + Pattern, +} from './src/validate/validators/StringValidators.js'; + +export { + IsNumber, + MinNumber, + MaxNumber, + MinMaxNumber, +} from './src/validate/validators/NumberValidators.js'; + +export { + IsDate, + MinDate, + MaxDate, + MinMaxDate, + IsDateDisabled, +} from './src/validate/validators/DateValidators.js'; + +export { DefaultSuccess } from './src/validate/resultValidators/DefaultSuccess.js'; + +export { LionValidationFeedback } from './src/validate/LionValidationFeedback.js'; + +export { ChoiceGroupMixin } from './src/choice-group/ChoiceGroupMixin.js'; +export { ChoiceInputMixin } from './src/choice-group/ChoiceInputMixin.js'; + +export { FormGroupMixin } from './src/form-group/FormGroupMixin.js'; diff --git a/tsconfig.build.types.json b/tsconfig.build.types.json index 9f141ac1b..e1b9a41da 100644 --- a/tsconfig.build.types.json +++ b/tsconfig.build.types.json @@ -5,5 +5,5 @@ "emitDeclarationOnly": true, "noEmit": false }, - "exclude": ["packages/*/index.d.ts"] + "exclude": ["packages/*/index.js"] }