@vulcantech/forms 0.1.1 → 0.3.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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as Yup from 'yup';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as react from 'react';
3
3
  import { CSSProperties, DragEvent } from 'react';
4
4
 
5
5
  type FieldType = "text" | "email" | "phone" | "url" | "address" | "textarea" | "select" | "checkbox" | "radio" | "number" | "date" | "datetime" | "hidden" | "sensitive" | "file";
@@ -74,9 +74,17 @@ interface SensitiveFieldConfig {
74
74
  }
75
75
  declare const DEFAULT_SENSITIVE_FIELD_CONFIG: SensitiveFieldConfig;
76
76
  /**
77
- * Configuration for the `file` field type. Files are uploaded to
78
- * Firebase Storage client-side; the form submission receives the
79
- * download URL(s) rather than raw file data.
77
+ * Configuration for the `file` field type. Files are uploaded by the
78
+ * consuming app before submit; the form submission receives the resulting
79
+ * URL(s) rather than raw file data — a string, or an array of strings when
80
+ * `multiple`. The CMS stores whatever string arrives and does nothing
81
+ * file-specific with it.
82
+ *
83
+ * Uploads are NOT automatic: a form containing a `file` field must be given
84
+ * an upload path via `DynamicForm`'s `onFileUpload` or `fileUploadRoute`
85
+ * prop (see {@link FormFileUploadHandler}). Without one the picker renders
86
+ * disabled with an explanatory message rather than silently submitting a
87
+ * throwaway `blob:` URL.
80
88
  */
