Reorganize repo structure and standards references

This commit is contained in:
david committed 2026-06-29 05:03:42 +02:00
1 parent 3cb93a81be
commit be2054274d
5885 files changed
+2588 -195

No files matched your search

@@ -0,0 +1,37 @@
/**
* @toolctrl/form-widget — shared types & helpers for the embeddable form
* widget (Task #58). Contains zero runtime dependencies on the rest of the
* codebase so it can be imported from the web app, the api, the worker and
* the cli without dragging in Prisma or React.
*
* Sub-modules:
* - schema — Zod definitions for form/field/theme/submission JSON
* - origin — allowed-origin matcher with wildcard support
* - honeypot — honeypot-field detection helper
* - routing — submission target resolver (entity / crm / generic) +
* field-mapping helper consumed by the worker
*/
export {
FormDefinitionSchema,
FormFieldSchema,
FormThemeSchema,
FormSubmissionPayloadSchema,
FieldTypeSchema,
HONEYPOT_FIELD_KEY,
type FormDefinition,
type FormField,
type FormFieldType,
type FormTheme,
type FormSubmissionPayload,
} from "./schema.js";
export { matchAllowedOrigin, normalizeOrigin } from "./origin.js";
export { isHoneypotTriggered } from "./honeypot.js";
export {
resolveSubmissionTarget,
applyFieldMapping,
type SubmissionTargetType,
type SubmissionTargetDescriptor,
type ApplyFieldMappingInput,
} from "./routing.js";