feat: add Svelte actions and global stores for enhanced functionality

This commit is contained in:
2026-02-25 13:10:52 +00:00
parent dc00d24899
commit f6f565bbcb
7 changed files with 262 additions and 6 deletions
+12
View File
@@ -0,0 +1,12 @@
export const FORM_CONTEXT = Symbol("FORM_CONTEXT")
export interface ValidatableField {
validate: () => Promise<boolean> | boolean
reset: () => void
focus?: () => void
}
export interface FormContext {
register: (field: ValidatableField) => void
unregister: (field: ValidatableField) => void
}