81
89
  interface FileFieldConfig {
82
90
  /** Accepted MIME types. Default: "image/*" */
@@ -88,14 +96,48 @@ interface FileFieldConfig {
88
96
  /** Max number of files when multiple=true. Default: 5. */
89
97
  maxFiles?: number;
90
98
  /**
91
- * Resize images before upload. Default: true.
92
- * When true, images are scaled to maxImageWidth and compressed.
99
+ * Downscale images in the browser before handing them to the upload
100
+ * handler. Default: true.
101
+ *
102
+ * Applies only to JPEG, PNG and WebP, and only when the image is wider
103
+ * than {@link FileFieldConfig.maxImageWidth}; the format is preserved and
104
+ * anything that can't be re-encoded (GIF — a canvas round-trip would drop
105
+ * the animation, HEIC/HEIF, SVG, a file this browser can't decode) is
106
+ * uploaded untouched. `maxSizeBytes` is checked against the resized file,
107
+ * so a large photo that fits once downscaled is accepted.
93
108
  */
94
109
  resizeImages?: boolean;
95
- /** Max image width for resize. Default: 1600. */
110
+ /** Max image width in pixels when `resizeImages`. Default: 1600. */
96
111
  maxImageWidth?: number;
97
112
  }
98
113
  declare const DEFAULT_FILE_FIELD_CONFIG: FileFieldConfig;
114
+ /**
115
+ * A file that has finished uploading. `url` is the value the form submits
116
+ * for the field (or one entry of the array, when `multiple`), so it must be
117
+ * durable and reachable outside the submitting browser tab — never a
118
+ * `blob:` or `data:` URL.
119
+ */
120
+ interface UploadedFormFile {
121
+ /** Stored, publicly reachable URL. */
122
+ url: string;
123
+ /** Display name, shown in the field's file list. */
124
+ name: string;
125
+ /** Size in bytes, shown in the field's file list. */
126
+ size: number;
127
+ }
128
+ /**
129
+ * Uploads one picked file and resolves with its stored location.
130
+ *
131
+ * Supplied by the consuming app — this package deliberately ships no
132
+ * default implementation, because a public form submitter holds no CMS
133
+ * credentials. The usual shape mirrors `DynamicForm`'s `apiRoute`: POST the
134
+ * file to a server-side route in your own app, which holds the credentials
135
+ * and writes to storage, then return the stored URL.
136
+ *
137
+ * Called once per file, sequentially. Throw to fail the file — the message
138
+ * is shown inline under the picker and no value is recorded.
139
+ */
140
+ type FormFileUploadHandler = (file: File, config: FileFieldConfig) => Promise<UploadedFormFile>;
99
141
  interface FormFieldDefinition {
100
142
  id: string;
101
143
  type: FieldType;
@@ -260,11 +302,47 @@ type FormStatus = "draft" | "published" | "archived";
260
302
  * (optional, for preferences/consent) fields. Duplicate emails within a
261
303
  * project update the existing record's preferences rather than creating
262
304
  * a new entry.
305
+ * - `booking`: writes to the project's `bookings` subcollection and surfaces
306
+ * in the Bookings dashboard. The submitted values are stored like an
307
+ * application (nested `data` map), plus a denormalized booking `date`
308
+ * (epoch ms) parsed from the form's designated date field — see
309
+ * {@link FormBookingConfig}.
263
310
  *
264
311
  * Only the routing changes — spam protection, sensitive field handling,
265
312
  * notification emails, and integrations behave identically.
266
313
  */
267
- type FormSubmissionType = "contact" | "application" | "newsletter";
314
+ type FormSubmissionType = "contact" | "application" | "newsletter" | "booking";
315
+ /**
316
+ * Booking settings for a form with `submissionType: "booking"`. The renderer
317
+ * is unaffected — booking forms submit exactly like any other form; the CMS
318
+ * submission route uses this config to pull the booking date(s) out of the
319
+ * submitted values.
320
+ *
321
+ * Date-only convention: a `date` field submits `"yyyy-MM-dd"`, which parses
322
+ * to UTC midnight, so a stored epoch that is an exact multiple of a day is
323
+ * treated as date-only and displayed in UTC. A `datetime` field submits a
324
+ * full ISO string and is stored as a real instant. An unparseable value is
325
+ * stored as an explicit `null` rather than a fabricated date.
326
+ */
327
+ interface FormBookingConfig {
328
+ /**
329
+ * Field id of the `date`/`datetime` field holding the booking date (the
330
+ * start date, when `endDateFieldId` is also set). When omitted, the
331
+ * submission route falls back to the form's first date/datetime field in
332
+ * render order, and then to a top-level `date` key on the submission.
333
+ */
334
+ dateFieldId?: string;
335
+ /**
336
+ * Optional second `date`/`datetime` field id for begin/end bookings.
337
+ * Bookings without an end date use `defaultDurationMinutes` instead.
338
+ */
339
+ endDateFieldId?: string;
340
+ /**
341
+ * Default duration (minutes) stamped onto each new booking. Individual
342
+ * bookings can be overridden afterwards in the Bookings dashboard.
343
+ */
344
+ defaultDurationMinutes?: number;
345
+ }
268
346
  /**
269
347
  * Field types allowed on a newsletter form. Enforced by the form builder UI
270
348
  * and (defensively) by the submission route. Keep in sync with
@@ -311,6 +389,16 @@ declare const APPLICATION_STATUS_KEYS: ApplicationStatusKey[];
311
389
  */
312
390
  type ApplicationStatusEmailTemplates = Partial<Record<ApplicationStatusKey, NotificationEmailTemplate>>;
313
391
  declare const DEFAULT_APPLICATION_STATUS_EMAIL_TEMPLATES: Record<ApplicationStatusKey, NotificationEmailTemplate>;
392
+ /**
393
+ * The CMS-authored schema for one form — the value `DynamicForm` renders and
394
+ * the CMS submission route consults to route and validate a submission.
395
+ *
396
+ * Consumer sites fetch this from `GET /api/forms` rather than building it.
397
+ * Four fields are stripped from every client-facing response by the CMS
398
+ * (`stripSensitiveFields`) and are therefore always `undefined` outside the
399
+ * CMS server: `projectId`, `integrations`, `notificationEmailTemplate`, and
400
+ * `applicationStatusEmails`.
401
+ */
314
402
  interface FormDefinition {
315
403
  id: string;
316
404
  /**
@@ -323,17 +411,37 @@ interface FormDefinition {
323
411
  */
324
412
  projectId?: string;
325
413
  name: string;
414
+ /** Unique within a project — the CMS rejects a colliding slug with a 409. */
326
415
  slug: string;
327
416
  description?: string;
417
+ /** Bumped on every CMS edit. Emitted by the renderer as `data-form-version`. */
328
418
  version: number;
419
+ /**
420
+ * FormStatus values: "draft" | "published" | "archived".
421
+ *
422
+ * Deliberately typed `string`, not the {@link FormStatus} union, because
423
+ * definitions cross a JSON boundary. Compare against the literals. The
424
+ * public GET route already filters to published forms unless the caller
425
+ * passes `includeDrafts=1`.
426
+ */
329
427
  status: string;
330
428
  /**
331
429
  * Routes submissions to the matching dashboard collection.
332
430
  * Defaults to `"contact"` when omitted. See {@link FormSubmissionType}.
431
+ *
432
+ * Read server-side from this definition, never from the request body — a
433
+ * submission whose `formId` does not resolve always routes to `contact`.
333
434
  */
334
435
  submissionType?: FormSubmissionType;
436
+ /**
437
+ * Booking settings. Only consulted when `submissionType === "booking"`.
438
+ * See {@link FormBookingConfig}.
439
+ */
440
+ bookingConfig?: FormBookingConfig;
441
+ /** Rendered in `order`, not array order — the renderer sorts before rendering. */
335
442
  sections: FormSection[];
336
443
  submitConfig: FormSubmitConfig;
444
+ /** Absent = {@link DEFAULT_FORM_STYLE} (structure only; colors stay unset). */
337
445
  style?: FormStyle;
338
446
  /**
339
447
  * Optional hex color applied as the default text color for every section
@@ -346,15 +454,19 @@ interface FormDefinition {
346
454
  trackAdReferral?: boolean;
347
455
  customFields?: Record<string, unknown>;
348
456
  };
457
+ /** Server-only — stripped from client-facing responses like `projectId`. */
349
458
  integrations?: FormIntegrations;
350
459
  /**
351
460
  * Customizable email sent to project members when a submission arrives.
352
461
  * Falls back to `DEFAULT_NOTIFICATION_EMAIL_TEMPLATE` when undefined.
462
+ *
463
+ * Server-only — stripped from client-facing responses like `projectId`.
353
464
  */
354
465
  notificationEmailTemplate?: NotificationEmailTemplate;
355
466
  /**
356
467
  * Per-status applicant-facing email templates. Only consulted when
357
- * `submissionType === "application"`. Missing entries fall back to
468
+ * `submissionType === "application"`. Server-only — stripped from
469
+ * client-facing responses like `projectId`. Missing entries fall back to
358
470
  * `DEFAULT_APPLICATION_STATUS_EMAIL_TEMPLATES[status]`. Set to an empty
359
471
  * object to opt every status into the defaults explicitly.
360
472
  */
@@ -419,6 +531,8 @@ interface FormFieldDefinitionJSON {
419
531
  datetimeConfig?: DatetimeConfig;
420
532
  showWhen?: FieldVisibilityCondition;
421
533
  sensitiveConfig?: SensitiveFieldConfigJSON;
534
+ /** No narrowed unions, so the strict type is reused. */
535
+ fileConfig?: FileFieldConfig;
422
536
  }
423
537
  interface FormSectionJSON {
424
538
  id: string;
@@ -476,6 +590,8 @@ interface FormDefinitionJSON {
476
590
  version: number;
477
591
  status: string;
478
592
  submissionType?: string;
593
+ /** See {@link FormDefinition.bookingConfig} — no narrowed unions, so the strict type is reused. */
594
+ bookingConfig?: FormBookingConfig;
479
595
  sections: FormSectionJSON[];
480
596
  submitConfig: FormSubmitConfigJSON;
481
597
  style?: FormStyleJSON;
@@ -643,6 +759,42 @@ declare function renderNotificationEmail(template: NotificationEmailTemplate, va
643
759
  html: string;
644
760
  };
645
761
 
762
+ /**
763
+ * Client-side image downscaling for `file` fields.
764
+ *
765
+ * A phone camera hands the picker a 4000px, several-megabyte photo for what
766
+ * is almost always displayed as a thumbnail on a lead. Downscaling in the
767
+ * browser — before the bytes leave it — is the only place that saves the
768
+ * submitter's upload time as well as our storage.
769
+ *
770
+ * The rule this module follows everywhere: **never lose a file to an
771
+ * optimisation.** Every failure path (an undecodable file, a browser without
772
+ * the APIs, an encoder that returns nothing, a re-encode that came out
773
+ * bigger) returns the original `File` unchanged, so the worst case is the
774
+ * behaviour we had before resizing existed.
775
+ */
776
+ /**
777
+ * Scale an image file down so it is at most `maxWidth` pixels wide,
778
+ * re-encoding it in its original format.
779
+ *
780
+ * Only images narrower-or-equal to the limit, unsupported formats, and files
781
+ * this environment cannot decode are left alone — everything else comes back
782
+ * as a new `File` carrying the same name, type and `lastModified`, so the
783
+ * upload handler and the CMS's magic-byte check see an ordinary picked file.
784
+ *
785
+ * EXIF orientation is baked into the pixels (`imageOrientation: "from-image"`),
786
+ * which is what a browser would have rendered anyway; the resized copy carries
787
+ * no EXIF of its own, so a rotated photo stays upright without the metadata
788
+ * that made it so.
789
+ *
790
+ * @param file - The picked file.
791
+ * @param maxWidth - Maximum width in pixels. Non-positive or non-finite
792
+ * values disable resizing.
793
+ * @returns The downscaled file, or the original when resizing was skipped or
794
+ * failed. Never rejects.
795
+ */
796
+ declare function resizeImageFile(file: File, maxWidth: number): Promise<File>;
797
+
646
798
  /**
647
799
  * Client-side encryption utilities for sensitive form fields.
648
800
  *
@@ -698,17 +850,81 @@ declare function encryptSensitiveValue(plaintext: string, publicKey: TransportPu
698
850
  declare function deriveLast4(plaintext: string): string;
699
851
 
700
852
  interface DynamicFormProps {
853
+ /**
854
+ * The CMS-authored schema, normally fetched from `GET /api/forms`. Note
855
+ * that `projectId`, `integrations`, `notificationEmailTemplate` and
856
+ * `applicationStatusEmails` are stripped from client-facing responses, so
857
+ * they are always undefined here — never read `definition.projectId`.
858
+ */
701
859
  definition: FormDefinition;
860
+ /**
861
+ * Endpoint this form POSTs to — expected to be a server-side proxy in the
862
+ * consuming app that adds credentials and forwards to the CMS
863
+ * `POST /api/contact`.
864
+ *
865
+ * The body is a FLAT JSON object: the definition's field ids as top-level
866
+ * keys, plus `extraData`, plus `formId`. There is no `data`/`values`
867
+ * wrapper. The honeypot, fields hidden by an unmet `showWhen`, and the
868
+ * synthetic `_sameAs_*` toggles are stripped before sending. The renderer
869
+ * never sends `projectId` / `apiKey` / `url` — the proxy must add those,
870
+ * and must forward the browser's body WHOLE (hand-picking fields into a
871
+ * new object drops values the CMS then rejects as required).
872
+ *
873
+ * Two CMS rejections to expect: `url` must exactly equal the project's
874
+ * stored URL (so localhost dev submissions get `400 "Invalid url"`), and
875
+ * a top-level `email` key is required on every submission type.
876
+ */
702
877
  apiRoute: string;
703
878
  /**
704
879
  * Called after a successful submission. The argument is the parsed JSON
705
880
  * response body, when one was returned — application submissions echo
706
881
  * `{ success: true, referenceNumber: "APP-…" }` here so the consumer
707
882
  * can display it on its confirmation page.
883
+ *
884
+ * Also fired on the spam path (honeypot filled or submitted faster than
885
+ * `minSubmitTime`) with NO argument and no network request at all — treat
886
+ * a missing argument as "no server response", not as an error.
708
887
  */
709
888
  onSuccess?: (data?: unknown) => void;
889
+ /**
890
+ * Called when the submission fails. `DynamicForm` catches everything
891
+ * internally and never throws at the call site, so this callback is the
892
+ * only error channel. The message is the CMS `error` string when one was
893
+ * returned (e.g. "Invalid url", "Validation failed"), otherwise
894
+ * `Submission failed (<status>)`.
895
+ */
710
896
  onError?: (error: Error) => void;
897
+ /** Extra top-level keys merged into the payload alongside the field values. */
711
898
  extraData?: Record<string, unknown>;
899
+ /**
900
+ * Upload path for `file` fields. Called once per picked file; resolve with
901
+ * the stored URL, which becomes the field's submitted value.
902
+ *
903
+ * There is no default — a public form submitter holds no CMS credentials,
904
+ * so the upload has to go through a route in the consuming app, exactly
905
+ * like {@link DynamicFormProps.apiRoute}. Use {@link DynamicFormProps.fileUploadRoute}
906
+ * for the standard multipart wiring, or this prop for full control.
907
+ *
908
+ * A definition containing a `file` field with neither prop set renders the
909
+ * picker disabled with an explanatory message — it will NOT fall back to a
910
+ * throwaway `blob:` URL, which used to look like a successful upload and
911
+ * arrive as an unopenable attachment on the lead.
912
+ */
913
+ onFileUpload?: FormFileUploadHandler;
914
+ /**
915
+ * Convenience alternative to {@link DynamicFormProps.onFileUpload}: an
916
+ * endpoint in the consuming app that accepts one file and returns its
917
+ * stored location.
918
+ *
919
+ * Request: `POST <fileUploadRoute>` with `multipart/form-data` carrying
920
+ * `file` (the File) and `formId` (the definition id).
921
+ * Response: `200` with JSON `{ url: string, name?: string, size?: number }`.
922
+ * `url` must be durable — a `blob:`/`data:` URL is rejected. On failure,
923
+ * answer non-2xx with `{ error }` and the message is shown under the field.
924
+ *
925
+ * Ignored when `onFileUpload` is set.
926
+ */
927
+ fileUploadRoute?: string;
712
928
  className?: string;
713
929
  /**
714
930
  * Endpoint that returns the RSA-OAEP transport public key used to wrap the
@@ -716,6 +932,10 @@ interface DynamicFormProps {
716
932
  * `/api/forms/transport-key` (resolved against the same origin).
717
933
  *
718
934
  * The endpoint must respond with `{ kid: string, jwk: JsonWebKey }`.
935
+ *
936
+ * That route lives in the CMS, not in consumer apps — a consumer site with
937
+ * a sensitive field must either proxy it or pass an absolute CMS URL here.
938
+ * Only fetched when the definition actually contains a sensitive field.
719
939
  */
720
940
  transportKeyEndpoint?: string;
721
941
  /**
@@ -754,7 +974,21 @@ interface DynamicFormProps {
754
974
  */
755
975
  previewTextColor?: string;
756
976
  }
757
- declare const DynamicForm: ({ definition, apiRoute, onSuccess, onError, extraData, className, onFormView, onFormSubmit: onFormSubmitCallback, transportKeyEndpoint, previewState, previewTouchAllSignal, previewUntouchAllSignal, previewBg, previewTextColor, }: DynamicFormProps) => react_jsx_runtime.JSX.Element;
977
+ /**
978
+ * Render a CMS-authored {@link FormDefinition} as a working form.
979
+ *
980
+ * Sections and fields render in `order` (not array order); validation comes
981
+ * from `buildYupSchema(definition)`; sensitive fields are encrypted in the
982
+ * browser before submission. Submission goes to {@link DynamicFormProps.apiRoute}
983
+ * as a flat JSON payload — see that prop for the wire contract.
984
+ *
985
+ * Failure mode: this component never throws. Network and CMS errors are
986
+ * caught, shown in the built-in error banner, and reported via `onError`.
987
+ * Note that a suppressed duplicate (an identical resubmit within 10 minutes)
988
+ * and a server-side spam catch both answer `200` and are indistinguishable
989
+ * from a stored lead by design.
990
+ */
991
+ declare const DynamicForm: ({ definition, apiRoute, onSuccess, onError, extraData, onFileUpload, fileUploadRoute, className, onFormView, onFormSubmit: onFormSubmitCallback, transportKeyEndpoint, previewState, previewTouchAllSignal, previewUntouchAllSignal, previewBg, previewTextColor, }: DynamicFormProps) => react.JSX.Element;
758
992
 
759
993
  /**
760
994
  * Single source of truth for the CSS custom properties the renderer publishes
@@ -826,6 +1060,47 @@ declare const FORM_VAR: {
826
1060
  */
827
1061
  declare function buildFormCssVars(style: FormStyle, previewBg?: string): CSSProperties;
828
1062
 
1063
+ /**
1064
+ * The upload path `DynamicForm` publishes to the `file` fields beneath it.
1065
+ *
1066
+ * Threaded by context rather than by prop because `FileField` sits two
1067
+ * levels down (section → field) and no intermediate component has any other
1068
+ * reason to know about uploads.
1069
+ */
1070
+ interface FormFileUploadContextValue {
1071
+ /**
1072
+ * Uploads a picked file and returns its stored URL. Undefined means the
1073
+ * consuming app wired no upload path — file fields then render disabled
1074
+ * instead of submitting an unusable value.
1075
+ */
1076
+ upload?: FormFileUploadHandler;
1077
+ /**
1078
+ * Builder-preview escape hatch: allows `FileField` to stand in a local
1079
+ * `URL.createObjectURL` value when no `upload` is set. Only ever true in
1080
+ * the CMS form builder, where submissions are short-circuited and the
1081
+ * throwaway URL can't reach a lead.
1082
+ */
1083
+ allowObjectUrlFallback?: boolean;
1084
+ }
1085
+ declare const useFormFileUpload: () => FormFileUploadContextValue;
1086
+ declare const FormFileUploadProvider: react.Provider<FormFileUploadContextValue>;
1087
+
1088
+ interface Props$2 {
1089
+ field: FormFieldDefinition;
1090
+ /** Project ID for storage path. Passed from the form renderer. */
1091
+ projectId?: string;
1092
+ /**
1093
+ * Upload handler. Normally supplied through `DynamicForm`'s
1094
+ * `onFileUpload` / `fileUploadRoute` prop (delivered by context); pass it
1095
+ * here when rendering `FileField` outside a `DynamicForm`. This prop wins
1096
+ * over the context value.
1097
+ */
1098
+ onUpload?: FormFileUploadHandler;
1099
+ /** When true (mirrored/locked), the picker is read-only. */
1100
+ disabled?: boolean;
1101
+ }
1102
+ declare const FileField: ({ field: fieldDef, onUpload, disabled }: Props$2) => react.JSX.Element;
1103
+
829
1104
  interface Props$1 {
830
1105
  section: FormSection;
831
1106
  isLast?: boolean;
@@ -842,7 +1117,7 @@ interface Props$1 {
842
1117
  */
843
1118
  inlineSubmit?: React.ReactNode;
844
1119
  }
845
- declare const DynamicFormSection: ({ section, isLast, formDefaultTextColor, inlineSubmit, }: Props$1) => react_jsx_runtime.JSX.Element;
1120
+ declare const DynamicFormSection: ({ section, isLast, formDefaultTextColor, inlineSubmit, }: Props$1) => react.JSX.Element;
846
1121
 
847
1122
  interface Props {
848
1123
  field: FormFieldDefinition;
@@ -851,7 +1126,7 @@ interface Props {
851
1126
  /** How a mirrored target renders while the toggle is on. */
852
1127
  mirrorBehavior?: "hide" | "lock";
853
1128
  }
854
- declare const DynamicFormField: ({ field, mirrored, mirrorBehavior }: Props) => react_jsx_runtime.JSX.Element | null;
1129
+ declare const DynamicFormField: ({ field, mirrored, mirrorBehavior }: Props) => react.JSX.Element | null;
855
1130
 
856
1131
  interface BaseFetchOptions {
857
1132
  cmsUrl: string;
@@ -974,4 +1249,4 @@ interface UseDragReorderResult extends DragReorderState {
974
1249
  */
975
1250
  declare function useDragReorder<T>({ items, getId, onReorder, dragType, }: UseDragReorderOptions<T>): UseDragReorderResult;
976
1251
 
977
- export { APPLICATION_STATUS_KEYS, type ApplicationStatusEmailTemplates, type ApplicationStatusKey, CORE_EMAIL_TEMPLATE_VARIABLES, DEFAULT_APPLICATION_STATUS_EMAIL_TEMPLATES, DEFAULT_FILE_FIELD_CONFIG, DEFAULT_FORM_STYLE, DEFAULT_NOTIFICATION_EMAIL_HTML, DEFAULT_NOTIFICATION_EMAIL_SUBJECT, DEFAULT_NOTIFICATION_EMAIL_TEMPLATE, DEFAULT_SENSITIVE_FIELD_CONFIG, DEFAULT_SPAM_PROTECTION, type DatetimeConfig, type DragReorderItemHandlers, type DragReorderState, type DropPosition, DynamicForm, DynamicFormField, DynamicFormSection, type EmailTemplateVariableDescriptor, type EmailTemplateVariables, type EncryptedSensitiveValue, FORM_CSS_VAR, FORM_DEFAULT_COLOR, FORM_VAR, type FieldOption, type FieldTransform, type FieldType, type FieldVisibilityCondition, type FieldWidth, type FileFieldConfig, type FormDefinition, type FormDefinitionJSON, type FormFieldDefinition, type FormFieldDefinitionJSON, type FormIdentifier, type FormIntegrationConfig, type FormIntegrationConfigJSON, type FormIntegrations, type FormIntegrationsJSON, type FormSection, type FormSectionJSON, type FormSpamProtectionConfig, type FormStatus, type FormStyle, type FormStyleJSON, type FormStylePreset, type FormSubmissionType, type FormSubmitConfig, type FormSubmitConfigJSON, type FormSuccessBehavior, HONEYPOT_FIELD_NAME, type InputVariant, type IntegrationFieldMappingEntry, type IntegrationFieldMappingEntryJSON, NEWSLETTER_ALLOWED_FIELD_TYPES, type NotificationEmailTemplate, SAME_AS_TOGGLE_PREFIX, SAMPLE_EMAIL_TEMPLATE_VARIABLES, type SectionSameAsConfig, type SensitiveFieldConfig, type SensitiveFieldConfigJSON, type SetStateUpdater, type TextTransform, type TransportPublicKey, type UseDragReorderOptions, type UseDragReorderResult, type UseFormDefinitionOptions, type UseUndoRedoControls, type UseUndoRedoOptions, type UseUndoRedoReturn, type ValidationRule, type ValidationRuleJSON, type VisibilityOperator, applyTextTransform, applyTransform, base64ToBuffer, bufferToBase64, buildEmailTemplateVariables, buildFormCssVars, buildInitialValues, buildYupSchema, deriveLast4, encryptSensitiveValue, formatSsn, formatUsPhone, getFormDefinition, getSafeRedirectUrl, isVisibilityConditionMet, parseFormDefinition, renderEmailTemplate, renderNotificationEmail, sameAsToggleKey, useDragReorder, useFormDefinition, useUndoRedo, useUndoRedoShortcuts };
1252
+ export { APPLICATION_STATUS_KEYS, type ApplicationStatusEmailTemplates, type ApplicationStatusKey, CORE_EMAIL_TEMPLATE_VARIABLES, DEFAULT_APPLICATION_STATUS_EMAIL_TEMPLATES, DEFAULT_FILE_FIELD_CONFIG, DEFAULT_FORM_STYLE, DEFAULT_NOTIFICATION_EMAIL_HTML, DEFAULT_NOTIFICATION_EMAIL_SUBJECT, DEFAULT_NOTIFICATION_EMAIL_TEMPLATE, DEFAULT_SENSITIVE_FIELD_CONFIG, DEFAULT_SPAM_PROTECTION, type DatetimeConfig, type DragReorderItemHandlers, type DragReorderState, type DropPosition, DynamicForm, DynamicFormField, DynamicFormSection, type EmailTemplateVariableDescriptor, type EmailTemplateVariables, type EncryptedSensitiveValue, FORM_CSS_VAR, FORM_DEFAULT_COLOR, FORM_VAR, type FieldOption, type FieldTransform, type FieldType, type FieldVisibilityCondition, type FieldWidth, FileField, type FileFieldConfig, type FormBookingConfig, type FormDefinition, type FormDefinitionJSON, type FormFieldDefinition, type FormFieldDefinitionJSON, type FormFileUploadContextValue, type FormFileUploadHandler, FormFileUploadProvider, type FormIdentifier, type FormIntegrationConfig, type FormIntegrationConfigJSON, type FormIntegrations, type FormIntegrationsJSON, type FormSection, type FormSectionJSON, type FormSpamProtectionConfig, type FormStatus, type FormStyle, type FormStyleJSON, type FormStylePreset, type FormSubmissionType, type FormSubmitConfig, type FormSubmitConfigJSON, type FormSuccessBehavior, HONEYPOT_FIELD_NAME, type InputVariant, type IntegrationFieldMappingEntry, type IntegrationFieldMappingEntryJSON, NEWSLETTER_ALLOWED_FIELD_TYPES, type NotificationEmailTemplate, SAME_AS_TOGGLE_PREFIX, SAMPLE_EMAIL_TEMPLATE_VARIABLES, type SectionSameAsConfig, type SensitiveFieldConfig, type SensitiveFieldConfigJSON, type SetStateUpdater, type TextTransform, type TransportPublicKey, type UploadedFormFile, type UseDragReorderOptions, type UseDragReorderResult, type UseFormDefinitionOptions, type UseUndoRedoControls, type UseUndoRedoOptions, type UseUndoRedoReturn, type ValidationRule, type ValidationRuleJSON, type VisibilityOperator, applyTextTransform, applyTransform, base64ToBuffer, bufferToBase64, buildEmailTemplateVariables, buildFormCssVars, buildInitialValues, buildYupSchema, deriveLast4, encryptSensitiveValue, formatSsn, formatUsPhone, getFormDefinition, getSafeRedirectUrl, isVisibilityConditionMet, parseFormDefinition, renderEmailTemplate, renderNotificationEmail, resizeImageFile, sameAsToggleKey, useDragReorder, useFormDefinition, useFormFileUpload, useUndoRedo, useUndoRedoShortcuts };