@docuninja/builder2.0 0.0.65

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 (65) hide show
  1. package/README.md +32 -0
  2. package/dist/builder/builder-store.d.ts +54 -0
  3. package/dist/builder/cache-store.d.ts +12 -0
  4. package/dist/builder/component-types.d.ts +149 -0
  5. package/dist/builder/helpers.d.ts +9 -0
  6. package/dist/builder/hooks/use-cookie-consent-height.d.ts +1 -0
  7. package/dist/builder/hooks/use-label-position.d.ts +3 -0
  8. package/dist/builder/index.d.ts +97 -0
  9. package/dist/builder/password-files.d.ts +3 -0
  10. package/dist/builder/pdf-worker.d.ts +2 -0
  11. package/dist/builder/root.d.ts +2 -0
  12. package/dist/builder/sensor.d.ts +14 -0
  13. package/dist/builder/sign/actions.d.ts +21 -0
  14. package/dist/builder/sign/checkbox-panel.d.ts +5 -0
  15. package/dist/builder/sign/component-types.d.ts +68 -0
  16. package/dist/builder/sign/consent.d.ts +7 -0
  17. package/dist/builder/sign/date-panel.d.ts +5 -0
  18. package/dist/builder/sign/file.d.ts +10 -0
  19. package/dist/builder/sign/font-selector.d.ts +6 -0
  20. package/dist/builder/sign/fonts.d.ts +1 -0
  21. package/dist/builder/sign/index.d.ts +50 -0
  22. package/dist/builder/sign/initials-panel.d.ts +5 -0
  23. package/dist/builder/sign/initials-signature-panel.d.ts +6 -0
  24. package/dist/builder/sign/multiselect-panel.d.ts +5 -0
  25. package/dist/builder/sign/number-panel.d.ts +5 -0
  26. package/dist/builder/sign/radio-panel.d.ts +5 -0
  27. package/dist/builder/sign/select-panel.d.ts +5 -0
  28. package/dist/builder/sign/sign-panel.d.ts +5 -0
  29. package/dist/builder/sign/signature.d.ts +6 -0
  30. package/dist/builder/sign/success.d.ts +3 -0
  31. package/dist/builder/sign/text-panel.d.ts +5 -0
  32. package/dist/builder/sign/voided.d.ts +1 -0
  33. package/dist/builder/sign-store.d.ts +49 -0
  34. package/dist/builder/standalone.d.ts +13 -0
  35. package/dist/builder/types/api.d.ts +352 -0
  36. package/dist/builder/ui/delete.d.ts +7 -0
  37. package/dist/builder/ui/document.d.ts +5 -0
  38. package/dist/builder/ui/editable.d.ts +7 -0
  39. package/dist/builder/ui/files.d.ts +6 -0
  40. package/dist/builder/ui/frame.d.ts +1 -0
  41. package/dist/builder/ui/index.d.ts +124 -0
  42. package/dist/builder/ui/index.iife.d.ts +2 -0
  43. package/dist/builder/ui/options-modal.d.ts +11 -0
  44. package/dist/builder/ui/preview.d.ts +7 -0
  45. package/dist/builder/ui/rectangles.d.ts +9 -0
  46. package/dist/builder/ui/save.d.ts +11 -0
  47. package/dist/builder/ui/send-confirmation.d.ts +9 -0
  48. package/dist/builder/ui/settings-modal.d.ts +10 -0
  49. package/dist/builder/ui/signatories.d.ts +23 -0
  50. package/dist/builder/ui/signatory.d.ts +51 -0
  51. package/dist/builder/ui/title.d.ts +7 -0
  52. package/dist/builder/ui/toolbox-context.d.ts +14 -0
  53. package/dist/builder/ui/toolbox.d.ts +3 -0
  54. package/dist/builder/ui/upload.d.ts +16 -0
  55. package/dist/builder/ui/validation-errors.d.ts +5 -0
  56. package/dist/builder/ui/websockets.d.ts +38 -0
  57. package/dist/builder/websocket-manager.d.ts +75 -0
  58. package/dist/builder/websockets-store.d.ts +20 -0
  59. package/dist/builder.d.ts +963 -0
  60. package/dist/builder.es.js +51357 -0
  61. package/dist/builder.iife.js +294 -0
  62. package/dist/builder2.0.css +1 -0
  63. package/dist/builder2.0.standalone.css +2 -0
  64. package/dist/index.iife.min-CUOWEcLA.js +184 -0
  65. package/package.json +93 -0
