@docuninja/builder2.0 0.0.65 → 0.0.66

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 (61) hide show
  1. package/dist/builder.es.js +27364 -21714
  2. package/package.json +2 -4
  3. package/dist/builder/builder-store.d.ts +0 -54
  4. package/dist/builder/cache-store.d.ts +0 -12
  5. package/dist/builder/component-types.d.ts +0 -149
  6. package/dist/builder/helpers.d.ts +0 -9
  7. package/dist/builder/hooks/use-cookie-consent-height.d.ts +0 -1
  8. package/dist/builder/hooks/use-label-position.d.ts +0 -3
  9. package/dist/builder/index.d.ts +0 -97
  10. package/dist/builder/password-files.d.ts +0 -3
  11. package/dist/builder/pdf-worker.d.ts +0 -2
  12. package/dist/builder/root.d.ts +0 -2
  13. package/dist/builder/sensor.d.ts +0 -14
  14. package/dist/builder/sign/actions.d.ts +0 -21
  15. package/dist/builder/sign/checkbox-panel.d.ts +0 -5
  16. package/dist/builder/sign/component-types.d.ts +0 -68
  17. package/dist/builder/sign/consent.d.ts +0 -7
  18. package/dist/builder/sign/date-panel.d.ts +0 -5
  19. package/dist/builder/sign/file.d.ts +0 -10
  20. package/dist/builder/sign/font-selector.d.ts +0 -6
  21. package/dist/builder/sign/fonts.d.ts +0 -1
  22. package/dist/builder/sign/index.d.ts +0 -50
  23. package/dist/builder/sign/initials-panel.d.ts +0 -5
  24. package/dist/builder/sign/initials-signature-panel.d.ts +0 -6
  25. package/dist/builder/sign/multiselect-panel.d.ts +0 -5
  26. package/dist/builder/sign/number-panel.d.ts +0 -5
  27. package/dist/builder/sign/radio-panel.d.ts +0 -5
  28. package/dist/builder/sign/select-panel.d.ts +0 -5
  29. package/dist/builder/sign/sign-panel.d.ts +0 -5
  30. package/dist/builder/sign/signature.d.ts +0 -6
  31. package/dist/builder/sign/success.d.ts +0 -3
  32. package/dist/builder/sign/text-panel.d.ts +0 -5
  33. package/dist/builder/sign/voided.d.ts +0 -1
  34. package/dist/builder/sign-store.d.ts +0 -49
  35. package/dist/builder/standalone.d.ts +0 -13
  36. package/dist/builder/types/api.d.ts +0 -352
  37. package/dist/builder/ui/delete.d.ts +0 -7
  38. package/dist/builder/ui/document.d.ts +0 -5
  39. package/dist/builder/ui/editable.d.ts +0 -7
  40. package/dist/builder/ui/files.d.ts +0 -6
  41. package/dist/builder/ui/frame.d.ts +0 -1
  42. package/dist/builder/ui/index.d.ts +0 -124
  43. package/dist/builder/ui/index.iife.d.ts +0 -2
  44. package/dist/builder/ui/options-modal.d.ts +0 -11
  45. package/dist/builder/ui/preview.d.ts +0 -7
  46. package/dist/builder/ui/rectangles.d.ts +0 -9
  47. package/dist/builder/ui/save.d.ts +0 -11
  48. package/dist/builder/ui/send-confirmation.d.ts +0 -9
  49. package/dist/builder/ui/settings-modal.d.ts +0 -10
  50. package/dist/builder/ui/signatories.d.ts +0 -23
  51. package/dist/builder/ui/signatory.d.ts +0 -51
  52. package/dist/builder/ui/title.d.ts +0 -7
  53. package/dist/builder/ui/toolbox-context.d.ts +0 -14
  54. package/dist/builder/ui/toolbox.d.ts +0 -3
  55. package/dist/builder/ui/upload.d.ts +0 -16
  56. package/dist/builder/ui/validation-errors.d.ts +0 -5
  57. package/dist/builder/ui/websockets.d.ts +0 -38
  58. package/dist/builder/websocket-manager.d.ts +0 -75
  59. package/dist/builder/websockets-store.d.ts +0 -20
  60. package/dist/builder.iife.js +0 -294
  61. package/dist/builder2.0.css +0 -1
