@unlev/exeq 0.1.4 → 0.1.6

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/README.md CHANGED
@@ -71,6 +71,7 @@ function Signer() {
71
71
  | `initialValues` | `Record<string, string>` | No | Pre-fill fields by label (case-insensitive) or ID |
72
72
  | `callbackUrl` | `string` | No | URL to POST the signed PDF to |
73
73
  | `onComplete` | `(blob: Blob) => void` | No | Callback with the signed PDF Blob |
74
+ | `submitLabel` | `string` | No | Label for the submit button (default: `"Complete"`) |
74
75
 
75
76
  ### Utilities
76
77
 
package/dist/index.css CHANGED
@@ -733,6 +733,10 @@
733
733
  border-radius: 4px;
734
734
  background: #fff;
735
735
  cursor: crosshair;
736
+ width: 100%;
737
+ height: auto;
738
+ display: block;
739
+ box-sizing: border-box;
736
740
  }
737
741
  .signature-canvas-actions {
738
742
  display: flex;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/styles/pdf-builder.css"],"sourcesContent":["/* ── Layout ────────────────────────────────── */\n\n.designer-layout,\n.signer-layout {\n display: flex;\n flex-direction: column;\n height: 100vh;\n font-family: system-ui, -apple-system, sans-serif;\n color: #222;\n background: #fafafa;\n}\n\n/* ── Designer Header ─────────────────────── */\n\n.designer-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n padding: 0 1rem;\n height: 48px;\n border-bottom: 1px solid #e5e5e5;\n background: #fff;\n gap: 0.5rem;\n flex-shrink: 0;\n}\n\n.designer-header-right {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.header-btn {\n padding: 0.4rem 1rem;\n border: 1px solid transparent;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.85rem;\n font-weight: 500;\n white-space: nowrap;\n line-height: 1.4;\n box-sizing: border-box;\n}\n\n.header-btn-primary {\n background: #111;\n color: #fff;\n border-color: #111;\n}\n.header-btn-primary:hover { background: #333; border-color: #333; }\n\n.header-btn-outline {\n background: #fff;\n color: #555;\n border-color: #ccc;\n}\n.header-btn-outline:hover { background: #f5f5f5; border-color: #999; }\n\n/* ── Designer Body (3-column) ────────────── */\n\n.designer-body {\n display: flex;\n flex: 1;\n overflow: hidden;\n}\n\n/* ── Left Palette ────────────────────────── */\n\n.designer-palette {\n width: 140px;\n flex-shrink: 0;\n border-right: 1px solid #e5e5e5;\n background: #fff;\n padding: 0.75rem 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n overflow-y: auto;\n}\n\n.palette-heading {\n font-size: 0.7rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: #999;\n padding: 0 0.75rem 0.5rem;\n}\n\n.palette-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 0.75rem;\n cursor: grab;\n font-size: 0.85rem;\n color: #555;\n border-left: 3px solid transparent;\n transition: all 0.1s;\n user-select: none;\n}\n\n.palette-item:hover {\n background: #f5f5f5;\n color: #222;\n}\n\n.palette-item.active {\n background: #f0f0f0;\n color: #111;\n border-left-color: #111;\n font-weight: 500;\n}\n\n.palette-item:active {\n cursor: grabbing;\n}\n\n.palette-item-icon {\n width: 22px;\n text-align: center;\n font-size: 0.9rem;\n flex-shrink: 0;\n}\n\n.palette-item-label {\n flex: 1;\n}\n\n.palette-divider {\n height: 1px;\n background: #e5e5e5;\n margin: 0.5rem 0.75rem;\n}\n\n.palette-role-section {\n padding: 0 0.75rem;\n display: flex;\n flex-direction: column;\n gap: 0.35rem;\n}\n\n.palette-role-select {\n width: 100%;\n padding: 0.3rem 0.4rem;\n border: 1.5px solid #ddd;\n border-radius: 4px;\n font-size: 0.8rem;\n font-weight: 500;\n background: #fff;\n cursor: pointer;\n}\n\n.palette-role-add-link {\n background: none;\n border: none;\n cursor: pointer;\n font-size: 0.75rem;\n color: #888;\n padding: 0;\n text-align: left;\n}\n.palette-role-add-link:hover { color: #555; }\n\n.palette-role-add-inline {\n display: flex;\n flex-wrap: wrap;\n gap: 0.25rem;\n}\n\n.palette-role-add-inline input {\n width: 100%;\n padding: 0.25rem 0.4rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n font-size: 0.75rem;\n}\n\n.palette-role-add-inline button {\n padding: 0.2rem 0.4rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n background: #fff;\n cursor: pointer;\n font-size: 0.75rem;\n}\n\n/* ── Signer toolbar (kept for backward compat) ── */\n\n.designer-toolbar {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0.5rem 1rem;\n border-bottom: 1px solid #e5e5e5;\n background: #fff;\n gap: 1rem;\n flex-wrap: wrap;\n}\n\n.toolbar-left,\n.toolbar-right {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.signer-content {\n display: flex;\n flex: 1;\n overflow: hidden;\n}\n\n.designer-pdf-area,\n.signer-pdf-area {\n flex: 1;\n overflow-y: auto;\n padding: 1rem;\n background: #eee;\n}\n\n.designer-panel,\n.signer-panel {\n width: 320px;\n overflow-y: auto;\n border-left: 1px solid #e5e5e5;\n background: #fff;\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n/* ── Panel Resize Handle ─────────────────── */\n\n.panel-resize-handle {\n width: 5px;\n cursor: col-resize;\n background: transparent;\n flex-shrink: 0;\n position: relative;\n z-index: 20;\n margin-right: -5px;\n transition: background 0.15s;\n}\n\n.panel-resize-handle:hover,\n.panel-resize-handle:active {\n background: #d0d0d0;\n}\n\n/* ── Ink Color Picker ────────────────────── */\n\n.ink-color-picker {\n display: flex;\n gap: 0.4rem;\n align-items: center;\n}\n\n.ink-color-swatch {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n border: 2px solid transparent;\n cursor: pointer;\n padding: 0;\n transition: border-color 0.1s;\n}\n\n.ink-color-swatch.active {\n border-color: #111;\n box-shadow: 0 0 0 2px #fff, 0 0 0 3px #111;\n}\n\n.ink-color-swatch:hover:not(.active) {\n border-color: #999;\n}\n\n/* ── Panel Role Selector ─────────────────── */\n\n.panel-role-section {\n padding: 0.75rem 1rem;\n border-bottom: 1px solid #eee;\n}\n\n.panel-role-label {\n display: block;\n font-size: 0.7rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: #999;\n margin-bottom: 0.35rem;\n}\n\n.panel-role-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n flex-wrap: wrap;\n}\n\n.panel-role-select {\n padding: 0.3rem 0.5rem;\n border: 1.5px solid #ddd;\n border-radius: 4px;\n font-size: 0.85rem;\n font-weight: 500;\n background: #fff;\n cursor: pointer;\n min-width: 100px;\n}\n\n.panel-role-add-link {\n background: none;\n border: none;\n cursor: pointer;\n font-size: 0.8rem;\n color: #888;\n padding: 0;\n white-space: nowrap;\n}\n.panel-role-add-link:hover { color: #555; }\n\n.panel-role-add-inline {\n display: flex;\n gap: 0.25rem;\n align-items: center;\n flex: 1;\n}\n\n.panel-role-add-inline input {\n padding: 0.25rem 0.4rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n font-size: 0.8rem;\n width: 90px;\n}\n\n.panel-role-add-inline button {\n padding: 0.25rem 0.5rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n background: #fff;\n cursor: pointer;\n font-size: 0.8rem;\n}\n\n/* ── Panel Tabs ──────────────────────────── */\n\n.panel-tabs {\n display: flex;\n border-bottom: 1px solid #e5e5e5;\n flex-shrink: 0;\n}\n\n.panel-tab {\n flex: 1;\n padding: 0.55rem 0;\n background: none;\n border: none;\n border-bottom: 2px solid transparent;\n cursor: pointer;\n font-size: 0.8rem;\n color: #888;\n font-weight: 500;\n text-align: center;\n transition: all 0.1s;\n}\n\n.panel-tab.active {\n color: #111;\n border-bottom-color: #111;\n}\n\n.panel-tab:hover:not(.active) {\n color: #555;\n}\n\n.panel-tab-content {\n flex: 1;\n overflow-y: auto;\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n}\n\n/* ── PDF Viewer ───────────────────────────── */\n\n.pdf-viewer {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n align-items: center;\n}\n\n.pdf-page {\n position: relative;\n width: 100%;\n max-width: 800px;\n background: #fff;\n box-shadow: 0 1px 4px rgba(0,0,0,0.1);\n cursor: crosshair;\n}\n\n.pdf-page-image {\n width: 100%;\n height: 100%;\n display: block;\n pointer-events: none;\n}\n\n/* ── Field Overlays ───────────────────────── */\n\n.field-overlay {\n position: absolute;\n border: 1.5px solid;\n border-radius: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n transition: box-shadow 0.1s;\n}\n\n.field-overlay.selected {\n box-shadow: 0 0 0 2px rgba(0,0,0,0.2);\n z-index: 10;\n}\n\n.field-overlay.editable {\n cursor: text;\n}\n\n.field-overlay-label {\n position: absolute;\n top: -18px;\n left: -1px;\n font-size: 10px;\n color: #fff;\n padding: 1px 6px;\n border-radius: 2px 2px 0 0;\n white-space: nowrap;\n pointer-events: none;\n}\n\n.field-overlay-placeholder {\n color: #999;\n font-size: 11px;\n padding: 2px 4px;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n\n.field-overlay-placeholder.readonly {\n color: #666;\n}\n\n.field-overlay-value {\n font-size: 11px;\n padding: 2px 4px;\n width: 100%;\n}\n\n.field-inline-input {\n width: 100%;\n height: 100%;\n border: none;\n background: transparent;\n padding: 2px 4px;\n outline: none;\n font-family: inherit;\n}\n\n.field-signature-preview {\n width: 100%;\n height: 100%;\n object-fit: contain;\n}\n\n.field-signature-filled {\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n\n.field-checkbox-display {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n font-weight: bold;\n}\n\n.field-checkbox-display.editable {\n cursor: pointer;\n}\n\n.field-resize-handle {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 10px;\n height: 10px;\n background: #fff;\n border: 1px solid #999;\n cursor: nwse-resize;\n}\n\n/* ── Buttons ──────────────────────────────── */\n\n.upload-btn {\n display: inline-block;\n padding: 0.4rem 1rem;\n background: #111;\n color: #fff;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.85rem;\n font-weight: 500;\n}\n\n.upload-btn:hover { background: #333; }\n\n.upload-btn-small { font-size: 0.8rem; padding: 0.3rem 0.75rem; background: #555; }\n.upload-btn-large { font-size: 1rem; padding: 0.6rem 1.5rem; }\n\n.export-btn {\n padding: 0.4rem 1rem;\n background: #111;\n color: #fff;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.85rem;\n font-weight: 500;\n}\n\n.export-btn:hover { background: #333; }\n\n.field-type-selector {\n display: flex;\n gap: 2px;\n}\n\n.field-type-btn {\n padding: 0.3rem 0.6rem;\n background: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.8rem;\n color: #555;\n}\n\n.field-type-btn.active {\n background: #111;\n color: #fff;\n border-color: #111;\n}\n\n.field-type-btn:hover:not(.active) {\n background: #f5f5f5;\n}\n\n/* ── Signer Roles (legacy chip style) ─────── */\n\n.signer-role-selector {\n padding: 0.5rem 1rem;\n border-bottom: 1px solid #e5e5e5;\n background: #fff;\n}\n\n.signer-role-label {\n font-size: 0.75rem;\n color: #888;\n margin-bottom: 0.35rem;\n}\n\n.signer-role-list {\n display: flex;\n gap: 0.35rem;\n flex-wrap: wrap;\n align-items: center;\n}\n\n.signer-role-chip {\n padding: 0.2rem 0.6rem;\n border: 1.5px solid;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.8rem;\n font-weight: 500;\n background: transparent;\n transition: all 0.1s;\n}\n\n.signer-role-remove {\n margin-left: 0.3rem;\n cursor: pointer;\n font-size: 1rem;\n}\n\n.signer-role-add-btn {\n padding: 0.2rem 0.5rem;\n border: 1px dashed #ccc;\n border-radius: 4px;\n background: none;\n cursor: pointer;\n font-size: 0.8rem;\n color: #888;\n}\n\n.signer-role-add-input {\n display: flex;\n gap: 0.25rem;\n align-items: center;\n}\n\n.signer-role-add-input input {\n padding: 0.2rem 0.4rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n font-size: 0.8rem;\n width: 120px;\n}\n\n.signer-role-add-input button {\n padding: 0.2rem 0.5rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n background: #fff;\n cursor: pointer;\n font-size: 0.8rem;\n}\n\n/* ── Property Panel ───────────────────────── */\n\n.field-property-panel {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n}\n\n.panel-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.panel-header h3 {\n margin: 0;\n font-size: 1rem;\n}\n\n.panel-delete-btn {\n padding: 0.2rem 0.5rem;\n background: none;\n border: 1px solid #e44;\n color: #e44;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.8rem;\n}\n\n.panel-delete-btn:hover {\n background: #e44;\n color: #fff;\n}\n\n.panel-field label {\n display: block;\n font-size: 0.75rem;\n color: #888;\n margin-bottom: 0.2rem;\n}\n\n.panel-field input[type=\"text\"],\n.panel-field input[type=\"number\"],\n.panel-field input[type=\"email\"],\n.panel-field input[type=\"tel\"],\n.panel-field input[type=\"date\"],\n.panel-field select {\n width: 100%;\n padding: 0.35rem 0.5rem;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 0.85rem;\n background: #fff;\n}\n\n.panel-field-group {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 0.5rem;\n}\n\n.panel-checkbox-label {\n display: flex;\n align-items: center;\n gap: 0.4rem;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.panel-empty {\n color: #888;\n font-size: 0.85rem;\n padding: 2rem 0.5rem;\n text-align: center;\n}\n\n/* ── Pre-fill ─────────────────────────────── */\n\n.prefill-section {\n border-top: 1px solid #eee;\n padding-top: 0.75rem;\n}\n\n.prefill-section h4 {\n margin: 0 0 0.5rem;\n font-size: 0.85rem;\n color: #555;\n}\n\n.prefill-input {\n width: 100%;\n padding: 0.35rem 0.5rem;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 0.85rem;\n}\n\n/* ── Field List ───────────────────────────── */\n\n.field-list {\n display: flex;\n flex-direction: column;\n}\n\n.field-list h4 {\n margin: 0 0 0.5rem;\n font-size: 0.85rem;\n color: #555;\n}\n\n.field-list-item {\n display: flex;\n align-items: center;\n gap: 0.4rem;\n padding: 0.35rem 0.5rem;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.8rem;\n}\n\n.field-list-item:hover { background: #f5f5f5; }\n.field-list-item.active { background: #eee; }\n\n.field-list-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.field-list-name {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.field-list-page {\n color: #aaa;\n font-size: 0.75rem;\n}\n\n.field-list-required {\n color: #e44;\n font-weight: bold;\n}\n\n/* ── Signer Panel ─────────────────────────── */\n\n.signer-field-input h3 {\n margin: 0 0 0.5rem;\n font-size: 1rem;\n}\n\n.required-badge {\n display: inline-block;\n font-size: 0.7rem;\n background: #fee;\n color: #c33;\n padding: 1px 6px;\n border-radius: 3px;\n margin-bottom: 0.5rem;\n}\n\n.signer-text-input {\n width: 100%;\n padding: 0.4rem 0.5rem;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 0.9rem;\n}\n\n.signer-checkbox-label {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n font-size: 0.9rem;\n cursor: pointer;\n}\n\n.signer-date-display {\n font-size: 0.9rem;\n color: #555;\n padding: 0.4rem 0;\n}\n\n.signer-field-readonly {\n color: #888;\n font-size: 0.85rem;\n}\n\n.signer-field-readonly h3 {\n margin: 0 0 0.25rem;\n font-size: 1rem;\n color: #555;\n}\n\n/* ── Signature Canvas ─────────────────────── */\n\n.signature-canvas-wrapper {\n display: flex;\n flex-direction: column;\n gap: 0.35rem;\n}\n\n.signature-canvas {\n border: 1px solid #ddd;\n border-radius: 4px;\n background: #fff;\n cursor: crosshair;\n}\n\n.signature-canvas-actions {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.signature-clear-btn {\n padding: 0.2rem 0.5rem;\n background: none;\n border: 1px solid #ccc;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.8rem;\n color: #888;\n}\n\n.signature-hint {\n font-size: 0.75rem;\n color: #aaa;\n}\n\n/* ── Field Navigator ──────────────────────── */\n\n.field-navigator {\n margin-top: auto;\n border-top: 1px solid #eee;\n padding-top: 0.75rem;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.field-navigator-progress {\n font-size: 0.8rem;\n color: #888;\n text-align: center;\n}\n\n.field-navigator-controls {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 1rem;\n}\n\n.nav-btn {\n padding: 0.35rem 1rem;\n border: 1px solid #ddd;\n border-radius: 4px;\n background: #fff;\n cursor: pointer;\n font-size: 0.85rem;\n}\n\n.nav-btn:hover:not(:disabled) { background: #f5f5f5; }\n.nav-btn:disabled { opacity: 0.4; cursor: default; }\n\n.field-navigator-position {\n font-size: 0.85rem;\n color: #888;\n min-width: 50px;\n text-align: center;\n}\n\n.submit-btn {\n padding: 0.5rem;\n background: #111;\n color: #fff;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 500;\n}\n\n.submit-btn:hover:not(:disabled) { background: #333; }\n.submit-btn:disabled { opacity: 0.4; cursor: default; }\n\n/* ── States ───────────────────────────────── */\n\n.loading-indicator {\n text-align: center;\n padding: 2rem;\n color: #888;\n font-size: 0.9rem;\n}\n\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n gap: 0.75rem;\n color: #888;\n}\n\n.empty-state h2 {\n margin: 0;\n font-size: 1.25rem;\n color: #555;\n}\n\n.empty-state p {\n margin: 0;\n font-size: 0.9rem;\n}\n\n/* ── Powered By ───────────────────────────── */\n\n.powered-by {\n text-align: center;\n padding: 0.4rem;\n font-size: 0.7rem;\n color: #aaa;\n border-top: 1px solid #eee;\n background: #fff;\n}\n\n.powered-by a {\n color: #888;\n text-decoration: none;\n}\n\n.powered-by a:hover {\n text-decoration: underline;\n}\n"],"mappings":";AAEA,CAAC;AACD,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,UAAQ;AACR;AAAA,IAAa,SAAS;AAAA,IAAE,aAAa;AAAA,IAAE;AACvC,SAAO;AACP,cAAY;AACd;AAIA,CAAC;AACC,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,WAAS,EAAE;AACX,UAAQ;AACR,iBAAe,IAAI,MAAM;AACzB,cAAY;AACZ,OAAK;AACL,eAAa;AACf;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,OAAK;AACP;AAEA,CAAC;AACC,WAAS,OAAO;AAChB,UAAQ,IAAI,MAAM;AAClB,iBAAe;AACf,UAAQ;AACR,aAAW;AACX,eAAa;AACb,eAAa;AACb,eAAa;AACb,cAAY;AACd;AAEA,CAAC;AACC,cAAY;AACZ,SAAO;AACP,gBAAc;AAChB;AACA,CALC,kBAKkB;AAAS,cAAY;AAAM,gBAAc;AAAM;AAElE,CAAC;AACC,cAAY;AACZ,SAAO;AACP,gBAAc;AAChB;AACA,CALC,kBAKkB;AAAS,cAAY;AAAS,gBAAc;AAAM;AAIrE,CAAC;AACC,WAAS;AACT,QAAM;AACN,YAAU;AACZ;AAIA,CAAC;AACC,SAAO;AACP,eAAa;AACb,gBAAc,IAAI,MAAM;AACxB,cAAY;AACZ,WAAS,QAAQ;AACjB,WAAS;AACT,kBAAgB;AAChB,OAAK;AACL,cAAY;AACd;AAEA,CAAC;AACC,aAAW;AACX,eAAa;AACb,kBAAgB;AAChB,kBAAgB;AAChB,SAAO;AACP,WAAS,EAAE,QAAQ;AACrB;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,OAAK;AACL,WAAS,OAAO;AAChB,UAAQ;AACR,aAAW;AACX,SAAO;AACP,eAAa,IAAI,MAAM;AACvB,cAAY,IAAI;AAChB,eAAa;AACf;AAEA,CAbC,YAaY;AACX,cAAY;AACZ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K;AAAa,cAAY;AAAS;AACrD,CAVC,OAUO;AAAY,WAAS;AAAK,UAAQ;AAAS;AAEnD,CAAC;AACC,aAAW;AACX,SAAO;AACP,aAAW;AACX,cAAY;AACd;AAEA,CAAC;AACC,WAAS;AACT,cAAY;AACZ,SAAO;AACP,UAAQ;AACR,iBAAe;AACf,UAAQ;AACR,aAAW;AACX,eAAa;AACf;AAEA,CAXC,UAWU,MAAM,KAAK;AAAa,cAAY;AAAM;AACrD,CAZC,UAYU;AAAY,WAAS;AAAK,UAAQ;AAAS;AAItD,CAAC;AACC,cAAY;AACZ,WAAS;AACT,SAAO;AACP,aAAW;AACb;AAEA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,eAAa;AACb,mBAAiB;AACjB,UAAQ;AACR,OAAK;AACL,SAAO;AACT;AAEA,CAVC,YAUY;AACX,UAAQ;AACR,aAAW;AACX,SAAO;AACT;AAEA,CAhBC,YAgBY;AACX,UAAQ;AACR,aAAW;AACb;AAIA,CAAC;AACC,cAAY;AACZ,WAAS;AACT,aAAW;AACX,SAAO;AACP,cAAY,IAAI,MAAM;AACtB,cAAY;AACd;AAEA,CATC,WASW;AACV,SAAO;AACP,mBAAiB;AACnB;AAEA,CAdC,WAcW,CAAC;AACX,mBAAiB;AACnB;","names":[]}
1
+ {"version":3,"sources":["../src/styles/pdf-builder.css"],"sourcesContent":["/* ── Layout ────────────────────────────────── */\n\n.designer-layout,\n.signer-layout {\n display: flex;\n flex-direction: column;\n height: 100vh;\n font-family: system-ui, -apple-system, sans-serif;\n color: #222;\n background: #fafafa;\n}\n\n/* ── Designer Header ─────────────────────── */\n\n.designer-header {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n padding: 0 1rem;\n height: 48px;\n border-bottom: 1px solid #e5e5e5;\n background: #fff;\n gap: 0.5rem;\n flex-shrink: 0;\n}\n\n.designer-header-right {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.header-btn {\n padding: 0.4rem 1rem;\n border: 1px solid transparent;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.85rem;\n font-weight: 500;\n white-space: nowrap;\n line-height: 1.4;\n box-sizing: border-box;\n}\n\n.header-btn-primary {\n background: #111;\n color: #fff;\n border-color: #111;\n}\n.header-btn-primary:hover { background: #333; border-color: #333; }\n\n.header-btn-outline {\n background: #fff;\n color: #555;\n border-color: #ccc;\n}\n.header-btn-outline:hover { background: #f5f5f5; border-color: #999; }\n\n/* ── Designer Body (3-column) ────────────── */\n\n.designer-body {\n display: flex;\n flex: 1;\n overflow: hidden;\n}\n\n/* ── Left Palette ────────────────────────── */\n\n.designer-palette {\n width: 140px;\n flex-shrink: 0;\n border-right: 1px solid #e5e5e5;\n background: #fff;\n padding: 0.75rem 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n overflow-y: auto;\n}\n\n.palette-heading {\n font-size: 0.7rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: #999;\n padding: 0 0.75rem 0.5rem;\n}\n\n.palette-item {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 0.75rem;\n cursor: grab;\n font-size: 0.85rem;\n color: #555;\n border-left: 3px solid transparent;\n transition: all 0.1s;\n user-select: none;\n}\n\n.palette-item:hover {\n background: #f5f5f5;\n color: #222;\n}\n\n.palette-item.active {\n background: #f0f0f0;\n color: #111;\n border-left-color: #111;\n font-weight: 500;\n}\n\n.palette-item:active {\n cursor: grabbing;\n}\n\n.palette-item-icon {\n width: 22px;\n text-align: center;\n font-size: 0.9rem;\n flex-shrink: 0;\n}\n\n.palette-item-label {\n flex: 1;\n}\n\n.palette-divider {\n height: 1px;\n background: #e5e5e5;\n margin: 0.5rem 0.75rem;\n}\n\n.palette-role-section {\n padding: 0 0.75rem;\n display: flex;\n flex-direction: column;\n gap: 0.35rem;\n}\n\n.palette-role-select {\n width: 100%;\n padding: 0.3rem 0.4rem;\n border: 1.5px solid #ddd;\n border-radius: 4px;\n font-size: 0.8rem;\n font-weight: 500;\n background: #fff;\n cursor: pointer;\n}\n\n.palette-role-add-link {\n background: none;\n border: none;\n cursor: pointer;\n font-size: 0.75rem;\n color: #888;\n padding: 0;\n text-align: left;\n}\n.palette-role-add-link:hover { color: #555; }\n\n.palette-role-add-inline {\n display: flex;\n flex-wrap: wrap;\n gap: 0.25rem;\n}\n\n.palette-role-add-inline input {\n width: 100%;\n padding: 0.25rem 0.4rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n font-size: 0.75rem;\n}\n\n.palette-role-add-inline button {\n padding: 0.2rem 0.4rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n background: #fff;\n cursor: pointer;\n font-size: 0.75rem;\n}\n\n/* ── Signer toolbar (kept for backward compat) ── */\n\n.designer-toolbar {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0.5rem 1rem;\n border-bottom: 1px solid #e5e5e5;\n background: #fff;\n gap: 1rem;\n flex-wrap: wrap;\n}\n\n.toolbar-left,\n.toolbar-right {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.signer-content {\n display: flex;\n flex: 1;\n overflow: hidden;\n}\n\n.designer-pdf-area,\n.signer-pdf-area {\n flex: 1;\n overflow-y: auto;\n padding: 1rem;\n background: #eee;\n}\n\n.designer-panel,\n.signer-panel {\n width: 320px;\n overflow-y: auto;\n border-left: 1px solid #e5e5e5;\n background: #fff;\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n/* ── Panel Resize Handle ─────────────────── */\n\n.panel-resize-handle {\n width: 5px;\n cursor: col-resize;\n background: transparent;\n flex-shrink: 0;\n position: relative;\n z-index: 20;\n margin-right: -5px;\n transition: background 0.15s;\n}\n\n.panel-resize-handle:hover,\n.panel-resize-handle:active {\n background: #d0d0d0;\n}\n\n/* ── Ink Color Picker ────────────────────── */\n\n.ink-color-picker {\n display: flex;\n gap: 0.4rem;\n align-items: center;\n}\n\n.ink-color-swatch {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n border: 2px solid transparent;\n cursor: pointer;\n padding: 0;\n transition: border-color 0.1s;\n}\n\n.ink-color-swatch.active {\n border-color: #111;\n box-shadow: 0 0 0 2px #fff, 0 0 0 3px #111;\n}\n\n.ink-color-swatch:hover:not(.active) {\n border-color: #999;\n}\n\n/* ── Panel Role Selector ─────────────────── */\n\n.panel-role-section {\n padding: 0.75rem 1rem;\n border-bottom: 1px solid #eee;\n}\n\n.panel-role-label {\n display: block;\n font-size: 0.7rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: #999;\n margin-bottom: 0.35rem;\n}\n\n.panel-role-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n flex-wrap: wrap;\n}\n\n.panel-role-select {\n padding: 0.3rem 0.5rem;\n border: 1.5px solid #ddd;\n border-radius: 4px;\n font-size: 0.85rem;\n font-weight: 500;\n background: #fff;\n cursor: pointer;\n min-width: 100px;\n}\n\n.panel-role-add-link {\n background: none;\n border: none;\n cursor: pointer;\n font-size: 0.8rem;\n color: #888;\n padding: 0;\n white-space: nowrap;\n}\n.panel-role-add-link:hover { color: #555; }\n\n.panel-role-add-inline {\n display: flex;\n gap: 0.25rem;\n align-items: center;\n flex: 1;\n}\n\n.panel-role-add-inline input {\n padding: 0.25rem 0.4rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n font-size: 0.8rem;\n width: 90px;\n}\n\n.panel-role-add-inline button {\n padding: 0.25rem 0.5rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n background: #fff;\n cursor: pointer;\n font-size: 0.8rem;\n}\n\n/* ── Panel Tabs ──────────────────────────── */\n\n.panel-tabs {\n display: flex;\n border-bottom: 1px solid #e5e5e5;\n flex-shrink: 0;\n}\n\n.panel-tab {\n flex: 1;\n padding: 0.55rem 0;\n background: none;\n border: none;\n border-bottom: 2px solid transparent;\n cursor: pointer;\n font-size: 0.8rem;\n color: #888;\n font-weight: 500;\n text-align: center;\n transition: all 0.1s;\n}\n\n.panel-tab.active {\n color: #111;\n border-bottom-color: #111;\n}\n\n.panel-tab:hover:not(.active) {\n color: #555;\n}\n\n.panel-tab-content {\n flex: 1;\n overflow-y: auto;\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n}\n\n/* ── PDF Viewer ───────────────────────────── */\n\n.pdf-viewer {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n align-items: center;\n}\n\n.pdf-page {\n position: relative;\n width: 100%;\n max-width: 800px;\n background: #fff;\n box-shadow: 0 1px 4px rgba(0,0,0,0.1);\n cursor: crosshair;\n}\n\n.pdf-page-image {\n width: 100%;\n height: 100%;\n display: block;\n pointer-events: none;\n}\n\n/* ── Field Overlays ───────────────────────── */\n\n.field-overlay {\n position: absolute;\n border: 1.5px solid;\n border-radius: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n transition: box-shadow 0.1s;\n}\n\n.field-overlay.selected {\n box-shadow: 0 0 0 2px rgba(0,0,0,0.2);\n z-index: 10;\n}\n\n.field-overlay.editable {\n cursor: text;\n}\n\n.field-overlay-label {\n position: absolute;\n top: -18px;\n left: -1px;\n font-size: 10px;\n color: #fff;\n padding: 1px 6px;\n border-radius: 2px 2px 0 0;\n white-space: nowrap;\n pointer-events: none;\n}\n\n.field-overlay-placeholder {\n color: #999;\n font-size: 11px;\n padding: 2px 4px;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n\n.field-overlay-placeholder.readonly {\n color: #666;\n}\n\n.field-overlay-value {\n font-size: 11px;\n padding: 2px 4px;\n width: 100%;\n}\n\n.field-inline-input {\n width: 100%;\n height: 100%;\n border: none;\n background: transparent;\n padding: 2px 4px;\n outline: none;\n font-family: inherit;\n}\n\n.field-signature-preview {\n width: 100%;\n height: 100%;\n object-fit: contain;\n}\n\n.field-signature-filled {\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n\n.field-checkbox-display {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n font-weight: bold;\n}\n\n.field-checkbox-display.editable {\n cursor: pointer;\n}\n\n.field-resize-handle {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 10px;\n height: 10px;\n background: #fff;\n border: 1px solid #999;\n cursor: nwse-resize;\n}\n\n/* ── Buttons ──────────────────────────────── */\n\n.upload-btn {\n display: inline-block;\n padding: 0.4rem 1rem;\n background: #111;\n color: #fff;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.85rem;\n font-weight: 500;\n}\n\n.upload-btn:hover { background: #333; }\n\n.upload-btn-small { font-size: 0.8rem; padding: 0.3rem 0.75rem; background: #555; }\n.upload-btn-large { font-size: 1rem; padding: 0.6rem 1.5rem; }\n\n.export-btn {\n padding: 0.4rem 1rem;\n background: #111;\n color: #fff;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.85rem;\n font-weight: 500;\n}\n\n.export-btn:hover { background: #333; }\n\n.field-type-selector {\n display: flex;\n gap: 2px;\n}\n\n.field-type-btn {\n padding: 0.3rem 0.6rem;\n background: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.8rem;\n color: #555;\n}\n\n.field-type-btn.active {\n background: #111;\n color: #fff;\n border-color: #111;\n}\n\n.field-type-btn:hover:not(.active) {\n background: #f5f5f5;\n}\n\n/* ── Signer Roles (legacy chip style) ─────── */\n\n.signer-role-selector {\n padding: 0.5rem 1rem;\n border-bottom: 1px solid #e5e5e5;\n background: #fff;\n}\n\n.signer-role-label {\n font-size: 0.75rem;\n color: #888;\n margin-bottom: 0.35rem;\n}\n\n.signer-role-list {\n display: flex;\n gap: 0.35rem;\n flex-wrap: wrap;\n align-items: center;\n}\n\n.signer-role-chip {\n padding: 0.2rem 0.6rem;\n border: 1.5px solid;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.8rem;\n font-weight: 500;\n background: transparent;\n transition: all 0.1s;\n}\n\n.signer-role-remove {\n margin-left: 0.3rem;\n cursor: pointer;\n font-size: 1rem;\n}\n\n.signer-role-add-btn {\n padding: 0.2rem 0.5rem;\n border: 1px dashed #ccc;\n border-radius: 4px;\n background: none;\n cursor: pointer;\n font-size: 0.8rem;\n color: #888;\n}\n\n.signer-role-add-input {\n display: flex;\n gap: 0.25rem;\n align-items: center;\n}\n\n.signer-role-add-input input {\n padding: 0.2rem 0.4rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n font-size: 0.8rem;\n width: 120px;\n}\n\n.signer-role-add-input button {\n padding: 0.2rem 0.5rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n background: #fff;\n cursor: pointer;\n font-size: 0.8rem;\n}\n\n/* ── Property Panel ───────────────────────── */\n\n.field-property-panel {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n}\n\n.panel-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.panel-header h3 {\n margin: 0;\n font-size: 1rem;\n}\n\n.panel-delete-btn {\n padding: 0.2rem 0.5rem;\n background: none;\n border: 1px solid #e44;\n color: #e44;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.8rem;\n}\n\n.panel-delete-btn:hover {\n background: #e44;\n color: #fff;\n}\n\n.panel-field label {\n display: block;\n font-size: 0.75rem;\n color: #888;\n margin-bottom: 0.2rem;\n}\n\n.panel-field input[type=\"text\"],\n.panel-field input[type=\"number\"],\n.panel-field input[type=\"email\"],\n.panel-field input[type=\"tel\"],\n.panel-field input[type=\"date\"],\n.panel-field select {\n width: 100%;\n padding: 0.35rem 0.5rem;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 0.85rem;\n background: #fff;\n}\n\n.panel-field-group {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 0.5rem;\n}\n\n.panel-checkbox-label {\n display: flex;\n align-items: center;\n gap: 0.4rem;\n font-size: 0.85rem;\n cursor: pointer;\n}\n\n.panel-empty {\n color: #888;\n font-size: 0.85rem;\n padding: 2rem 0.5rem;\n text-align: center;\n}\n\n/* ── Pre-fill ─────────────────────────────── */\n\n.prefill-section {\n border-top: 1px solid #eee;\n padding-top: 0.75rem;\n}\n\n.prefill-section h4 {\n margin: 0 0 0.5rem;\n font-size: 0.85rem;\n color: #555;\n}\n\n.prefill-input {\n width: 100%;\n padding: 0.35rem 0.5rem;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 0.85rem;\n}\n\n/* ── Field List ───────────────────────────── */\n\n.field-list {\n display: flex;\n flex-direction: column;\n}\n\n.field-list h4 {\n margin: 0 0 0.5rem;\n font-size: 0.85rem;\n color: #555;\n}\n\n.field-list-item {\n display: flex;\n align-items: center;\n gap: 0.4rem;\n padding: 0.35rem 0.5rem;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.8rem;\n}\n\n.field-list-item:hover { background: #f5f5f5; }\n.field-list-item.active { background: #eee; }\n\n.field-list-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.field-list-name {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.field-list-page {\n color: #aaa;\n font-size: 0.75rem;\n}\n\n.field-list-required {\n color: #e44;\n font-weight: bold;\n}\n\n/* ── Signer Panel ─────────────────────────── */\n\n.signer-field-input h3 {\n margin: 0 0 0.5rem;\n font-size: 1rem;\n}\n\n.required-badge {\n display: inline-block;\n font-size: 0.7rem;\n background: #fee;\n color: #c33;\n padding: 1px 6px;\n border-radius: 3px;\n margin-bottom: 0.5rem;\n}\n\n.signer-text-input {\n width: 100%;\n padding: 0.4rem 0.5rem;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 0.9rem;\n}\n\n.signer-checkbox-label {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n font-size: 0.9rem;\n cursor: pointer;\n}\n\n.signer-date-display {\n font-size: 0.9rem;\n color: #555;\n padding: 0.4rem 0;\n}\n\n.signer-field-readonly {\n color: #888;\n font-size: 0.85rem;\n}\n\n.signer-field-readonly h3 {\n margin: 0 0 0.25rem;\n font-size: 1rem;\n color: #555;\n}\n\n/* ── Signature Canvas ─────────────────────── */\n\n.signature-canvas-wrapper {\n display: flex;\n flex-direction: column;\n gap: 0.35rem;\n}\n\n.signature-canvas {\n border: 1px solid #ddd;\n border-radius: 4px;\n background: #fff;\n cursor: crosshair;\n width: 100%;\n height: auto;\n display: block;\n box-sizing: border-box;\n}\n\n.signature-canvas-actions {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.signature-clear-btn {\n padding: 0.2rem 0.5rem;\n background: none;\n border: 1px solid #ccc;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.8rem;\n color: #888;\n}\n\n.signature-hint {\n font-size: 0.75rem;\n color: #aaa;\n}\n\n/* ── Field Navigator ──────────────────────── */\n\n.field-navigator {\n margin-top: auto;\n border-top: 1px solid #eee;\n padding-top: 0.75rem;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.field-navigator-progress {\n font-size: 0.8rem;\n color: #888;\n text-align: center;\n}\n\n.field-navigator-controls {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 1rem;\n}\n\n.nav-btn {\n padding: 0.35rem 1rem;\n border: 1px solid #ddd;\n border-radius: 4px;\n background: #fff;\n cursor: pointer;\n font-size: 0.85rem;\n}\n\n.nav-btn:hover:not(:disabled) { background: #f5f5f5; }\n.nav-btn:disabled { opacity: 0.4; cursor: default; }\n\n.field-navigator-position {\n font-size: 0.85rem;\n color: #888;\n min-width: 50px;\n text-align: center;\n}\n\n.submit-btn {\n padding: 0.5rem;\n background: #111;\n color: #fff;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 0.9rem;\n font-weight: 500;\n}\n\n.submit-btn:hover:not(:disabled) { background: #333; }\n.submit-btn:disabled { opacity: 0.4; cursor: default; }\n\n/* ── States ───────────────────────────────── */\n\n.loading-indicator {\n text-align: center;\n padding: 2rem;\n color: #888;\n font-size: 0.9rem;\n}\n\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n gap: 0.75rem;\n color: #888;\n}\n\n.empty-state h2 {\n margin: 0;\n font-size: 1.25rem;\n color: #555;\n}\n\n.empty-state p {\n margin: 0;\n font-size: 0.9rem;\n}\n\n/* ── Powered By ───────────────────────────── */\n\n.powered-by {\n text-align: center;\n padding: 0.4rem;\n font-size: 0.7rem;\n color: #aaa;\n border-top: 1px solid #eee;\n background: #fff;\n}\n\n.powered-by a {\n color: #888;\n text-decoration: none;\n}\n\n.powered-by a:hover {\n text-decoration: underline;\n}\n"],"mappings":";AAEA,CAAC;AACD,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,UAAQ;AACR;AAAA,IAAa,SAAS;AAAA,IAAE,aAAa;AAAA,IAAE;AACvC,SAAO;AACP,cAAY;AACd;AAIA,CAAC;AACC,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,WAAS,EAAE;AACX,UAAQ;AACR,iBAAe,IAAI,MAAM;AACzB,cAAY;AACZ,OAAK;AACL,eAAa;AACf;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,OAAK;AACP;AAEA,CAAC;AACC,WAAS,OAAO;AAChB,UAAQ,IAAI,MAAM;AAClB,iBAAe;AACf,UAAQ;AACR,aAAW;AACX,eAAa;AACb,eAAa;AACb,eAAa;AACb,cAAY;AACd;AAEA,CAAC;AACC,cAAY;AACZ,SAAO;AACP,gBAAc;AAChB;AACA,CALC,kBAKkB;AAAS,cAAY;AAAM,gBAAc;AAAM;AAElE,CAAC;AACC,cAAY;AACZ,SAAO;AACP,gBAAc;AAChB;AACA,CALC,kBAKkB;AAAS,cAAY;AAAS,gBAAc;AAAM;AAIrE,CAAC;AACC,WAAS;AACT,QAAM;AACN,YAAU;AACZ;AAIA,CAAC;AACC,SAAO;AACP,eAAa;AACb,gBAAc,IAAI,MAAM;AACxB,cAAY;AACZ,WAAS,QAAQ;AACjB,WAAS;AACT,kBAAgB;AAChB,OAAK;AACL,cAAY;AACd;AAEA,CAAC;AACC,aAAW;AACX,e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,MAAM;AACtB,eAAa;AACb,WAAS;AACT,kBAAgB;AAChB,OAAK;AACP;AAEA,CAAC;AACC,aAAW;AACX,SAAO;AACP,cAAY;AACd;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,OAAK;AACP;AAEA,CAAC;AACC,WAAS,QAAQ;AACjB,UAAQ,IAAI,MAAM;AAClB,iBAAe;AACf,cAAY;AACZ,UAAQ;AACR,aAAW;AACb;AAEA,CATC,OASO,MAAM,KAAK;AAAa,cAAY;AAAS;AACrD,CAVC,OAUO;AAAY,WAAS;AAAK,UAAQ;AAAS;AAEnD,CAAC;AACC,aAAW;AACX,SAAO;AACP,aAAW;AACX,cAAY;AACd;AAEA,CAAC;AACC,WAAS;AACT,cAAY;AACZ,SAAO;AACP,UAAQ;AACR,iBAAe;AACf,UAAQ;AACR,aAAW;AACX,eAAa;AACf;AAEA,CAXC,UAWU,MAAM,KAAK;AAAa,cAAY;AAAM;AACrD,CAZC,UAYU;AAAY,WAAS;AAAK,UAAQ;AAAS;AAItD,CAAC;AACC,cAAY;AACZ,WAAS;AACT,SAAO;AACP,aAAW;AACb;AAEA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,eAAa;AACb,mBAAiB;AACjB,UAAQ;AACR,OAAK;AACL,SAAO;AACT;AAEA,CAVC,YAUY;AACX,UAAQ;AACR,aAAW;AACX,SAAO;AACT;AAEA,CAhBC,YAgBY;AACX,UAAQ;AACR,aAAW;AACb;AAIA,CAAC;AACC,cAAY;AACZ,WAAS;AACT,aAAW;AACX,SAAO;AACP,cAAY,IAAI,MAAM;AACtB,cAAY;AACd;AAEA,CATC,WASW;AACV,SAAO;AACP,mBAAiB;AACnB;AAEA,CAdC,WAcW,CAAC;AACX,mBAAiB;AACnB;","names":[]}
package/dist/index.d.mts CHANGED
@@ -59,8 +59,10 @@ interface SignerViewProps {
59
59
  onComplete?: (pdfBlob: Blob) => void;
60
60
  /** Pre-fill field values by label or ID. Keys are matched against field labels (case-insensitive) first, then field IDs. */
61
61
  initialValues?: Record<string, string>;
62
+ /** Label for the submit button (default: "Complete") */
63
+ submitLabel?: string;
62
64
  }
63
- declare function SignerView({ apiKey, initialPdfUrl, initialTemplate, initialSigner, callbackUrl: initialCallbackUrl, onComplete, initialValues, }?: SignerViewProps): react_jsx_runtime.JSX.Element;
65
+ declare function SignerView({ apiKey, initialPdfUrl, initialTemplate, initialSigner, callbackUrl: initialCallbackUrl, onComplete, initialValues, submitLabel, }?: SignerViewProps): react_jsx_runtime.JSX.Element;
64
66
 
65
67
  interface RenderedPage {
66
68
  pageNumber: number;
@@ -109,8 +111,9 @@ interface FieldNavigatorProps {
109
111
  onNavigate: (fieldId: string) => void;
110
112
  allRequiredFilled: boolean;
111
113
  onSubmit: () => void;
114
+ submitLabel?: string;
112
115
  }
113
- declare function FieldNavigator({ fields, currentFieldId, onNavigate, allRequiredFilled, onSubmit, }: FieldNavigatorProps): react_jsx_runtime.JSX.Element;
116
+ declare function FieldNavigator({ fields, currentFieldId, onNavigate, allRequiredFilled, onSubmit, submitLabel, }: FieldNavigatorProps): react_jsx_runtime.JSX.Element;
114
117
 
115
118
  interface SignerRoleSelectorProps {
116
119
  roles: string[];
package/dist/index.d.ts CHANGED
@@ -59,8 +59,10 @@ interface SignerViewProps {
59
59
  onComplete?: (pdfBlob: Blob) => void;
60
60
  /** Pre-fill field values by label or ID. Keys are matched against field labels (case-insensitive) first, then field IDs. */
61
61
  initialValues?: Record<string, string>;
62
+ /** Label for the submit button (default: "Complete") */
63
+ submitLabel?: string;
62
64
  }
63
- declare function SignerView({ apiKey, initialPdfUrl, initialTemplate, initialSigner, callbackUrl: initialCallbackUrl, onComplete, initialValues, }?: SignerViewProps): react_jsx_runtime.JSX.Element;
65
+ declare function SignerView({ apiKey, initialPdfUrl, initialTemplate, initialSigner, callbackUrl: initialCallbackUrl, onComplete, initialValues, submitLabel, }?: SignerViewProps): react_jsx_runtime.JSX.Element;
64
66
 
65
67
  interface RenderedPage {
66
68
  pageNumber: number;
@@ -109,8 +111,9 @@ interface FieldNavigatorProps {
109
111
  onNavigate: (fieldId: string) => void;
110
112
  allRequiredFilled: boolean;
111
113
  onSubmit: () => void;
114
+ submitLabel?: string;
112
115
  }
113
- declare function FieldNavigator({ fields, currentFieldId, onNavigate, allRequiredFilled, onSubmit, }: FieldNavigatorProps): react_jsx_runtime.JSX.Element;
116
+ declare function FieldNavigator({ fields, currentFieldId, onNavigate, allRequiredFilled, onSubmit, submitLabel, }: FieldNavigatorProps): react_jsx_runtime.JSX.Element;
114
117
 
115
118
  interface SignerRoleSelectorProps {
116
119
  roles: string[];
package/dist/index.js CHANGED
@@ -147,7 +147,7 @@ function createField(type, assignee, page, x, y, existingFields) {
147
147
  type,
148
148
  label: uniqueLabel(baseLabel, existingLabels),
149
149
  placeholder: defaults.placeholder || "",
150
- required: true,
150
+ required: type === "checkbox" || type === "blackout" || type === "whiteout" ? false : true,
151
151
  assignee,
152
152
  page,
153
153
  x,
@@ -363,7 +363,8 @@ function FieldOverlayItem({
363
363
  borderColor: isRedact ? field.type === "blackout" ? "#666" : "#bbb" : color,
364
364
  borderStyle: isRedact ? "dashed" : "solid",
365
365
  backgroundColor: isRedact ? field.type === "blackout" ? "#000000" : "#ffffff" : isSelected ? `${color}22` : `${color}11`,
366
- cursor: mode === "designer" ? "move" : "default"
366
+ cursor: mode === "designer" ? "move" : "default",
367
+ pointerEvents: mode === "signer" && isRedact ? "none" : void 0
367
368
  },
368
369
  onClick: (e) => {
369
370
  e.stopPropagation();
@@ -468,7 +469,7 @@ function FieldPropertyPanel({ field, signerRoles, onUpdate, onDelete }) {
468
469
  }
469
470
  )
470
471
  ] }),
471
- !isRedactField && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "panel-field", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "panel-checkbox-label", children: [
472
+ !isRedactField && field.type !== "checkbox" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "panel-field", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "panel-checkbox-label", children: [
472
473
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
473
474
  "input",
474
475
  {
@@ -568,10 +569,20 @@ function SignatureCanvas({
568
569
  }
569
570
  }, [paths, currentPath, width, height]);
570
571
  const getPoint = (0, import_react2.useCallback)((e) => {
571
- const rect = canvasRef.current.getBoundingClientRect();
572
+ const canvas = canvasRef.current;
573
+ const rect = canvas.getBoundingClientRect();
574
+ const style = getComputedStyle(canvas);
575
+ const borderL = parseFloat(style.borderLeftWidth) || 0;
576
+ const borderT = parseFloat(style.borderTopWidth) || 0;
577
+ const borderR = parseFloat(style.borderRightWidth) || 0;
578
+ const borderB = parseFloat(style.borderBottomWidth) || 0;
579
+ const contentW = rect.width - borderL - borderR;
580
+ const contentH = rect.height - borderT - borderB;
581
+ const scaleX = canvas.width / contentW;
582
+ const scaleY = canvas.height / contentH;
572
583
  return [
573
- e.clientX - rect.left,
574
- e.clientY - rect.top,
584
+ (e.clientX - rect.left - borderL) * scaleX,
585
+ (e.clientY - rect.top - borderT) * scaleY,
575
586
  e.pressure
576
587
  ];
577
588
  }, []);
@@ -680,8 +691,10 @@ function DesignerView({
680
691
  const [newRoleName, setNewRoleName] = (0, import_react3.useState)("");
681
692
  const [draggingFieldType, setDraggingFieldType] = (0, import_react3.useState)(null);
682
693
  const [panelWidth, setPanelWidth] = (0, import_react3.useState)(380);
694
+ const [clipboardField, setClipboardField] = (0, import_react3.useState)(null);
683
695
  const dragGhostRef = (0, import_react3.useRef)(null);
684
696
  const resizingRef = (0, import_react3.useRef)(false);
697
+ const lastStylesRef = (0, import_react3.useRef)({});
685
698
  (0, import_react3.useEffect)(() => {
686
699
  const pdfUrl = initialPdfUrl || initialTemplate?.pdfUrl;
687
700
  if (pdfUrl) {
@@ -729,15 +742,24 @@ function DesignerView({
729
742
  }, [loadPdf]);
730
743
  const handlePageClick = (0, import_react3.useCallback)((page, x, y) => {
731
744
  const field = createField(activeFieldType, activeRole, page, x, y, fields);
732
- setFields((prev) => [...prev, field]);
733
- setSelectedFieldId(field.id);
745
+ const sticky = lastStylesRef.current[activeFieldType];
746
+ const styledField = sticky ? { ...field, ...sticky } : field;
747
+ setFields((prev) => [...prev, styledField]);
748
+ setSelectedFieldId(styledField.id);
734
749
  setRightTab("properties");
735
750
  }, [activeFieldType, activeRole, fields]);
736
751
  const handleFieldMove = (0, import_react3.useCallback)((id, page, x, y) => {
737
752
  setFields((prev) => prev.map((f) => f.id === id ? { ...f, page, x, y } : f));
738
753
  }, []);
739
754
  const handleFieldResize = (0, import_react3.useCallback)((id, width, height) => {
740
- setFields((prev) => prev.map((f) => f.id === id ? { ...f, width, height } : f));
755
+ setFields((prev) => {
756
+ const field = prev.find((f) => f.id === id);
757
+ if (field) {
758
+ const existing = lastStylesRef.current[field.type] || {};
759
+ lastStylesRef.current[field.type] = { ...existing, width, height, fontSize: field.fontSize };
760
+ }
761
+ return prev.map((f) => f.id === id ? { ...f, width, height } : f);
762
+ });
741
763
  }, []);
742
764
  const handleFieldUpdate = (0, import_react3.useCallback)((id, updates) => {
743
765
  setFields((prev) => {
@@ -745,7 +767,18 @@ function DesignerView({
745
767
  const otherLabels = prev.filter((f) => f.id !== id).map((f) => f.label);
746
768
  updates.label = uniqueLabel(updates.label, otherLabels);
747
769
  }
748
- return prev.map((f) => f.id === id ? { ...f, ...updates } : f);
770
+ const updated = prev.map((f) => f.id === id ? { ...f, ...updates } : f);
771
+ const field = prev.find((f) => f.id === id);
772
+ if (field && (updates.fontSize !== void 0 || updates.width !== void 0 || updates.height !== void 0 || updates.inkColor !== void 0)) {
773
+ const merged = { ...field, ...updates };
774
+ lastStylesRef.current[field.type] = {
775
+ width: merged.width,
776
+ height: merged.height,
777
+ fontSize: merged.fontSize,
778
+ inkColor: merged.inkColor
779
+ };
780
+ }
781
+ return updated;
749
782
  });
750
783
  }, []);
751
784
  const handleFieldDelete = (0, import_react3.useCallback)((id) => {
@@ -811,8 +844,10 @@ function DesignerView({
811
844
  }, []);
812
845
  const handleDropOnPage = (0, import_react3.useCallback)((page, x, y, fieldType) => {
813
846
  const field = createField(fieldType, activeRole, page, x, y, fields);
814
- setFields((prev) => [...prev, field]);
815
- setSelectedFieldId(field.id);
847
+ const sticky = lastStylesRef.current[fieldType];
848
+ const styledField = sticky ? { ...field, ...sticky } : field;
849
+ setFields((prev) => [...prev, styledField]);
850
+ setSelectedFieldId(styledField.id);
816
851
  setRightTab("properties");
817
852
  }, [activeRole, fields]);
818
853
  (0, import_react3.useEffect)(() => {
@@ -830,6 +865,38 @@ function DesignerView({
830
865
  window.addEventListener("keydown", handleKeyDown);
831
866
  return () => window.removeEventListener("keydown", handleKeyDown);
832
867
  }, [selectedFieldId, handleFieldDelete]);
868
+ (0, import_react3.useEffect)(() => {
869
+ const handleKeyDown = (e) => {
870
+ const tag = (document.activeElement?.tagName || "").toLowerCase();
871
+ if (tag === "input" || tag === "textarea" || tag === "select") return;
872
+ if (document.activeElement?.isContentEditable) return;
873
+ const isMod = e.metaKey || e.ctrlKey;
874
+ if (isMod && e.key === "c" && selectedFieldId) {
875
+ const field = fields.find((f) => f.id === selectedFieldId);
876
+ if (field) {
877
+ e.preventDefault();
878
+ setClipboardField(field);
879
+ }
880
+ }
881
+ if (isMod && e.key === "v" && clipboardField) {
882
+ e.preventDefault();
883
+ const existingLabels = fields.map((f) => f.label);
884
+ const newField = {
885
+ ...clipboardField,
886
+ id: generateId(),
887
+ label: uniqueLabel(clipboardField.label, existingLabels),
888
+ x: clipboardField.x + 2,
889
+ y: clipboardField.y + 2,
890
+ value: ""
891
+ };
892
+ setFields((prev) => [...prev, newField]);
893
+ setSelectedFieldId(newField.id);
894
+ setRightTab("properties");
895
+ }
896
+ };
897
+ window.addEventListener("keydown", handleKeyDown);
898
+ return () => window.removeEventListener("keydown", handleKeyDown);
899
+ }, [selectedFieldId, fields, clipboardField]);
833
900
  const handleResizeStart = (0, import_react3.useCallback)((e) => {
834
901
  e.preventDefault();
835
902
  resizingRef.current = true;
@@ -1201,7 +1268,8 @@ function FieldNavigator({
1201
1268
  currentFieldId,
1202
1269
  onNavigate,
1203
1270
  allRequiredFilled,
1204
- onSubmit
1271
+ onSubmit,
1272
+ submitLabel = "Complete"
1205
1273
  }) {
1206
1274
  const currentIndex = fields.findIndex((f) => f.id === currentFieldId);
1207
1275
  const hasPrev = currentIndex > 0;
@@ -1255,7 +1323,7 @@ function FieldNavigator({
1255
1323
  onClick: onSubmit,
1256
1324
  disabled: !allRequiredFilled,
1257
1325
  className: "submit-btn",
1258
- children: "Complete & Download"
1326
+ children: submitLabel
1259
1327
  }
1260
1328
  )
1261
1329
  ] });
@@ -1270,7 +1338,8 @@ function SignerView({
1270
1338
  initialSigner,
1271
1339
  callbackUrl: initialCallbackUrl,
1272
1340
  onComplete,
1273
- initialValues
1341
+ initialValues,
1342
+ submitLabel
1274
1343
  } = {}) {
1275
1344
  if (!isValidApiKey(apiKey)) {
1276
1345
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "signer-layout", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "empty-state", children: [
@@ -1342,14 +1411,14 @@ function SignerView({
1342
1411
  setLoading(false);
1343
1412
  }
1344
1413
  }, []);
1345
- const editableFields = fields.filter((f) => f.assignee === signer).sort((a, b) => {
1414
+ const editableFields = fields.filter((f) => f.assignee === signer && f.type !== "blackout" && f.type !== "whiteout").sort((a, b) => {
1346
1415
  if (a.page !== b.page) return a.page - b.page;
1347
1416
  const bandThreshold = 2;
1348
1417
  if (Math.abs(a.y - b.y) > bandThreshold) return a.y - b.y;
1349
1418
  return a.x - b.x;
1350
1419
  });
1351
1420
  const selectedField = fields.find((f) => f.id === selectedFieldId) || null;
1352
- const isFieldEditable = selectedField ? selectedField.assignee === signer : false;
1421
+ const isFieldEditable = selectedField ? selectedField.assignee === signer && selectedField.type !== "blackout" && selectedField.type !== "whiteout" : false;
1353
1422
  const handleFieldUpdate = (0, import_react4.useCallback)((id, value) => {
1354
1423
  setFields((prev) => prev.map((f) => f.id === id ? { ...f, value } : f));
1355
1424
  }, []);
@@ -1374,13 +1443,15 @@ function SignerView({
1374
1443
  try {
1375
1444
  const pdfBytes = await generateFilledPdf(pdfSource, fields);
1376
1445
  const blob = new Blob([pdfBytes.slice().buffer], { type: "application/pdf" });
1377
- downloadPdf(pdfBytes, "signed-document.pdf");
1378
1446
  if (callbackUrl) {
1379
1447
  await postPdfToCallback(pdfBytes, callbackUrl, "signed-document.pdf");
1380
1448
  }
1381
1449
  if (onComplete) {
1382
1450
  onComplete(blob);
1383
1451
  }
1452
+ if (!callbackUrl && !onComplete) {
1453
+ downloadPdf(pdfBytes, "signed-document.pdf");
1454
+ }
1384
1455
  window.parent?.postMessage({ type: "signing-complete" }, "*");
1385
1456
  } catch (err) {
1386
1457
  console.error("Failed to generate PDF:", err);
@@ -1389,6 +1460,9 @@ function SignerView({
1389
1460
  }
1390
1461
  }, [pdfSource, fields, callbackUrl, allRequiredFilled, onComplete]);
1391
1462
  const renderFieldContent = (0, import_react4.useCallback)((field) => {
1463
+ if (field.type === "blackout" || field.type === "whiteout") {
1464
+ return null;
1465
+ }
1392
1466
  const editable = field.assignee === signer;
1393
1467
  if (!editable) {
1394
1468
  if (field.type === "signature" || field.type === "initials") {
@@ -1429,11 +1503,12 @@ function SignerView({
1429
1503
  value: field.value,
1430
1504
  placeholder: field.placeholder,
1431
1505
  onChange: (e) => handleFieldUpdate(field.id, e.target.value),
1506
+ onFocus: () => setSelectedFieldId(field.id),
1432
1507
  onClick: (e) => e.stopPropagation(),
1433
1508
  style: { fontSize: `${field.fontSize * 0.6}px` }
1434
1509
  }
1435
1510
  );
1436
- }, [signer, handleFieldUpdate]);
1511
+ }, [signer, handleFieldUpdate, setSelectedFieldId]);
1437
1512
  (0, import_react4.useEffect)(() => {
1438
1513
  const sigFields = fields.filter((f) => f.assignee === signer && f.type === "signature" && f.value);
1439
1514
  if (sigFields.length > 0) {
@@ -1509,7 +1584,8 @@ function SignerView({
1509
1584
  currentFieldId: selectedFieldId,
1510
1585
  onNavigate: handleNavigate,
1511
1586
  allRequiredFilled,
1512
- onSubmit: handleSubmit
1587
+ onSubmit: handleSubmit,
1588
+ submitLabel
1513
1589
  }
1514
1590
  ),
1515
1591
  submitting && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "loading-indicator", children: "Generating PDF..." })