@@ -0,0 +1,963 @@
1
+ import { Axios } from 'axios';
2
+ import { Context } from 'react';
3
+ import { FieldValues } from 'react-hook-form';
4
+ import { JSX as JSX_2 } from '@emotion/react/jsx-runtime';
5
+ import * as lib from 'pdfjs-dist';
6
+ import { RefObject } from 'react';
7
+
8
+ export declare interface Account {
9
+ id: string;
10
+ plan: string | null;
11
+ plan_term: string | null;
12
+ plan_expires: string | null;
13
+ plan_paid: string | null;
14
+ trial_ends_at: string | null;
15
+ is_active: boolean;
16
+ created_at: string;
17
+ updated_at: string;
18
+ default_company?: Company;
19
+ companies?: Company[];
20
+ users?: User[];
21
+ }
22
+
23
+ export declare interface ActivityLog {
24
+ id: string;
25
+ company_id: string;
26
+ user_id: string;
27
+ user_type: string;
28
+ ip_address: string | null;
29
+ user_agent: string | null;
30
+ subject_type: string;
31
+ subject_id: number;
32
+ event: string;
33
+ event_type: string | null;
34
+ properties: Record<string, unknown> | null;
35
+ description: string | null;
36
+ old_values: Record<string, unknown> | null;
37
+ new_values: Record<string, unknown> | null;
38
+ created_at: string;
39
+ updated_at: string;
40
+ }
41
+
42
+ export declare type AlertProps = {
43
+ title: React.ReactNode;
44
+ children: React.ReactNode;
45
+ };
46
+
47
+ export declare interface Blueprint {
48
+ id: string;
49
+ name: string;
50
+ description: string;
51
+ path: string | null;
52
+ disk: string | null;
53
+ mime_type: string | null;
54
+ hash: string | null;
55
+ is_template: boolean;
56
+ metadata: Record<string, unknown>;
57
+ is_deleted: boolean;
58
+ created_at: string;
59
+ updated_at: string;
60
+ archived_at: string | null;
61
+ document: Document_2;
62
+ }
63
+
64
+ export declare function Builder(): JSX_2.Element;
65
+
66
+ export declare type Builder = {
67
+ token: string;
68
+ document: string;
69
+ saveBuilderEvent?: string;
70
+ components: {
71
+ skeleton: React.ComponentType;
72
+ save: React.ComponentType<SaveButtonProps>;
73
+ sign: React.ComponentType<SignProps>;
74
+ send: {
75
+ trigger: React.ComponentType<SendButtonProps>;
76
+ dialog: React.ComponentType<SendDialogProps>;
77
+ button: React.ComponentType<SendDialogButtonProps>;
78
+ };
79
+ delete: {
80
+ dialog: React.ComponentType<DeleteDialogProps>;
81
+ button: React.ComponentType<DeleteDialogButtonProps>;
82
+ };
83
+ upload: {
84
+ trigger: React.ComponentType<UploadProps>;
85
+ dialog: React.ComponentType<UploadDialogProps>;
86
+ };
87
+ confirmation: {
88
+ dialog: React.ComponentType<ConfirmationDialogProps>;
89
+ button: React.ComponentType<ConfirmationDialogButtonProps>;
90
+ };
91
+ validationErrors: React.ComponentType<ValidationErrorsProps>;
92
+ signatorySelector: React.ComponentType<SignatorySelectorProps>;
93
+ signatorySwap: React.ComponentType<SignatorySwapProps>;
94
+ uninvite: {
95
+ dialog: React.ComponentType<UninviteDialogProps>;
96
+ button: React.ComponentType<UninviteDialogButtonProps>;
97
+ };
98
+ createSignatory: {
99
+ dialog: React.ComponentType<CreateDialogProps>;
100
+ client: {
101
+ form: React.ComponentType<CreateClientTabProps>;
102
+ button: React.ComponentType<CreateDialogTabButtonProps>;
103
+ };
104
+ user: {
105
+ form: React.ComponentType<CreateClientTabProps>;
106
+ button: React.ComponentType<CreateDialogTabButtonProps>;
107
+ };
108
+ };
109
+ toolboxContext: React.ComponentType<ToolboxContextProps>;
110
+ createBlueprintSignatory: React.ComponentType<CreateBlueprintSignatoryProps>;
111
+ alert: React.ComponentType<AlertProps>;
112
+ actions?: React.ComponentType;
113
+ helper?: React.ComponentType;
114
+ imports?: {
115
+ googleDrive?: React.ComponentType<ImportFromButtonProps>;
116
+ };
117
+ rectangleSettings: {
118
+ dialog: React.ComponentType<RectangleSettingsDialogProps>;
119
+ save: React.ComponentType<RectangleSettingsDialogButtonProps>;
120
+ button: React.ComponentType<RectangleSettingsDialogButtonProps>;
121
+ input: React.ComponentType<RectangleSettingsInputProps>;
122
+ label: React.ComponentType<RectangleSettingsLabelProps>;
123
+ checkbox: React.ComponentType<RectangleSettingsCheckboxProps>;
124
+ select: React.ComponentType<RectangleSettingsSelectProps>;
125
+ removeButton: React.ComponentType<RectangleSettingsRemoveButtonProps>;
126
+ optionItem: React.ComponentType<RectangleSettingsOptionItemProps>;
127
+ optionsList: React.ComponentType<RectangleSettingsOptionsListProps>;
128
+ };
129
+ };
130
+ styles: {
131
+ frame: React.CSSProperties | undefined;
132
+ border: string | undefined;
133
+ childrenWrapper?: React.CSSProperties;
134
+ title?: React.CSSProperties;
135
+ signatoriesWrapper?: React.CSSProperties;
136
+ filesWrapper?: React.CSSProperties;
137
+ signatories?: {
138
+ title?: React.CSSProperties;
139
+ panel?: React.CSSProperties;
140
+ list?: React.CSSProperties;
141
+ };
142
+ } | null;
143
+ options: {
144
+ header: {
145
+ sticky: boolean;
146
+ };
147
+ };
148
+ endpoint?: string | undefined;
149
+ events: {
150
+ onMessage: (message: string) => void;
151
+ onMessageDismiss: () => void;
152
+ };
153
+ readonly: boolean;
154
+ blueprint?: boolean;
155
+ invoiceninja?: boolean;
156
+ company?: string;
157
+ onEntityReady?: (entity: Document_2 | Blueprint) => void;
158
+ services?: {
159
+ google?: {
160
+ appId: string;
161
+ clientId: string;
162
+ };
163
+ };
164
+ translations?: {
165
+ [key: string]: string | object;
166
+ };
167
+ defaultDateFormat?: DateFormat;
168
+ };
169
+
170
+ export declare const BuilderContext: Context<Builder | null>;
171
+
172
+ export declare const BuilderContextPlus: Context<(Builder & {
173
+ http: Axios;
174
+ }) | null>;
175
+
176
+ export declare namespace BuilderTypes {
177
+ export {
178
+ GenericSingleResponse,
179
+ GenericManyResponse,
180
+ WithSignerToken,
181
+ Company,
182
+ Template,
183
+ Account,
184
+ ActivityLog,
185
+ Client,
186
+ ClientContact,
187
+ CompanyUser,
188
+ Document_2 as Document,
189
+ DocumentFile,
190
+ DocumentInvitation,
191
+ DocumentSignature,
192
+ User,
193
+ Timezone,
194
+ Currency,
195
+ Language,
196
+ Country,
197
+ Plan,
198
+ ValidationBag,
199
+ DocumentStatus,
200
+ Blueprint
201
+ }
202
+ }
203
+
204
+ export declare function checkPdfPassword(file: File, password: string): Promise<boolean>;
205
+
206
+ export declare interface Client {
207
+ id: string;
208
+ user_id: string;
209
+ company_id: string;
210
+ name: string | null;
211
+ website: string | null;
212
+ private_notes: string | null;
213
+ public_notes: string | null;
214
+ logo: string | null;
215
+ phone: string | null;
216
+ balance: number;
217
+ paid_to_date: number;
218
+ currency_id: number | null;
219
+ address1: string | null;
220
+ address2: string | null;
221
+ city: string | null;
222
+ state: string | null;
223
+ postal_code: string | null;
224
+ country_id: number | null;
225
+ is_deleted: boolean;
226
+ vat_number: string | null;
227
+ id_number: string | null;
228
+ created_at: string;
229
+ updated_at: string;
230
+ deleted_at: string | null;
231
+ contacts?: ClientContact[];
232
+ }
233
+
234
+ export declare interface ClientContact {
235
+ id: string;
236
+ user_id: string;
237
+ company_id: string;
238
+ client_id: string;
239
+ first_name: string | null;
240
+ last_name: string | null;
241
+ phone: string | null;
242
+ email: string | null;
243
+ signature_base64: string | null;
244
+ initials_base64: string | null;
245
+ email_verified_at: string | null;
246
+ is_primary: boolean;
247
+ last_login: string | null;
248
+ created_at: string;
249
+ updated_at: string;
250
+ deleted_at: string | null;
251
+ e_signature: string | null;
252
+ e_initials: string | null;
253
+ contact_key: string | null;
254
+ user?: User;
255
+ company?: Company;
256
+ client?: Client;
257
+ }
258
+
259
+ export declare interface Company {
260
+ id: string;
261
+ account_id: string;
262
+ name: string;
263
+ address1: string;
264
+ address2: string;
265
+ city: string;
266
+ state: string;
267
+ postal_code: string;
268
+ country_id: string;
269
+ currency_id: string;
270
+ language_id: string;
271
+ timezone_id: string;
272
+ subdomain: string;
273
+ website: string;
274
+ logo: string;
275
+ role: string;
276
+ onboarding_completed_at: string;
277
+ created_at: string;
278
+ updated_at: string;
279
+ users?: User[];
280
+ pivot?: CompanyUser | null;
281
+ documents?: Document_2[];
282
+ }
283
+
284
+ export declare interface CompanyUser {
285
+ id: string;
286
+ is_owner: boolean;
287
+ is_admin: boolean;
288
+ account_id: string;
289
+ company_id: string;
290
+ user_id: string;
291
+ permissions: Array<unknown> | null;
292
+ role: string;
293
+ created_at: string;
294
+ updated_at: string;
295
+ deleted_at: string | null;
296
+ }
297
+
298
+ export declare type ConfirmationDialogButtonProps = {
299
+ onClick: () => void;
300
+ };
301
+
302
+ export declare type ConfirmationDialogProps = {
303
+ isOpen: boolean;
304
+ onOpenChange: (open: boolean) => void;
305
+ content: React.ReactNode;
306
+ action: React.ReactNode;
307
+ };
308
+
309
+ export declare type ConsentContinueButtonProps = {
310
+ onClick: () => void;
311
+ disabled: boolean;
312
+ };
313
+
314
+ export declare type ConsentDownloadButtonProps = {
315
+ onClick: () => void;
316
+ };
317
+
318
+ export declare type ConsentScreenProps = {
319
+ onCheckboxChange: (checked: boolean) => void;
320
+ };
321
+
322
+ export declare interface Country {
323
+ id: string;
324
+ capital: string;
325
+ citizenship: string;
326
+ country_code: string;
327
+ currency: string;
328
+ currency_code: string;
329
+ currency_sub_unit: string;
330
+ full_name: string;
331
+ iso_3166_2: string;
332
+ iso_3166_3: string;
333
+ name: string;
334
+ region_code: string;
335
+ sub_region_code: string;
336
+ eea: boolean;
337
+ swap_postal_code: boolean;
338
+ swap_currency_symbol: boolean;
339
+ thousand_separator: string;
340
+ decimal_separator: string;
341
+ }
342
+
343
+ export declare type CreateBlueprintSignatoryProps = {
344
+ onClick: () => void;
345
+ };
346
+
347
+ export declare type CreateClientTabProps = {
348
+ fields: CreateDialogFieldProps<Record<string, unknown>>[];
349
+ errors: ValidationBag | null;
350
+ };
351
+
352
+ declare type CreateDialogFieldProps<T extends FieldValues> = {
353
+ name: keyof T;
354
+ type: HTMLInputElement["type"];
355
+ onValueChange: (v: unknown) => void;
356
+ };
357
+
358
+ export declare type CreateDialogProps = {
359
+ open: boolean;
360
+ onOpenChange: (open: boolean) => void;
361
+ client: React.ReactNode;
362
+ user: React.ReactNode;
363
+ };
364
+
365
+ export declare type CreateDialogTabButtonProps = {
366
+ form: string;
367
+ isSubmitting: boolean;
368
+ };
369
+
370
+ export declare interface Currency {
371
+ id: string;
372
+ code: string;
373
+ decimal_separator: string;
374
+ exchange_rate: number;
375
+ name: string;
376
+ precision: number;
377
+ swap_currency_symbol: boolean;
378
+ symbol: string;
379
+ thousand_separator: string;
380
+ }
381
+
382
+ declare type DateFormat = "YYYY-MM-DD" | "MM/DD/YYYY" | "DD/MM/YYYY";
383
+
384
+ export declare type DateInputProps = {
385
+ value: string;
386
+ onChange: (date: string) => void;
387
+ };
388
+
389
+ export declare type DeleteDialogButtonProps = {
390
+ isSubmitting: boolean;
391
+ };
392
+
393
+ export declare type DeleteDialogProps = {
394
+ open: boolean;
395
+ onOpenChange: (open: boolean) => void;
396
+ action: React.ReactNode;
397
+ };
398
+
399
+ declare interface Document_2 {
400
+ id: string;
401
+ description: string;
402
+ status_id: number;
403
+ is_deleted: boolean;
404
+ user_id: string;
405
+ company_id: string;
406
+ completed_at: string | null;
407
+ voided_at: string | null;
408
+ created_at: string | null;
409
+ updated_at: string | null;
410
+ deleted_at: string | null;
411
+ user?: User | null;
412
+ company?: Company | null;
413
+ invitations?: DocumentInvitation[];
414
+ files?: DocumentFile[];
415
+ signatures?: DocumentSignature[];
416
+ signatoryOrder: string[];
417
+ metadata: Record<string, unknown> | null;
418
+ }
419
+ export { Document_2 as Document }
420
+
421
+ export declare interface DocumentFile {
422
+ id: string;
423
+ user_id: string;
424
+ document_id: string;
425
+ filename: string;
426
+ path: string;
427
+ hash: string;
428
+ disk: string;
429
+ mime_type: string;
430
+ file_size: number;
431
+ page_position: number;
432
+ page_count: number | null;
433
+ url: string | null;
434
+ previews: string[];
435
+ metadata: Record<string, unknown> | null;
436
+ created_at: string;
437
+ updated_at: string;
438
+ }
439
+
440
+ export declare interface DocumentInvitation {
441
+ id: string;
442
+ user_id: string;
443
+ client_contact_id: string | null;
444
+ client_id: string | null;
445
+ company_id: string;
446
+ document_id: string;
447
+ message_id: string | null;
448
+ email_error: string | null;
449
+ entity: "contact" | "user";
450
+ signing_order?: number;
451
+ sent_date: string | null;
452
+ viewed_date: string | null;
453
+ opened_date: string | null;
454
+ signed_date: string | null;
455
+ ip_address: string | null;
456
+ created_at: string;
457
+ updated_at: string;
458
+ deleted_at: string | null;
459
+ user?: User;
460
+ company?: Company;
461
+ document?: Document_2;
462
+ contact?: ClientContact;
463
+ }
464
+
465
+ export declare interface DocumentSignature {
466
+ id: string;
467
+ document_id: string;
468
+ document_file_id: string;
469
+ client_contact_id: string;
470
+ user_id: string;
471
+ page_number: number;
472
+ coordinates: {
473
+ x: number;
474
+ y: number;
475
+ width: number;
476
+ height: number;
477
+ };
478
+ type: string;
479
+ value: string | null;
480
+ ip_address: string;
481
+ signed_at: string;
482
+ created_at: string;
483
+ updated_at: string;
484
+ user?: User;
485
+ contact?: ClientContact | null;
486
+ document?: Document_2;
487
+ file?: DocumentFile;
488
+ }
489
+
490
+ export declare enum DocumentStatus {
491
+ Draft = 1,
492
+ PendingApproval = 2,
493
+ Approved = 3,
494
+ Rejected = 4,
495
+ Sent = 5,
496
+ Completed = 6,
497
+ Expired = 7,
498
+ Voided = 8
499
+ }
500
+
501
+ export declare interface GenericManyResponse<T> {
502
+ data: T[];
503
+ links: {
504
+ first: string;
505
+ last: string;
506
+ prev: string | null;
507
+ next: string | null;
508
+ };
509
+ meta: {
510
+ current_page: number;
511
+ from: string | null;
512
+ last_page: number;
513
+ links: {
514
+ url: string | null;
515
+ label: string;
516
+ active: boolean;
517
+ }[];
518
+ path: string;
519
+ per_page: number;
520
+ to: string | null;
521
+ total: number;
522
+ };
523
+ }
524
+
525
+ export declare interface GenericSingleResponse<T> {
526
+ data: T;
527
+ }
528
+
529
+ export declare function getPasswordForPdf(file: File): Promise<string | null>;
530
+
531
+ export declare type ImportFromButtonProps = {
532
+ onClick: () => void;
533
+ isSubmitting: boolean;
534
+ };
535
+
536
+ declare type InputType = "signature" | "input" | "date" | "checkbox" | "initial" | "select" | "radio" | "multiselect" | "number";
537
+
538
+ export declare type InvitationWithToken = Document_2 & {
539
+ "X-Signer-Token"?: string;
540
+ "X-Signer-Token-Expires"?: string;
541
+ };
542
+
543
+ export declare function isPdfPasswordProtected(file: File): Promise<boolean>;
544
+
545
+ export declare interface Language {
546
+ id: string;
547
+ locale: string;
548
+ name: string;
549
+ }
550
+
551
+ export declare type MinimizeButtonProps = StartSigningButtonProps;
552
+
553
+ export declare type NavigateButtonProps = {
554
+ onClick: () => void;
555
+ disabled: boolean;
556
+ };
557
+
558
+ declare type NumberFormat = "123456789.567" | "$123,456,789.57" | "123 456 789,57 €" | "£123,456,789.57" | "123,456,789.567" | "123.456.789,567" | "123 456 789,567";
559
+
560
+ export declare const pdfjs: typeof lib;
561
+
562
+ export declare interface Plan {
563
+ id: string;
564
+ name: string;
565
+ description: string;
566
+ popular: boolean;
567
+ price: {
568
+ monthly: number;
569
+ yearly: number;
570
+ };
571
+ features: string[];
572
+ highlighted_features: string[];
573
+ }
574
+
575
+ /** Hey there, you! So you want to add a prop onto this interface huh? No probs, but PLEASE notify upstream that this interface has changed so we can update the types in all repos :) */
576
+ export declare type Rectangle = {
577
+ id: string;
578
+ label: string;
579
+ left: number;
580
+ top: number;
581
+ width: number;
582
+ height: number;
583
+ page: number;
584
+ signature: string | null;
585
+ type: InputType;
586
+ value: string | null;
587
+ file_id: string;
588
+ signatory_id: string;
589
+ color: string;
590
+ required: boolean;
591
+ options?: RectangleOptions;
592
+ show_label?: boolean;
593
+ };
594
+
595
+ declare type RectangleOptions = {
596
+ date?: {
597
+ format: DateFormat;
598
+ defaultToSigningDate: boolean;
599
+ };
600
+ input?: {
601
+ useDefaultValue: boolean;
602
+ defaultText: string;
603
+ validationRule: ValidationRule;
604
+ customRegex?: string;
605
+ minLength?: number;
606
+ maxLength?: number;
607
+ };
608
+ checkbox?: {
609
+ defaultValue: boolean;
610
+ };
611
+ initial?: {
612
+ useDefaultValue: boolean;
613
+ defaultText: string;
614
+ };
615
+ select?: {
616
+ options: SelectOption_2[];
617
+ defaultValue: string | null;
618
+ };
619
+ radio?: {
620
+ options: SelectOption_2[];
621
+ defaultValue: string | null;
622
+ };
623
+ multiselect?: {
624
+ options: SelectOption_2[];
625
+ defaultValues: string[];
626
+ };
627
+ number?: {
628
+ useDefaultValue: boolean;
629
+ defaultValue: number;
630
+ format: NumberFormat;
631
+ minValue?: number;
632
+ maxValue?: number;
633
+ decimalPlaces?: number;
634
+ };
635
+ };
636
+
637
+ export declare type RectangleSettingsCheckboxProps = {
638
+ id: string;
639
+ checked: boolean;
640
+ onChange: (checked: boolean) => void;
641
+ label: string;
642
+ };
643
+
644
+ export declare type RectangleSettingsDialogButtonProps = {
645
+ onClick: () => void;
646
+ label: string;
647
+ id?: string;
648
+ };
649
+
650
+ export declare type RectangleSettingsDialogProps = {
651
+ open: boolean;
652
+ onOpenChange: (open: boolean) => void;
653
+ title: React.ReactNode;
654
+ children: React.ReactNode;
655
+ };
656
+
657
+ export declare type RectangleSettingsInputProps = {
658
+ id: string;
659
+ type?: "text" | "number";
660
+ value: string | number;
661
+ onChange: (value: string) => void;
662
+ placeholder?: string;
663
+ maxLength?: number;
664
+ min?: number;
665
+ max?: number;
666
+ step?: string;
667
+ };
668
+
669
+ export declare type RectangleSettingsLabelProps = {
670
+ htmlFor: string;
671
+ children: React.ReactNode;
672
+ };
673
+
674
+ export declare type RectangleSettingsOptionItemProps = {
675
+ children: React.ReactNode;
676
+ };
677
+
678
+ export declare type RectangleSettingsOptionsListProps = {
679
+ id: string;
680
+ children: React.ReactNode;
681
+ };
682
+
683
+ export declare type RectangleSettingsRemoveButtonProps = {
684
+ onClick: () => void;
685
+ };
686
+
687
+ export declare type RectangleSettingsSelectProps = {
688
+ id: string;
689
+ value: string;
690
+ onChange: (value: string) => void;
691
+ children: React.ReactNode;
692
+ };
693
+
694
+ export declare function refetchInterval(expires: string): number;
695
+
696
+ export declare type SaveButtonProps = {
697
+ isSubmitting: boolean;
698
+ onClick: () => void;
699
+ };
700
+
701
+ declare type SelectOption = {
702
+ value: string;
703
+ label: string;
704
+ type: "contact" | "user";
705
+ entity: ClientContact | User;
706
+ };
707
+
708
+ declare type SelectOption_2 = {
709
+ id: string;
710
+ label: string;
711
+ value: string;
712
+ };
713
+
714
+ declare type SelectProps = {
715
+ onSelect: (id: string, type: "contact" | "user", entity: ClientContact | User, metadata?: Record<string, unknown>) => unknown;
716
+ value?: string;
717
+ };
718
+
719
+ export declare type SendButtonProps = {
720
+ onClick: () => void;
721
+ };
722
+
723
+ export declare type SendDialogButtonProps = {
724
+ isSubmitting: boolean;
725
+ };
726
+
727
+ export declare type SendDialogProps = {
728
+ open: boolean;
729
+ onOpenChange: (open: boolean) => void;
730
+ content: React.ReactNode;
731
+ action: React.ReactNode;
732
+ };
733
+
734
+ export declare function Sign(): JSX_2.Element;
735
+
736
+ export declare type Sign = {
737
+ document: string;
738
+ invitation: string;
739
+ sig?: string;
740
+ endpoint?: string;
741
+ components: {
742
+ start: React.ComponentType<StartSigningButtonProps>;
743
+ minimize: React.ComponentType<MinimizeButtonProps>;
744
+ submit: React.ComponentType<SubmitButtonProps>;
745
+ dateInput: React.ComponentType<DateInputProps>;
746
+ success: React.ComponentType<SuccessProps>;
747
+ card: {
748
+ card: React.ComponentType<SignCardProps>;
749
+ };
750
+ signatureSelector: {
751
+ dialog: React.ComponentType<SignatureSelectorDialogProps>;
752
+ input: React.ComponentType<SignatureSelectorInputProps>;
753
+ button: React.ComponentType<SignatureSelectorButtonProps>;
754
+ clear: React.ComponentType<SignatureSelectorButtonProps>;
755
+ useSignature: React.ComponentType<SignatureSelectorButtonProps>;
756
+ };
757
+ next: React.ComponentType<NavigateButtonProps>;
758
+ previous: React.ComponentType<NavigateButtonProps>;
759
+ consent?: {
760
+ screen: React.ComponentType<ConsentScreenProps>;
761
+ download: React.ComponentType<ConsentDownloadButtonProps>;
762
+ continue: React.ComponentType<ConsentContinueButtonProps>;
763
+ };
764
+ };
765
+ styles: Builder["styles"];
766
+ company?: string;
767
+ };
768
+
769
+ export declare type SignatorySelectorProps = {
770
+ results: SelectOption[];
771
+ onSelect: SelectProps["onSelect"];
772
+ value: SelectProps["value"];
773
+ setCreateDialogOpen: (open: boolean) => void;
774
+ trigger?: React.ReactNode;
775
+ signatories: TSignatory[];
776
+ };
777
+
778
+ export declare type SignatorySwapProps = SignatorySelectorProps;
779
+
780
+ export declare type SignatureSelectorButtonProps = {
781
+ onClick: () => void;
782
+ };
783
+
784
+ export declare type SignatureSelectorDialogProps = {
785
+ isOpen: boolean;
786
+ onOpenChange: (isOpen: boolean) => void;
787
+ trigger: React.ReactNode;
788
+ input: React.ReactNode;
789
+ content: React.ReactNode;
790
+ useSignatureButton: React.ReactNode;
791
+ };
792
+
793
+ export declare type SignatureSelectorInputProps = {
794
+ value: string;
795
+ onChange: (value: string) => void;
796
+ };
797
+
798
+ export declare type SignCardFooterProps = {
799
+ toggled: boolean;
800
+ };
801
+
802
+ export declare type SignCardHeaderProps = {
803
+ toggled: boolean;
804
+ next: React.ReactNode;
805
+ previous: React.ReactNode;
806
+ };
807
+
808
+ export declare type SignCardNextButtonProps = {
809
+ onClick: () => void;
810
+ disabled: boolean;
811
+ };
812
+
813
+ export declare type SignCardProps = {
814
+ headerRef: RefObject<HTMLDivElement>;
815
+ contentRef: RefObject<HTMLDivElement>;
816
+ footerRef: RefObject<HTMLDivElement>;
817
+ header: React.ReactNode;
818
+ content: React.ReactNode;
819
+ footer: React.ReactNode;
820
+ hasSignature: boolean;
821
+ toggled: boolean;
822
+ };
823
+
824
+ export declare const SignContext: Context<Sign | null>;
825
+
826
+ export declare const SignContextPlus: Context<(Sign & {
827
+ http: Axios;
828
+ }) | null>;
829
+
830
+ export declare type SignProps = {
831
+ document: Document_2;
832
+ invitation: DocumentInvitation;
833
+ };
834
+
835
+ export declare type StartSigningButtonProps = {
836
+ onClick: () => void;
837
+ };
838
+
839
+ export declare type SubmitButtonProps = {
840
+ disabled: boolean;
841
+ isSubmitting: boolean;
842
+ onClick: () => void;
843
+ };
844
+
845
+ export declare type SuccessProps = {
846
+ closeTab: () => void;
847
+ };
848
+
849
+ export declare interface Template {
850
+ id: string;
851
+ name: string;
852
+ subject: string;
853
+ body: string;
854
+ type_id: number;
855
+ }
856
+
857
+ export declare interface Timezone {
858
+ id: string;
859
+ location: string;
860
+ name: string;
861
+ utc_offset: number;
862
+ }
863
+
864
+ export declare type ToolboxContextProps = {
865
+ options?: ToolboxOption[];
866
+ rectangle: Rectangle;
867
+ };
868
+
869
+ declare type ToolboxOption = {
870
+ label: string;
871
+ type: "toggle" | "button";
872
+ children: ToolboxOption[];
873
+ value: unknown;
874
+ onSelect: (value: unknown) => void;
875
+ };
876
+
877
+ declare type TSignatory = {
878
+ id: string;
879
+ color: string;
880
+ type: TSignatoryType;
881
+ signing_order?: number;
882
+ metadata?: Record<string, unknown>;
883
+ };
884
+
885
+ declare type TSignatoryType = "contact" | "user" | "blueprint";
886
+
887
+ export declare type UninviteDialogButtonProps = {
888
+ isSubmitting: boolean;
889
+ form: string;
890
+ };
891
+
892
+ export declare type UninviteDialogProps = {
893
+ open: boolean;
894
+ onOpenChange: (open: boolean) => void;
895
+ content: React.ReactNode;
896
+ action: React.ReactNode;
897
+ };
898
+
899
+ export declare type UploadDialogProps = {
900
+ open: boolean;
901
+ onOpenChange: (open: boolean) => void;
902
+ content: React.ReactNode;
903
+ };
904
+
905
+ export declare type UploadProps = {
906
+ onClick: () => void;
907
+ };
908
+
909
+ export declare function useBuilderContext(): Builder;
910
+
911
+ export declare function useBuilderContextPlus(): Builder & {
912
+ http: Axios;
913
+ };
914
+
915
+ export declare interface User {
916
+ id: string;
917
+ account_id: string | null;
918
+ first_name: string | null;
919
+ last_name: string | null;
920
+ phone_number: string | null;
921
+ email: string;
922
+ phone_number_verified: boolean;
923
+ is_deleted: boolean;
924
+ referral_code: string | null;
925
+ oauth_user_id: string | null;
926
+ oauth_user_token: string | null;
927
+ oauth_provider_id: string | null;
928
+ google_2fa_secret: string | null;
929
+ accepted_terms_version: string | null;
930
+ avatar: string;
931
+ e_signature: string | null;
932
+ e_initials: string | null;
933
+ created_at: string;
934
+ updated_at: string;
935
+ deleted_at: string | null;
936
+ email_verified_at: string | null;
937
+ companies?: Company[];
938
+ account: Account | null;
939
+ }
940
+
941
+ export declare function useSignContext(): Sign;
942
+
943
+ export declare function useSignContextPlus(): Sign & {
944
+ http: Axios;
945
+ };
946
+
947
+ export declare interface ValidationBag {
948
+ message: string;
949
+ errors: Record<string, string[]>;
950
+ }
951
+
952
+ export declare type ValidationErrorsProps = {
953
+ content: React.ReactNode;
954
+ };
955
+
956
+ declare type ValidationRule = "none" | "length" | "ssn" | "ein" | "email" | "url" | "zip" | "numbers_only" | "letters_only" | "custom";
957
+
958
+ export declare type WithSignerToken<T> = T & {
959
+ "X-Signer-Token": string;
960
+ "X-Signer-Token-Expires": string;
961
+ };
962
+
963
+ export { }