@@ -1,51 +0,0 @@
1
- import { DraggableAttributes } from '@dnd-kit/core';
2
- import { SyntheticListenerMap } from '@dnd-kit/core/dist/hooks/utilities';
3
- import { FieldValues } from 'react-hook-form';
4
- import { ClientContact, User as TUser } from '../types/api';
5
- import { TSignatoryType } from '..';
6
- export declare function SortableSignatory(props: Omit<SignatoryProps, "isSorting" | "setNodeRef" | "style" | "dragHandleListeners" | "dragHandleAttributes">): import("@emotion/react/jsx-runtime").JSX.Element;
7
- type SignatoryProps = {
8
- id: string;
9
- type: TSignatoryType;
10
- onDelete: (id: string, type: SignatoryProps["type"]) => void;
11
- isSorting: boolean;
12
- setNodeRef: (element: HTMLElement | null) => void;
13
- style: React.CSSProperties;
14
- dragHandleListeners: SyntheticListenerMap | undefined;
15
- dragHandleAttributes: DraggableAttributes;
16
- };
17
- export declare function Signatory({ id, type, onDelete, isSorting, setNodeRef, style, dragHandleAttributes, dragHandleListeners, }: SignatoryProps): import("@emotion/react/jsx-runtime").JSX.Element;
18
- type SignatorySwapProps = {
19
- current: string;
20
- currentType: SignatoryProps["type"];
21
- };
22
- export declare function SignatorySwap({ current, currentType }: SignatorySwapProps): import("@emotion/react/jsx-runtime").JSX.Element;
23
- export declare function useSignatories(): ({
24
- value: string;
25
- label: string;
26
- type: "contact";
27
- entity: ClientContact;
28
- } | {
29
- value: string;
30
- label: string;
31
- type: "user";
32
- entity: TUser;
33
- })[];
34
- type NameProps = {
35
- id: string;
36
- type: SignatoryProps["type"];
37
- };
38
- export declare function Name({ id, type }: NameProps): string | import("@emotion/react/jsx-runtime").JSX.Element | undefined;
39
- export declare function Create(): import("@emotion/react/jsx-runtime").JSX.Element;
40
- export type CreateDialogTabProps = {
41
- setOpen: (open: boolean) => void;
42
- endpoint: string;
43
- };
44
- export type CreateDialogFieldProps<T extends FieldValues> = {
45
- name: keyof T;
46
- type: HTMLInputElement["type"];
47
- onValueChange: (v: unknown) => void;
48
- };
49
- export declare function Entity({ setOpen, endpoint }: CreateDialogTabProps): import("@emotion/react/jsx-runtime").JSX.Element;
50
- export declare function SignatoryWarning(): null;
51
- export {};
@@ -1,7 +0,0 @@
1
- import { Blueprint, Document } from '../types/api';
2
- type TitleProps = {
3
- document: Document;
4
- blueprint: Blueprint | null;
5
- };
6
- export declare function Title({ document, blueprint }: TitleProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,14 +0,0 @@
1
- import { Rectangle } from '..';
2
- export type ToolboxOption = {
3
- label: string;
4
- type: "toggle" | "button";
5
- children: ToolboxOption[];
6
- value: unknown;
7
- onSelect: (value: unknown) => void;
8
- };
9
- type ToolboxContextType = {
10
- rectangle: Rectangle;
11
- };
12
- export declare const rectanglesWithAttention: string[];
13
- export declare function ToolboxContext({ rectangle }: ToolboxContextType): import("@emotion/react/jsx-runtime").JSX.Element;
14
- export {};
@@ -1,3 +0,0 @@
1
- export type InputType = "signature" | "input" | "date" | "checkbox" | "initial" | "select" | "radio" | "multiselect" | "number";
2
- export declare function Toolbox(): import("@emotion/react/jsx-runtime").JSX.Element | null;
3
- export declare function Helper(): import("@emotion/react/jsx-runtime").JSX.Element | null;
@@ -1,16 +0,0 @@
1
- import { Document } from '../types/api';
2
- type FileProps = {
3
- document: Document;
4
- isDialogOpen: boolean;
5
- setIsDialogOpen: (open: boolean) => void;
6
- };
7
- export type UploadForm = {
8
- files: File[];
9
- };
10
- export declare function Upload({ document, isDialogOpen, setIsDialogOpen }: FileProps): import("@emotion/react/jsx-runtime").JSX.Element;
11
- type UploadWidgetProps = {
12
- document: Document;
13
- onComplete?: () => void;
14
- };
15
- export declare function UploadWidget({ document, onComplete }: UploadWidgetProps): import("@emotion/react/jsx-runtime").JSX.Element;
16
- export {};
@@ -1,5 +0,0 @@
1
- import { ValidationBag } from '../types/api';
2
- export type ValidationErrorProps = {
3
- bag: ValidationBag;
4
- };
5
- export declare function ValidationErrors({ bag }: ValidationErrorProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
@@ -1,38 +0,0 @@
1
- type Props = {
2
- children: React.ReactNode;
3
- context: "builder" | "sign";
4
- };
5
- /**
6
- * WebSockets Component (Refactored to use Singleton Manager)
7
- *
8
- * This component now acts as a thin wrapper that:
9
- * 1. Initializes the singleton WebSocket manager
10
- * 2. Updates the Zustand store with the connection instance
11
- * 3. Manages component lifecycle (connect/disconnect on mount/unmount)
12
- */
13
- export declare function WebSockets({ children, context }: Props): import("@emotion/react/jsx-runtime").JSX.Element | null;
14
- export declare const events: readonly ["App\\Events\\DocumentFile\\DocumentFilePreviewGenerated"];
15
- export type Event = (typeof events)[number];
16
- export type Callbacks = Record<Event, (data: unknown) => unknown>;
17
- export type UsePrivateSocketEventsProps = {
18
- context: "builder" | "sign";
19
- };
20
- export declare function usePrivateSocketEvents({ context, }: UsePrivateSocketEventsProps): null;
21
- export interface CallbackOptions<T> {
22
- event: Event;
23
- data: T;
24
- }
25
- export interface SocketEventProps<T> {
26
- on: Event | Event[];
27
- callback: (options: CallbackOptions<T>) => unknown;
28
- }
29
- export type WithSocketId<T> = T & {
30
- "x-socket-id": string;
31
- };
32
- export declare function useSocketEvent<T>({ on, callback }: SocketEventProps<T>): void;
33
- export declare function socketId(): number | null;
34
- export interface GenericMessage {
35
- message: string;
36
- link: string | null;
37
- }
38
- export {};
@@ -1,75 +0,0 @@
1
- import { default as Pusher } from 'pusher-js';
2
- type PusherError = {
3
- error?: {
4
- type: string;
5
- data: {
6
- code?: number;
7
- message?: string;
8
- };
9
- };
10
- };
11
- type ConnectionConfig = {
12
- context: "builder" | "sign";
13
- token: string;
14
- onConnected?: () => void;
15
- onError?: (error: PusherError) => void;
16
- };
17
- /**
18
- * Singleton WebSocket Manager
19
- *
20
- * Ensures only one Pusher connection exists across the entire application.
21
- * Manages connections for both "builder" and "sign" contexts.
22
- *
23
- * Handles React StrictMode double-mounting by checking connection state before creating new instances.
24
- */
25
- declare class WebSocketManager {
26
- private static instance;
27
- private pusher;
28
- private activeContexts;
29
- private connectionConfig;
30
- private isConnecting;
31
- private readonly pusherKey;
32
- private readonly pusherUrl;
33
- private constructor();
34
- /**
35
- * Get the singleton instance
36
- */
37
- static getInstance(): WebSocketManager;
38
- /**
39
- * Connect to Pusher for a specific context
40
- *
41
- * This method is idempotent - calling it multiple times will reuse the existing connection.
42
- * Prevents race conditions from StrictMode double-mounting or rapid successive calls.
43
- */
44
- connect(config: ConnectionConfig): Pusher;
45
- /**
46
- * Create a new Pusher connection
47
- */
48
- private createPusherConnection;
49
- /**
50
- * Disconnect from Pusher
51
- */
52
- disconnect(): void;
53
- /**
54
- * Get the current Pusher instance
55
- */
56
- getPusher(): Pusher | null;
57
- /**
58
- * Check if connected
59
- */
60
- isConnected(): boolean;
61
- /**
62
- * Remove a context from active contexts (for feedback/debugging only)
63
- *
64
- * NOTE: This method no longer disconnects the connection.
65
- * The singleton connection should persist across navigation.
66
- * Use disconnect() explicitly if you need to close the connection.
67
- */
68
- removeContext(context: "builder" | "sign"): void;
69
- /**
70
- * Update connection configuration (e.g., when token changes)
71
- */
72
- updateConnection(config: Partial<ConnectionConfig>): void;
73
- }
74
- export declare const getWebSocketManager: () => WebSocketManager;
75
- export type { ConnectionConfig };
@@ -1,20 +0,0 @@
1
- import { default as Pusher } from 'pusher-js';
2
- type State = {
3
- pusher: Pusher | null;
4
- /**
5
- * @deprecated connections array is no longer used with singleton pattern.
6
- * Kept for backwards compatibility but will always be empty.
7
- */
8
- connections: Pusher[];
9
- };
10
- type Actions = {
11
- setPusher: (pusher: Pusher | null) => void;
12
- /**
13
- * @deprecated setConnections is no longer needed with singleton pattern.
14
- * Kept for backwards compatibility but is a no-op.
15
- */
16
- setConnections: (connections: Pusher[]) => void;
17
- };
18
- export type WebSocketsStore = State & Actions;
19
- export declare const useWebSocketStore: import('zustand').UseBoundStore<import('zustand').StoreApi<WebSocketsStore>>;
20
- export {};