@signiphi/pdf-signer 0.2.0-beta.21 → 0.2.0-beta.22

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 (179) hide show
  1. package/dist/__tests__/helpers/fixtures.d.ts +43 -0
  2. package/dist/__tests__/helpers/fixtures.d.ts.map +1 -0
  3. package/dist/__tests__/helpers/mocks.d.ts +411 -0
  4. package/dist/__tests__/helpers/mocks.d.ts.map +1 -0
  5. package/dist/__tests__/setup.d.ts +6 -0
  6. package/dist/__tests__/setup.d.ts.map +1 -0
  7. package/dist/components/AcknowledgementModal.d.ts +21 -0
  8. package/dist/components/AcknowledgementModal.d.ts.map +1 -0
  9. package/dist/components/AcknowledgementsSidebar.d.ts +22 -0
  10. package/dist/components/AcknowledgementsSidebar.d.ts.map +1 -0
  11. package/dist/components/AttachmentUpload.d.ts +20 -0
  12. package/dist/components/AttachmentUpload.d.ts.map +1 -0
  13. package/dist/components/DateFieldCalendarPopup.d.ts +28 -0
  14. package/dist/components/DateFieldCalendarPopup.d.ts.map +1 -0
  15. package/dist/components/EditableFieldsPanel.d.ts +30 -0
  16. package/dist/components/EditableFieldsPanel.d.ts.map +1 -0
  17. package/dist/components/ErrorBoundary.d.ts +67 -0
  18. package/dist/components/ErrorBoundary.d.ts.map +1 -0
  19. package/dist/components/FormFieldsView.d.ts +46 -0
  20. package/dist/components/FormFieldsView.d.ts.map +1 -0
  21. package/dist/components/InitialsModal.d.ts +16 -0
  22. package/dist/components/InitialsModal.d.ts.map +1 -0
  23. package/dist/components/PdfViewerStyled.d.ts +16 -0
  24. package/dist/components/PdfViewerStyled.d.ts.map +1 -0
  25. package/dist/components/PoweredBySigniphi.d.ts +11 -0
  26. package/dist/components/PoweredBySigniphi.d.ts.map +1 -0
  27. package/dist/components/RequiredFieldNavigation.d.ts +18 -0
  28. package/dist/components/RequiredFieldNavigation.d.ts.map +1 -0
  29. package/dist/components/SignatureCanvas.d.ts +12 -0
  30. package/dist/components/SignatureCanvas.d.ts.map +1 -0
  31. package/dist/components/SignatureInitialsBox.d.ts +25 -0
  32. package/dist/components/SignatureInitialsBox.d.ts.map +1 -0
  33. package/dist/components/SignatureModal.d.ts +21 -0
  34. package/dist/components/SignatureModal.d.ts.map +1 -0
  35. package/dist/components/SignatureTypeInput.d.ts +27 -0
  36. package/dist/components/SignatureTypeInput.d.ts.map +1 -0
  37. package/dist/components/SigningInstructions.d.ts +12 -0
  38. package/dist/components/SigningInstructions.d.ts.map +1 -0
  39. package/dist/components/SubmissionForm.d.ts +52 -0
  40. package/dist/components/SubmissionForm.d.ts.map +1 -0
  41. package/dist/components/UnacknowledgedFieldsModal.d.ts +25 -0
  42. package/dist/components/UnacknowledgedFieldsModal.d.ts.map +1 -0
  43. package/dist/components/ViewToggleToolbar.d.ts +38 -0
  44. package/dist/components/ViewToggleToolbar.d.ts.map +1 -0
  45. package/dist/components/form-fields/CheckboxRenderer.d.ts +10 -0
  46. package/dist/components/form-fields/CheckboxRenderer.d.ts.map +1 -0
  47. package/dist/components/form-fields/DateFieldRenderer.d.ts +14 -0
  48. package/dist/components/form-fields/DateFieldRenderer.d.ts.map +1 -0
  49. package/dist/components/form-fields/DropdownRenderer.d.ts +14 -0
  50. package/dist/components/form-fields/DropdownRenderer.d.ts.map +1 -0
  51. package/dist/components/form-fields/FormFieldRenderer.d.ts +22 -0
  52. package/dist/components/form-fields/FormFieldRenderer.d.ts.map +1 -0
  53. package/dist/components/form-fields/InitialsFieldRenderer.d.ts +16 -0
  54. package/dist/components/form-fields/InitialsFieldRenderer.d.ts.map +1 -0
  55. package/dist/components/form-fields/RadioGroupRenderer.d.ts +10 -0
  56. package/dist/components/form-fields/RadioGroupRenderer.d.ts.map +1 -0
  57. package/dist/components/form-fields/SignatureFieldRenderer.d.ts +16 -0
  58. package/dist/components/form-fields/SignatureFieldRenderer.d.ts.map +1 -0
  59. package/dist/components/form-fields/TextFieldRenderer.d.ts +14 -0
  60. package/dist/components/form-fields/TextFieldRenderer.d.ts.map +1 -0
  61. package/dist/components/form-fields/TextLabelRenderer.d.ts +14 -0
  62. package/dist/components/form-fields/TextLabelRenderer.d.ts.map +1 -0
  63. package/dist/components/form-fields/index.d.ts +14 -0
  64. package/dist/components/form-fields/index.d.ts.map +1 -0
  65. package/dist/components/index.d.ts +18 -0
  66. package/dist/components/index.d.ts.map +1 -0
  67. package/dist/core/PdfViewerCore.d.ts +19 -0
  68. package/dist/core/PdfViewerCore.d.ts.map +1 -0
  69. package/dist/core/SignatureCaptureCore.d.ts +37 -0
  70. package/dist/core/SignatureCaptureCore.d.ts.map +1 -0
  71. package/dist/core/index.d.ts +3 -0
  72. package/dist/core/index.d.ts.map +1 -0
  73. package/dist/hooks/index.d.ts +9 -0
  74. package/dist/hooks/index.d.ts.map +1 -0
  75. package/dist/hooks/useAcknowledgements.d.ts +50 -0
  76. package/dist/hooks/useAcknowledgements.d.ts.map +1 -0
  77. package/dist/hooks/useAttachments.d.ts +26 -0
  78. package/dist/hooks/useAttachments.d.ts.map +1 -0
  79. package/dist/hooks/useFieldFiltering.d.ts +29 -0
  80. package/dist/hooks/useFieldFiltering.d.ts.map +1 -0
  81. package/dist/hooks/useFormFields.d.ts +23 -0
  82. package/dist/hooks/useFormFields.d.ts.map +1 -0
  83. package/dist/hooks/useMultiSignerContext.d.ts +25 -0
  84. package/dist/hooks/useMultiSignerContext.d.ts.map +1 -0
  85. package/dist/hooks/usePdfViewer.d.ts +52 -0
  86. package/dist/hooks/usePdfViewer.d.ts.map +1 -0
  87. package/dist/hooks/useRequiredFieldNavigation.d.ts +16 -0
  88. package/dist/hooks/useRequiredFieldNavigation.d.ts.map +1 -0
  89. package/dist/hooks/useSignatureCapture.d.ts +17 -0
  90. package/dist/hooks/useSignatureCapture.d.ts.map +1 -0
  91. package/dist/hooks/useSignatures.d.ts +29 -0
  92. package/dist/hooks/useSignatures.d.ts.map +1 -0
  93. package/dist/index.d.ts +17 -0
  94. package/dist/index.d.ts.map +1 -0
  95. package/dist/integrations/index.d.ts +6 -0
  96. package/dist/integrations/index.d.ts.map +1 -0
  97. package/dist/integrations/next-config.d.ts +46 -0
  98. package/dist/integrations/next-config.d.ts.map +1 -0
  99. package/dist/integrations/vite-plugin.d.ts +48 -0
  100. package/dist/integrations/vite-plugin.d.ts.map +1 -0
  101. package/dist/lib/index.d.ts +3 -0
  102. package/dist/lib/index.d.ts.map +1 -0
  103. package/dist/lib/ui/accordion.d.ts +8 -0
  104. package/dist/lib/ui/accordion.d.ts.map +1 -0
  105. package/dist/lib/ui/alert.d.ts +9 -0
  106. package/dist/lib/ui/alert.d.ts.map +1 -0
  107. package/dist/lib/ui/button.d.ts +12 -0
  108. package/dist/lib/ui/button.d.ts.map +1 -0
  109. package/dist/lib/ui/calendar.d.ts +10 -0
  110. package/dist/lib/ui/calendar.d.ts.map +1 -0
  111. package/dist/lib/ui/card.d.ts +9 -0
  112. package/dist/lib/ui/card.d.ts.map +1 -0
  113. package/dist/lib/ui/checkbox.d.ts +5 -0
  114. package/dist/lib/ui/checkbox.d.ts.map +1 -0
  115. package/dist/lib/ui/dialog.d.ts +20 -0
  116. package/dist/lib/ui/dialog.d.ts.map +1 -0
  117. package/dist/lib/ui/index.d.ts +13 -0
  118. package/dist/lib/ui/index.d.ts.map +1 -0
  119. package/dist/lib/ui/input.d.ts +6 -0
  120. package/dist/lib/ui/input.d.ts.map +1 -0
  121. package/dist/lib/ui/label.d.ts +6 -0
  122. package/dist/lib/ui/label.d.ts.map +1 -0
  123. package/dist/lib/ui/popover.d.ts +7 -0
  124. package/dist/lib/ui/popover.d.ts.map +1 -0
  125. package/dist/lib/ui/radio-group.d.ts +6 -0
  126. package/dist/lib/ui/radio-group.d.ts.map +1 -0
  127. package/dist/lib/ui/select.d.ts +14 -0
  128. package/dist/lib/ui/select.d.ts.map +1 -0
  129. package/dist/lib/utils.d.ts +7 -0
  130. package/dist/lib/utils.d.ts.map +1 -0
  131. package/dist/types/index.d.ts +299 -0
  132. package/dist/types/index.d.ts.map +1 -0
  133. package/dist/utils/attachment-validators.d.ts +118 -0
  134. package/dist/utils/attachment-validators.d.ts.map +1 -0
  135. package/dist/utils/audit-trail.d.ts +27 -0
  136. package/dist/utils/audit-trail.d.ts.map +1 -0
  137. package/dist/utils/date-validation-iso.d.ts +11 -0
  138. package/dist/utils/date-validation-iso.d.ts.map +1 -0
  139. package/dist/utils/date-validation.d.ts +27 -0
  140. package/dist/utils/date-validation.d.ts.map +1 -0
  141. package/dist/utils/errors.d.ts +106 -0
  142. package/dist/utils/errors.d.ts.map +1 -0
  143. package/dist/utils/field-extraction.d.ts +59 -0
  144. package/dist/utils/field-extraction.d.ts.map +1 -0
  145. package/dist/utils/field-visibility.d.ts +108 -0
  146. package/dist/utils/field-visibility.d.ts.map +1 -0
  147. package/dist/utils/font-loader.d.ts +50 -0
  148. package/dist/utils/font-loader.d.ts.map +1 -0
  149. package/dist/utils/index.d.ts +20 -0
  150. package/dist/utils/index.d.ts.map +1 -0
  151. package/dist/utils/logger.d.ts +16 -0
  152. package/dist/utils/logger.d.ts.map +1 -0
  153. package/dist/utils/pdf-field-type-helpers.d.ts +87 -0
  154. package/dist/utils/pdf-field-type-helpers.d.ts.map +1 -0
  155. package/dist/utils/pdf-helpers.d.ts +38 -0
  156. package/dist/utils/pdf-helpers.d.ts.map +1 -0
  157. package/dist/utils/pdf-lib-loader.d.ts +45 -0
  158. package/dist/utils/pdf-lib-loader.d.ts.map +1 -0
  159. package/dist/utils/pdf-manipulation.d.ts +94 -0
  160. package/dist/utils/pdf-manipulation.d.ts.map +1 -0
  161. package/dist/utils/pdf-metadata.d.ts +44 -0
  162. package/dist/utils/pdf-metadata.d.ts.map +1 -0
  163. package/dist/utils/pdf-signer-utils.d.ts +35 -0
  164. package/dist/utils/pdf-signer-utils.d.ts.map +1 -0
  165. package/dist/utils/pdf-validators.d.ts +184 -0
  166. package/dist/utils/pdf-validators.d.ts.map +1 -0
  167. package/dist/utils/pdf-viewer-filter.d.ts +35 -0
  168. package/dist/utils/pdf-viewer-filter.d.ts.map +1 -0
  169. package/dist/utils/pdf-widget-helpers.d.ts +98 -0
  170. package/dist/utils/pdf-widget-helpers.d.ts.map +1 -0
  171. package/dist/utils/pdfjs-config.d.ts +56 -0
  172. package/dist/utils/pdfjs-config.d.ts.map +1 -0
  173. package/dist/utils/pdfjs-version-check.d.ts +28 -0
  174. package/dist/utils/pdfjs-version-check.d.ts.map +1 -0
  175. package/dist/utils/performance-monitor.d.ts +172 -0
  176. package/dist/utils/performance-monitor.d.ts.map +1 -0
  177. package/dist/utils/tracking.d.ts +89 -0
  178. package/dist/utils/tracking.d.ts.map +1 -0
  179. package/package.json +2 -2
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
4
+ variant?: "default" | "destructive" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
7
+ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
8
+ export { Alert, AlertTitle, AlertDescription };
9
+ //# sourceMappingURL=alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAoBlE,QAAA,MAAM,KAAK;;sHAUT,CAAC;AAGH,QAAA,MAAM,UAAU,uHASd,CAAC;AAGH,QAAA,MAAM,gBAAgB,yHASpB,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ asChild?: boolean;
9
+ }
10
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Button, buttonVariants };
12
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;8EA2BnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,uFAWX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { DayPicker } from 'react-day-picker';
3
+ import 'react-day-picker/dist/style.css';
4
+ export type CalendarProps = React.ComponentProps<typeof DayPicker>;
5
+ declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
6
+ declare namespace Calendar {
7
+ var displayName: string;
8
+ }
9
+ export { Calendar };
10
+ //# sourceMappingURL=calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAwC,MAAM,kBAAkB,CAAC;AACnF,OAAO,iCAAiC,CAAC;AAMzC,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAiGnE,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,aAAa,2CA6Cf;kBAlDQ,QAAQ;;;AAqDjB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
8
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
9
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,IAAI,6GAYR,CAAC;AAGH,QAAA,MAAM,UAAU,6GASd,CAAC;AAGH,QAAA,MAAM,SAAS,6GASb,CAAC;AAGH,QAAA,MAAM,eAAe,6GASnB,CAAC;AAGH,QAAA,MAAM,WAAW,6GAKf,CAAC;AAGH,QAAA,MAAM,UAAU,6GASd,CAAC;AAGH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
+ declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export { Checkbox };
5
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAK9D,QAAA,MAAM,QAAQ,iKAkBZ,CAAC;AAGH,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DialogHeader: {
10
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ declare const DialogFooter: {
14
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
17
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
18
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
19
+ export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
20
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAKzD,QAAA,MAAM,MAAM,uCAAuB,CAAA;AAEnC,QAAA,MAAM,aAAa,8GAA0B,CAAA;AAE7C,QAAA,MAAM,YAAY,6CAAyB,CAAA;AAE3C,QAAA,MAAM,WAAW,4GAAwB,CAAA;AAEzC,QAAA,MAAM,aAAa,8JAcjB,CAAA;AAGF,QAAA,MAAM,aAAa,8JAuBjB,CAAA;AAGF,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAA;AAGD,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAA;AAGD,QAAA,MAAM,WAAW,oKAYf,CAAA;AAGF,QAAA,MAAM,iBAAiB,8KASrB,CAAA;AAGF,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAA"}
@@ -0,0 +1,13 @@
1
+ export * from './accordion';
2
+ export * from './alert';
3
+ export * from './button';
4
+ export * from './calendar';
5
+ export * from './card';
6
+ export * from './checkbox';
7
+ export * from './dialog';
8
+ export * from './input';
9
+ export * from './label';
10
+ export * from './popover';
11
+ export * from './radio-group';
12
+ export * from './select';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ }
4
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
5
+ export { Input };
6
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;CAAG;AAExD,QAAA,MAAM,KAAK,qFAcV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+ import { type VariantProps } from 'class-variance-authority';
4
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
5
+ export { Label };
6
+ //# sourceMappingURL=label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAQlE,QAAA,MAAM,KAAK,4PAUT,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ export { Popover, PopoverTrigger, PopoverContent };
7
+ //# sourceMappingURL=popover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAI5D,QAAA,MAAM,OAAO,yCAAwB,CAAC;AAEtC,QAAA,MAAM,cAAc,gHAA2B,CAAC;AAEhD,QAAA,MAAM,cAAc,gKAkBlB,CAAC;AAGH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
+ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ export { RadioGroup, RadioGroupItem };
6
+ //# sourceMappingURL=radio-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAKnE,QAAA,MAAM,UAAU,+JAWd,CAAC;AAGH,QAAA,MAAM,cAAc,yKAkBlB,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import * as SelectPrimitive from '@radix-ui/react-select';
3
+ declare const Select: React.FC<SelectPrimitive.SelectProps>;
4
+ declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
5
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
6
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
14
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAK1D,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,WAAW,yGAAwB,CAAC;AAE1C,QAAA,MAAM,WAAW,0GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,oKAiBjB,CAAC;AAGH,QAAA,MAAM,oBAAoB,qKAcxB,CAAC;AAGH,QAAA,MAAM,sBAAsB,uKAc1B,CAAC;AAIH,QAAA,MAAM,aAAa,8JAoDjB,CAAC;AAGH,QAAA,MAAM,WAAW,4JASf,CAAC;AAGH,QAAA,MAAM,UAAU,2JAoBd,CAAC;AAGH,QAAA,MAAM,eAAe,gKASnB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type ClassValue } from 'clsx';
2
+ /**
3
+ * Utility function to merge Tailwind CSS classes intelligently
4
+ * Combines clsx for conditional classes and tailwind-merge for conflict resolution
5
+ */
6
+ export declare function cn(...inputs: ClassValue[]): string;
7
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C;;;GAGG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
@@ -0,0 +1,299 @@
1
+ /**
2
+ * Form field types supported by the PDF signer
3
+ */
4
+ export declare enum FormFieldType {
5
+ TEXT = "text",
6
+ SIGNATURE = "signature",
7
+ INITIALS = "initials",
8
+ DATE = "date",
9
+ CHECKBOX = "checkbox",
10
+ RADIO = "radio",
11
+ DROPDOWN = "dropdown",
12
+ TEXT_LABEL = "text_label"
13
+ }
14
+ /**
15
+ * Position and dimensions of a form field on a PDF page
16
+ */
17
+ export interface FormFieldPosition {
18
+ x: number;
19
+ y: number;
20
+ width: number;
21
+ height: number;
22
+ page: number;
23
+ }
24
+ /**
25
+ * Acknowledgement for form fields
26
+ */
27
+ export interface Acknowledgement {
28
+ id: string;
29
+ title: string;
30
+ description: string;
31
+ }
32
+ /**
33
+ * Form field definition with all properties
34
+ */
35
+ export interface FormField {
36
+ id: string;
37
+ fieldId: string;
38
+ type: FormFieldType;
39
+ name: string;
40
+ label: string;
41
+ position: FormFieldPosition;
42
+ required: boolean;
43
+ placeholder?: string;
44
+ options?: string[];
45
+ radioPositions?: FormFieldPosition[];
46
+ defaultValue?: string;
47
+ value?: string;
48
+ fontSize?: number;
49
+ multiline?: boolean;
50
+ maxLength?: number;
51
+ assignedSignerEmail?: string;
52
+ assignedSignerRole?: string;
53
+ visibleToOthers?: boolean;
54
+ isLabelAutoGenerated?: boolean;
55
+ acknowledgements?: Acknowledgement[];
56
+ }
57
+ /**
58
+ * PDF page information with rendered image
59
+ */
60
+ export interface PdfPage {
61
+ pageNumber: number;
62
+ width: number;
63
+ height: number;
64
+ imageUrl: string;
65
+ renderWidth?: number;
66
+ renderHeight?: number;
67
+ }
68
+ /**
69
+ * PDF viewer application interface (for PDF.js integration)
70
+ */
71
+ export interface PDFViewerApplication {
72
+ initializedPromise?: Promise<void>;
73
+ pdfLoadingTask?: {
74
+ promise: Promise<void>;
75
+ };
76
+ pdfDocument?: {
77
+ annotationStorage?: {
78
+ serializable?: {
79
+ map?: Map<string, unknown>;
80
+ };
81
+ getAll?: () => Record<string, unknown>;
82
+ getValue?: (key: string) => unknown;
83
+ setValue?: (key: string, value: unknown) => void;
84
+ };
85
+ getFieldObjects?: () => Promise<Record<string, unknown[]>>;
86
+ saveDocument?: () => Promise<Uint8Array>;
87
+ getData?: () => Promise<Uint8Array>;
88
+ };
89
+ pdfViewer?: {
90
+ currentPageNumber?: number;
91
+ pagesCount?: number;
92
+ currentScale?: number;
93
+ container?: HTMLElement;
94
+ update?: () => void;
95
+ increaseScale?: () => void;
96
+ decreaseScale?: () => void;
97
+ nextPage?: () => void;
98
+ previousPage?: () => void;
99
+ };
100
+ eventBus?: {
101
+ on?: (eventName: string, handler: () => void) => void;
102
+ off?: (eventName: string, handler: () => void) => void;
103
+ };
104
+ }
105
+ /**
106
+ * Configuration for PDF.js worker and viewer
107
+ */
108
+ export interface PdfJsConfig {
109
+ workerSrc?: string;
110
+ viewerBasePath?: string;
111
+ }
112
+ /**
113
+ * Attachment metadata
114
+ */
115
+ export interface Attachment {
116
+ id: string;
117
+ file: File;
118
+ name: string;
119
+ size: number;
120
+ type: string;
121
+ uploadedAt: Date;
122
+ preview?: string;
123
+ }
124
+ /**
125
+ * Attachment validation constraints
126
+ */
127
+ export interface AttachmentConstraints {
128
+ maxFileSize: number;
129
+ maxTotalSize: number;
130
+ maxFiles: number;
131
+ allowedTypes: string[];
132
+ allowedExtensions?: string[];
133
+ }
134
+ /**
135
+ * Attachment validation result
136
+ */
137
+ export interface AttachmentValidationResult {
138
+ isValid: boolean;
139
+ errors: string[];
140
+ }
141
+ /**
142
+ * Audit trail metadata for compliance and forensics
143
+ */
144
+ export interface AuditTrailMetadata {
145
+ userAgent?: string;
146
+ screenResolution?: string;
147
+ timezone?: string;
148
+ language?: string;
149
+ platform?: string;
150
+ ipAddress?: string;
151
+ geolocation?: {
152
+ latitude: number;
153
+ longitude: number;
154
+ accuracy?: number;
155
+ };
156
+ }
157
+ /**
158
+ * Document metadata for PDF properties
159
+ */
160
+ export interface DocumentMetadata {
161
+ submissionId?: string;
162
+ documentId?: string;
163
+ author?: string;
164
+ signerEmail?: string;
165
+ signerInitials?: string;
166
+ createdAt?: Date;
167
+ }
168
+ /**
169
+ * Form submission data
170
+ */
171
+ export interface SubmissionData {
172
+ formFieldValues: Record<string, string>;
173
+ signatures: Record<string, string>;
174
+ attachments?: Attachment[];
175
+ pdfBytes: Uint8Array;
176
+ auditTrail?: AuditTrailMetadata;
177
+ metadata?: DocumentMetadata;
178
+ }
179
+ /**
180
+ * Validation error
181
+ */
182
+ export interface ValidationError {
183
+ field: string;
184
+ message: string;
185
+ }
186
+ /**
187
+ * PDF viewer ref methods
188
+ */
189
+ export interface PdfViewerRef {
190
+ loadPdf: (pdfUrl: string) => Promise<void>;
191
+ getFormFieldValues: () => Promise<Record<string, string>>;
192
+ setFormFieldValues: (values: Record<string, string>) => Promise<void>;
193
+ getAllFieldNames: () => Promise<string[]>;
194
+ saveDocument: () => Promise<Uint8Array | null>;
195
+ getPDFViewerApplication: () => PDFViewerApplication | null;
196
+ injectPlaceholders: (fields: Array<{
197
+ id: string;
198
+ name: string;
199
+ placeholder?: string;
200
+ }>) => void;
201
+ injectRadioLabels: (fields: Array<{
202
+ id: string;
203
+ name: string;
204
+ type: string;
205
+ options?: string[];
206
+ }>) => void;
207
+ setFieldMetadata: (fields: FormField[]) => void;
208
+ zoomIn: () => Promise<void>;
209
+ zoomOut: () => Promise<void>;
210
+ nextPage: () => Promise<void>;
211
+ previousPage: () => Promise<void>;
212
+ getCurrentPage: () => Promise<number | null>;
213
+ getTotalPages: () => Promise<number | null>;
214
+ attachFieldClickInterceptors: (onFieldClick: (fieldName: string, element?: HTMLElement) => boolean) => Promise<void>;
215
+ attachFieldChangeListeners: (onFieldChange: (fieldName: string, value: string, element: HTMLElement) => void) => Promise<() => void>;
216
+ addFieldIndicator: (fieldName: string, indicatorType?: 'completed' | 'pending-ack' | 'info', allowedFieldIds?: string) => void;
217
+ removeFieldIndicator: (fieldName: string) => void;
218
+ addDateFieldIndicator: (fieldName: string) => void;
219
+ removeDateFieldIndicator: (fieldName: string) => void;
220
+ previewSignature: (fieldName: string, dataUrl: string | null) => void;
221
+ previewInitials: (fieldName: string, text: string | null) => void;
222
+ clearFieldPreviews: (fieldName?: string) => void;
223
+ }
224
+ /**
225
+ * Signature canvas ref methods
226
+ */
227
+ export interface SignatureCanvasRef {
228
+ clear: () => void;
229
+ getSignatureDataUrl: () => string | null;
230
+ isEmpty: () => boolean;
231
+ }
232
+ /**
233
+ * Signer information for multi-signer documents
234
+ */
235
+ export type RecipientType = 'signer' | 'viewer' | 'cc';
236
+ export interface Signer {
237
+ id: string;
238
+ email: string;
239
+ name: string;
240
+ signOrder: number;
241
+ status: 'pending' | 'viewed' | 'signed' | 'declined';
242
+ signedAt?: string;
243
+ recipientType?: RecipientType;
244
+ }
245
+ /**
246
+ * Multi-signer context for determining field visibility and behavior
247
+ * Used internally by hooks and utilities to manage multi-signer logic
248
+ */
249
+ export interface MultiSignerContext {
250
+ /** Whether this is a multi-signer document */
251
+ isMultiSigner: boolean;
252
+ /** Current signer object (null for single-signer mode) */
253
+ currentSigner: Signer | null;
254
+ /** Current signer's email address */
255
+ currentSignerEmail: string;
256
+ /** Whether current signer is a primary signer (signOrder === 1) */
257
+ isPrimarySigner: boolean;
258
+ /** Whether current signer is the final signer (signOrder === totalSigners) */
259
+ isFinalSigner: boolean;
260
+ }
261
+ /**
262
+ * Document submission
263
+ */
264
+ export interface Submission {
265
+ id: string;
266
+ documentId: string;
267
+ status: 'pending' | 'signed' | 'declined' | 'expired';
268
+ createdAt: string;
269
+ updatedAt: string;
270
+ formFields?: FormField[];
271
+ pdfUrl?: string;
272
+ signedAt?: string;
273
+ declinedAt?: string;
274
+ expiresAt?: string;
275
+ isMultipleSignature?: boolean;
276
+ signers?: Signer[];
277
+ }
278
+ /**
279
+ * Type aliases for compatibility with dm-web-frontend naming conventions
280
+ */
281
+ export type EsignFormField = FormField;
282
+ export type EsignSigner = Signer;
283
+ /**
284
+ * Submission status enum
285
+ */
286
+ export declare enum SubmissionStatus {
287
+ PENDING = "pending",
288
+ SIGNED = "signed",
289
+ DECLINED = "declined",
290
+ EXPIRED = "expired"
291
+ }
292
+ /**
293
+ * Field error type for validation
294
+ */
295
+ export interface FieldError {
296
+ fieldName: string;
297
+ message: string;
298
+ }
299
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,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ClB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,8CAA8C;IAC9C,aAAa,EAAE,OAAO,CAAC;IACvB,0DAA0D;IAC1D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,qCAAqC;IACrC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mEAAmE;IACnE,eAAe,EAAE,OAAO,CAAC;IACzB,8EAA8E;IAC9E,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC;AACvC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Attachment Validation Utilities
3
+ * Validation functions for file attachments
4
+ */
5
+ import type { AttachmentConstraints, Attachment } from '../types';
6
+ /**
7
+ * Default attachment constraints
8
+ */
9
+ export declare const DEFAULT_ATTACHMENT_CONSTRAINTS: AttachmentConstraints;
10
+ /**
11
+ * Validate a single file against constraints
12
+ *
13
+ * @param file - File to validate
14
+ * @param constraints - Validation constraints
15
+ * @returns Validation result with errors array
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const result = validateFile(file, DEFAULT_ATTACHMENT_CONSTRAINTS);
20
+ * if (result.errors.length > 0) {
21
+ * console.error('File validation failed:', result.errors);
22
+ * }
23
+ * ```
24
+ */
25
+ export declare function validateFile(file: File, constraints?: AttachmentConstraints): {
26
+ valid: boolean;
27
+ errors: string[];
28
+ };
29
+ /**
30
+ * Validate multiple files against constraints
31
+ *
32
+ * @param files - Files to validate
33
+ * @param existingAttachments - Existing attachments to consider for total size/count
34
+ * @param constraints - Validation constraints
35
+ * @returns Validation result with errors array
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const result = validateFiles(newFiles, existingAttachments, DEFAULT_ATTACHMENT_CONSTRAINTS);
40
+ * if (result.errors.length > 0) {
41
+ * alert('Some files cannot be uploaded: ' + result.errors.join(', '));
42
+ * }
43
+ * ```
44
+ */
45
+ export declare function validateFiles(files: File[], existingAttachments?: Attachment[], constraints?: AttachmentConstraints): {
46
+ valid: boolean;
47
+ errors: string[];
48
+ };
49
+ /**
50
+ * Validate file and throw error if invalid
51
+ *
52
+ * Convenience function that throws AttachmentValidationError if validation fails.
53
+ *
54
+ * @param file - File to validate
55
+ * @param constraints - Validation constraints
56
+ * @throws {AttachmentValidationError} If validation fails
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * try {
61
+ * validateFileOrThrow(file);
62
+ * // File is valid, proceed with upload
63
+ * } catch (err) {
64
+ * if (err instanceof AttachmentValidationError) {
65
+ * alert(err.message);
66
+ * }
67
+ * }
68
+ * ```
69
+ */
70
+ export declare function validateFileOrThrow(file: File, constraints?: AttachmentConstraints): void;
71
+ /**
72
+ * Validate multiple files and throw error if invalid
73
+ *
74
+ * @param files - Files to validate
75
+ * @param existingAttachments - Existing attachments
76
+ * @param constraints - Validation constraints
77
+ * @throws {AttachmentValidationError} If validation fails
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * try {
82
+ * validateFilesOrThrow(selectedFiles, currentAttachments);
83
+ * // All files are valid
84
+ * } catch (err) {
85
+ * if (err instanceof AttachmentValidationError) {
86
+ * alert(err.message);
87
+ * }
88
+ * }
89
+ * ```
90
+ */
91
+ export declare function validateFilesOrThrow(files: File[], existingAttachments?: Attachment[], constraints?: AttachmentConstraints): void;
92
+ /**
93
+ * Check if a file type is an image
94
+ *
95
+ * @param fileType - MIME type of the file
96
+ * @returns true if the file is an image
97
+ *
98
+ * @example
99
+ * ```ts
100
+ * if (isImageType(file.type)) {
101
+ * // Generate preview
102
+ * }
103
+ * ```
104
+ */
105
+ export declare function isImageType(fileType: string): boolean;
106
+ /**
107
+ * Format file size for display
108
+ *
109
+ * @param bytes - File size in bytes
110
+ * @returns Formatted size string (e.g., "1.5 MB")
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * const sizeDisplay = formatFileSize(file.size); // "1.5 MB"
115
+ * ```
116
+ */
117
+ export declare function formatFileSize(bytes: number): string;
118
+ //# sourceMappingURL=attachment-validators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment-validators.d.ts","sourceRoot":"","sources":["../../src/utils/attachment-validators.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGlE;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,qBAM5C,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,EACV,WAAW,GAAE,qBAAsD,GAClE;IACD,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CA4CA;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,IAAI,EAAE,EACb,mBAAmB,GAAE,UAAU,EAAO,EACtC,WAAW,GAAE,qBAAsD,GAClE;IACD,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAkCA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,EACV,WAAW,GAAE,qBAAsD,GAClE,IAAI,CASN;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,IAAI,EAAE,EACb,mBAAmB,GAAE,UAAU,EAAO,EACtC,WAAW,GAAE,qBAAsD,GAClE,IAAI,CASN;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQpD"}