@signiphi/pdf-compose 0.1.0-beta.1 → 0.1.0-beta.10
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 +265 -0
- package/dist/components/DocumentGenerator.d.ts +3 -0
- package/dist/components/DocumentGenerator.d.ts.map +1 -0
- package/dist/components/EditorPanel.d.ts +15 -0
- package/dist/components/EditorPanel.d.ts.map +1 -0
- package/dist/components/EditorToolbar.d.ts +11 -0
- package/dist/components/EditorToolbar.d.ts.map +1 -0
- package/dist/components/ErrorBoundary.d.ts +18 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/FieldEditPopover.d.ts +12 -0
- package/dist/components/FieldEditPopover.d.ts.map +1 -0
- package/dist/components/FieldInsertPopover.d.ts +12 -0
- package/dist/components/FieldInsertPopover.d.ts.map +1 -0
- package/dist/components/FieldNodeView.d.ts +3 -0
- package/dist/components/FieldNodeView.d.ts.map +1 -0
- package/dist/components/FieldOverlay.d.ts +9 -0
- package/dist/components/FieldOverlay.d.ts.map +1 -0
- package/dist/components/GeneratePanel.d.ts +15 -0
- package/dist/components/GeneratePanel.d.ts.map +1 -0
- package/dist/components/PreviewPanel.d.ts +12 -0
- package/dist/components/PreviewPanel.d.ts.map +1 -0
- package/dist/components/VariableEditPopover.d.ts +12 -0
- package/dist/components/VariableEditPopover.d.ts.map +1 -0
- package/dist/components/VariableInsertPopover.d.ts +13 -0
- package/dist/components/VariableInsertPopover.d.ts.map +1 -0
- package/dist/components/VariableNodeView.d.ts +3 -0
- package/dist/components/VariableNodeView.d.ts.map +1 -0
- package/dist/components/WatermarkNodeView.d.ts +3 -0
- package/dist/components/WatermarkNodeView.d.ts.map +1 -0
- package/dist/contexts/ThemeContext.d.ts +19 -0
- package/dist/contexts/ThemeContext.d.ts.map +1 -0
- package/dist/extensions/columns-node.d.ts +4 -0
- package/dist/extensions/columns-node.d.ts.map +1 -0
- package/dist/extensions/field-node.d.ts +31 -0
- package/dist/extensions/field-node.d.ts.map +1 -0
- package/dist/extensions/panel-node.d.ts +3 -0
- package/dist/extensions/panel-node.d.ts.map +1 -0
- package/dist/extensions/repeat-node.d.ts +3 -0
- package/dist/extensions/repeat-node.d.ts.map +1 -0
- package/dist/extensions/subtotals-node.d.ts +3 -0
- package/dist/extensions/subtotals-node.d.ts.map +1 -0
- package/dist/extensions/variable-node.d.ts +18 -0
- package/dist/extensions/variable-node.d.ts.map +1 -0
- package/dist/extensions/watermark-node.d.ts +3 -0
- package/dist/extensions/watermark-node.d.ts.map +1 -0
- package/dist/hooks/useDocumentGenerator.d.ts +46 -0
- package/dist/hooks/useDocumentGenerator.d.ts.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3081 -562
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3068 -565
- package/dist/index.mjs.map +1 -1
- package/dist/lib/ui/button.d.ts +12 -0
- package/dist/lib/ui/button.d.ts.map +1 -0
- package/dist/lib/ui/index.d.ts +10 -0
- package/dist/lib/ui/index.d.ts.map +1 -0
- package/dist/lib/ui/input.d.ts +6 -0
- package/dist/lib/ui/input.d.ts.map +1 -0
- package/dist/lib/ui/label.d.ts +8 -0
- package/dist/lib/ui/label.d.ts.map +1 -0
- package/dist/lib/ui/popover.d.ts +8 -0
- package/dist/lib/ui/popover.d.ts.map +1 -0
- package/dist/lib/ui/select.d.ts +14 -0
- package/dist/lib/ui/select.d.ts.map +1 -0
- package/dist/lib/ui/toggle-group.d.ts +13 -0
- package/dist/lib/ui/toggle-group.d.ts.map +1 -0
- package/dist/lib/ui/tooltip.d.ts +8 -0
- package/dist/lib/ui/tooltip.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/styles/index.css +349 -194
- package/dist/styles/index.d.ts +1 -0
- package/dist/types/index.d.ts +204 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/error-helpers.d.ts +27 -0
- package/dist/utils/error-helpers.d.ts.map +1 -0
- package/dist/utils/field-helpers.d.ts +31 -0
- package/dist/utils/field-helpers.d.ts.map +1 -0
- package/dist/utils/markdown-parser.d.ts +6 -0
- package/dist/utils/markdown-parser.d.ts.map +1 -0
- package/dist/utils/markdown-validator.d.ts +13 -0
- package/dist/utils/markdown-validator.d.ts.map +1 -0
- package/dist/utils/markdown-writer.d.ts +6 -0
- package/dist/utils/markdown-writer.d.ts.map +1 -0
- package/dist/utils/pdf-generator.d.ts +77 -0
- package/dist/utils/pdf-generator.d.ts.map +1 -0
- package/dist/utils/pdf-metadata.d.ts +58 -0
- package/dist/utils/pdf-metadata.d.ts.map +1 -0
- package/dist/utils/pdf-preview.d.ts +7 -0
- package/dist/utils/pdf-preview.d.ts.map +1 -0
- package/dist/utils/template-pipeline.d.ts +39 -0
- package/dist/utils/template-pipeline.d.ts.map +1 -0
- package/dist/utils/theme-helpers.d.ts +21 -0
- package/dist/utils/theme-helpers.d.ts.map +1 -0
- package/dist/utils/variable-helpers.d.ts +74 -0
- package/dist/utils/variable-helpers.d.ts.map +1 -0
- package/dist/utils/xml-template-parser.d.ts +9 -0
- package/dist/utils/xml-template-parser.d.ts.map +1 -0
- package/package.json +16 -6
- package/src/styles/index.css +140 -68
- package/src/styles/index.d.ts +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
# @signiphi/pdf-compose
|
|
2
|
+
|
|
3
|
+
Markdown-based document composer with interactive form field placeholders and real-time PDF preview. Built for the signiphi signing pipeline.
|
|
4
|
+
|
|
5
|
+
Write documents in a rich text editor, embed signable form fields (signature, date, text, checkbox, etc.) and template variables, then export production-ready PDFs with interactive AcroForm fields.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @signiphi/pdf-compose
|
|
11
|
+
# or
|
|
12
|
+
pnpm add @signiphi/pdf-compose
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { DocumentGenerator } from '@signiphi/pdf-compose';
|
|
19
|
+
import '@signiphi/pdf-compose/styles';
|
|
20
|
+
|
|
21
|
+
function App() {
|
|
22
|
+
return (
|
|
23
|
+
<DocumentGenerator
|
|
24
|
+
placeholder="Start writing your document..."
|
|
25
|
+
onExport={(result) => {
|
|
26
|
+
// result.pdfBlob — Blob with interactive form fields
|
|
27
|
+
// result.fields — Array of field positions for signing
|
|
28
|
+
const url = URL.createObjectURL(result.pdfBlob);
|
|
29
|
+
window.open(url);
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Features
|
|
37
|
+
|
|
38
|
+
- **Rich text editor** — TipTap-based with markdown toolbar (headings, bold, italic, underline, lists, alignment)
|
|
39
|
+
- **Form field placeholders** — Insert signature, text, date, checkbox, initials, radio, dropdown, and text label fields inline
|
|
40
|
+
- **Template variables** — Define reusable variables (company name, salary, etc.) that get replaced at generation time
|
|
41
|
+
- **Real-time PDF preview** — See the rendered PDF alongside the editor with field overlays
|
|
42
|
+
- **PDF generation** — Export PDFs with embedded interactive AcroForm fields via pdf-lib
|
|
43
|
+
- **Bulk generation** — Fill variables from JSON or CSV and generate multiple PDFs as a ZIP
|
|
44
|
+
- **Theming** — Light, dark, and auto modes with customizable primary color
|
|
45
|
+
- **Markdown I/O** — Import/export documents as markdown with field token syntax
|
|
46
|
+
|
|
47
|
+
## Props
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
interface DocumentGeneratorProps {
|
|
51
|
+
/** Pre-fill the editor with markdown content */
|
|
52
|
+
initialMarkdown?: string;
|
|
53
|
+
/** Pre-fill with TipTap JSON content (takes precedence over initialMarkdown) */
|
|
54
|
+
initialContent?: JSONContent;
|
|
55
|
+
/** Fires on content changes (debounced 150ms) */
|
|
56
|
+
onChange?: (data: { markdown: string; fields: DocumentGeneratorField[]; variables: DocumentGeneratorVariable[] }) => void;
|
|
57
|
+
/** Fires when the user exports from the Editor tab */
|
|
58
|
+
onExport?: (result: DocumentGeneratorExportResult) => void;
|
|
59
|
+
/** Fires when the user generates a PDF from the Generate tab */
|
|
60
|
+
onGeneratePdf?: (blob: Blob, fileName: string) => void;
|
|
61
|
+
/** Disable editing */
|
|
62
|
+
readOnly?: boolean;
|
|
63
|
+
/** Custom CSS class */
|
|
64
|
+
className?: string;
|
|
65
|
+
/** Primary theme color (hex) */
|
|
66
|
+
themeColor?: string;
|
|
67
|
+
/** Theme mode — 'light' | 'dark' | 'auto' (default: 'auto') */
|
|
68
|
+
themeMode?: ThemeMode;
|
|
69
|
+
/** Full custom color palette */
|
|
70
|
+
themeConfig?: ThemeConfig;
|
|
71
|
+
/** Show the PDF preview panel (default: true) */
|
|
72
|
+
showPreview?: boolean;
|
|
73
|
+
/** Show the editor toolbar (default: true) */
|
|
74
|
+
showToolbar?: boolean;
|
|
75
|
+
/** Show the Generate tab (default: true) */
|
|
76
|
+
showGenerateTab?: boolean;
|
|
77
|
+
/** Editor placeholder text */
|
|
78
|
+
placeholder?: string;
|
|
79
|
+
/** Custom text for the export button */
|
|
80
|
+
exportButtonText?: string;
|
|
81
|
+
/** Pre-fill bulk generation data */
|
|
82
|
+
initialBulkData?: Record<string, string>[];
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Field Token Syntax
|
|
87
|
+
|
|
88
|
+
Fields and variables are embedded as inline tokens in the markdown content:
|
|
89
|
+
|
|
90
|
+
### Form Fields
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
{{field|type:signature|name:sig_1|label:Employee Signature|required:true}}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
| Attribute | Description |
|
|
97
|
+
| -------------- | --------------------------------------------- |
|
|
98
|
+
| `type` | `text`, `signature`, `initials`, `date`, `checkbox`, `radio`, `dropdown`, `text_label` |
|
|
99
|
+
| `name` | Field identifier in the PDF |
|
|
100
|
+
| `label` | User-facing label |
|
|
101
|
+
| `required` | `true` or `false` |
|
|
102
|
+
| `placeholder` | Hint text for text fields |
|
|
103
|
+
| `options` | Comma-separated values (radio/dropdown) |
|
|
104
|
+
| `defaultValue` | Pre-filled value |
|
|
105
|
+
| `multiline` | `true` for multiline text fields |
|
|
106
|
+
| `maxLength` | Character limit |
|
|
107
|
+
| `fontSize` | Font size in points |
|
|
108
|
+
|
|
109
|
+
### Template Variables
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
{{var|name:company_name|label:Company Name|default:Acme Corp}}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
| Attribute | Description |
|
|
116
|
+
| ---------- | --------------------- |
|
|
117
|
+
| `name` | Variable identifier |
|
|
118
|
+
| `label` | Display label |
|
|
119
|
+
| `default` | Default value |
|
|
120
|
+
| `suppress` | `zero` — remove the containing row/paragraph when the value is zero-like |
|
|
121
|
+
| `format` | Named value format (e.g. `phone`) |
|
|
122
|
+
| `block` | `true` — parse the value as extended markdown and splice it in as block content (headings, tables, lists) |
|
|
123
|
+
|
|
124
|
+
Variables are replaced with actual values at PDF generation time. In bulk mode, each row of data produces a separate PDF.
|
|
125
|
+
|
|
126
|
+
#### Block variables
|
|
127
|
+
|
|
128
|
+
A variable that is the **sole content of its paragraph** can expand into full block content: the resolved value is parsed as extended markdown and the resulting blocks (headings, tables, lists, panels) replace the paragraph. This happens when the token carries `block:true`, or automatically when the resolved value contains a newline. An empty block value removes the paragraph entirely, so optional sections collapse without leaving a gap. Variables mixed inline with other text always substitute as plain text.
|
|
129
|
+
|
|
130
|
+
## Advanced Usage
|
|
131
|
+
|
|
132
|
+
### Using the Hook Directly
|
|
133
|
+
|
|
134
|
+
For custom layouts, use `useDocumentGenerator` to drive your own UI:
|
|
135
|
+
|
|
136
|
+
```tsx
|
|
137
|
+
import { useDocumentGenerator, EditorPanel, PreviewPanel } from '@signiphi/pdf-compose';
|
|
138
|
+
import '@signiphi/pdf-compose/styles';
|
|
139
|
+
|
|
140
|
+
function CustomComposer() {
|
|
141
|
+
const generator = useDocumentGenerator({ initialMarkdown: '# My Doc' });
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<div style={{ display: 'flex', gap: 16 }}>
|
|
145
|
+
<EditorPanel {...generator} />
|
|
146
|
+
<PreviewPanel pages={generator.pdfPages} fields={generator.positionedFields} />
|
|
147
|
+
</div>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Export Result
|
|
153
|
+
|
|
154
|
+
The `onExport` callback receives:
|
|
155
|
+
|
|
156
|
+
```tsx
|
|
157
|
+
interface DocumentGeneratorExportResult {
|
|
158
|
+
pdfBlob: Blob; // PDF with embedded interactive form fields
|
|
159
|
+
fields: FormFieldForExport[]; // Field metadata with page positions
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
interface FormFieldForExport {
|
|
163
|
+
name: string;
|
|
164
|
+
type: FormFieldType;
|
|
165
|
+
label?: string;
|
|
166
|
+
required: boolean;
|
|
167
|
+
page: number;
|
|
168
|
+
x: number;
|
|
169
|
+
y: number;
|
|
170
|
+
width: number;
|
|
171
|
+
height: number;
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Pre-filled Markdown Example
|
|
176
|
+
|
|
177
|
+
```tsx
|
|
178
|
+
const markdown = `# Employment Agreement
|
|
179
|
+
|
|
180
|
+
**Company:** {{var|name:company|label:Company Name|default:Acme Corp}}
|
|
181
|
+
|
|
182
|
+
**Employee:** {{field|type:text|name:employee_name|required:true|placeholder:Full name}}
|
|
183
|
+
|
|
184
|
+
**Start Date:** {{field|type:date|name:start_date|required:true}}
|
|
185
|
+
|
|
186
|
+
## Signature
|
|
187
|
+
|
|
188
|
+
{{field|type:signature|name:employee_sig|label:Employee Signature|required:true}}
|
|
189
|
+
`;
|
|
190
|
+
|
|
191
|
+
<DocumentGenerator
|
|
192
|
+
initialMarkdown={markdown}
|
|
193
|
+
onExport={handleExport}
|
|
194
|
+
themeColor="#4F46E5"
|
|
195
|
+
/>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Styling
|
|
199
|
+
|
|
200
|
+
Import the stylesheet — required for the component to render correctly:
|
|
201
|
+
|
|
202
|
+
```tsx
|
|
203
|
+
import '@signiphi/pdf-compose/styles';
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
All styles are scoped under `.signiphi-pdf-compose` so they won't conflict with your application's CSS. CSS custom properties use the `--xpc-*` namespace.
|
|
207
|
+
|
|
208
|
+
### Theming
|
|
209
|
+
|
|
210
|
+
```tsx
|
|
211
|
+
// Simple — just a color
|
|
212
|
+
<DocumentGenerator themeColor="#4F46E5" themeMode="dark" />
|
|
213
|
+
|
|
214
|
+
// Full custom palette
|
|
215
|
+
<DocumentGenerator themeConfig={{
|
|
216
|
+
primary: '#4F46E5',
|
|
217
|
+
primaryForeground: '#ffffff',
|
|
218
|
+
background: '#1a1a2e',
|
|
219
|
+
foreground: '#e0e0e0',
|
|
220
|
+
border: '#333355',
|
|
221
|
+
// ...
|
|
222
|
+
}} />
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Exports
|
|
226
|
+
|
|
227
|
+
```tsx
|
|
228
|
+
// Components
|
|
229
|
+
export { DocumentGenerator } from '@signiphi/pdf-compose';
|
|
230
|
+
export { EditorPanel } from '@signiphi/pdf-compose';
|
|
231
|
+
export { PreviewPanel } from '@signiphi/pdf-compose';
|
|
232
|
+
|
|
233
|
+
// Hooks
|
|
234
|
+
export { useDocumentGenerator } from '@signiphi/pdf-compose';
|
|
235
|
+
|
|
236
|
+
// Theme
|
|
237
|
+
export { ThemeProvider, useTheme } from '@signiphi/pdf-compose';
|
|
238
|
+
|
|
239
|
+
// Types
|
|
240
|
+
export type {
|
|
241
|
+
DocumentGeneratorProps,
|
|
242
|
+
DocumentGeneratorField,
|
|
243
|
+
DocumentGeneratorVariable,
|
|
244
|
+
VariableValues,
|
|
245
|
+
GeneratedDocument,
|
|
246
|
+
DocumentGeneratorExportResult,
|
|
247
|
+
FormFieldForExport,
|
|
248
|
+
ThemeMode,
|
|
249
|
+
ThemeConfig,
|
|
250
|
+
PdfPage,
|
|
251
|
+
} from '@signiphi/pdf-compose';
|
|
252
|
+
|
|
253
|
+
export { FormFieldType } from '@signiphi/pdf-compose';
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## Peer Dependencies
|
|
257
|
+
|
|
258
|
+
- `react` >= 18
|
|
259
|
+
- `react-dom` >= 18
|
|
260
|
+
- `@radix-ui/react-dialog`, `@radix-ui/react-label`, `@radix-ui/react-popover`, `@radix-ui/react-select`, `@radix-ui/react-tooltip`
|
|
261
|
+
- `lucide-react`
|
|
262
|
+
|
|
263
|
+
## License
|
|
264
|
+
|
|
265
|
+
See repository for license information.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentGenerator.d.ts","sourceRoot":"","sources":["../../src/components/DocumentGenerator.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAwevD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAY9D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Editor } from '@tiptap/react';
|
|
2
|
+
import { FormFieldType } from '../types';
|
|
3
|
+
import type { FieldNodeAttributes } from '../extensions/field-node';
|
|
4
|
+
interface EditorPanelProps {
|
|
5
|
+
editor: Editor | null;
|
|
6
|
+
showToolbar?: boolean;
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
onInsertField: (type: FormFieldType, attrs?: Partial<FieldNodeAttributes>) => void;
|
|
10
|
+
onUpdateField: (fieldId: string, attrs: Partial<FieldNodeAttributes>) => void;
|
|
11
|
+
onDeleteField: (fieldId: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function EditorPanel({ editor, showToolbar, readOnly, className, onInsertField, onUpdateField, onDeleteField, }: EditorPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=EditorPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorPanel.d.ts","sourceRoot":"","sources":["../../src/components/EditorPanel.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAM3D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGpE,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACnF,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC9E,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,WAAkB,EAClB,QAAgB,EAChB,SAAS,EACT,aAAa,EACb,aAAa,EACb,aAAa,GACd,EAAE,gBAAgB,2CAmGlB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Editor } from '@tiptap/react';
|
|
3
|
+
interface EditorToolbarProps {
|
|
4
|
+
editor: Editor | null;
|
|
5
|
+
insertFieldButton: React.ReactNode;
|
|
6
|
+
insertVariableButton?: React.ReactNode;
|
|
7
|
+
onCollapse?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function EditorToolbar({ editor, insertFieldButton, insertVariableButton, onCollapse }: EditorToolbarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=EditorToolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorToolbar.d.ts","sourceRoot":"","sources":["../../src/components/EditorToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AA6D5C,UAAU,kBAAkB;IAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,iBAAiB,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAYD,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,UAAU,EAAE,EAAE,kBAAkB,kDA0JhH"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ErrorBoundaryProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
fallbackClassName?: string;
|
|
5
|
+
}
|
|
6
|
+
interface ErrorBoundaryState {
|
|
7
|
+
hasError: boolean;
|
|
8
|
+
error: Error | null;
|
|
9
|
+
}
|
|
10
|
+
export declare class ComposeErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
11
|
+
constructor(props: ErrorBoundaryProps);
|
|
12
|
+
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
13
|
+
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
|
|
14
|
+
handleReset: () => void;
|
|
15
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,qBAAa,oBAAqB,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBACnF,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB;IAIjE,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI;IAIjE,WAAW,aAET;IAEF,MAAM;CAuBP"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FieldNodeAttributes } from '../extensions/field-node';
|
|
2
|
+
interface FieldEditPopoverProps {
|
|
3
|
+
fieldId: string | null;
|
|
4
|
+
attrs: Partial<FieldNodeAttributes> | null;
|
|
5
|
+
anchorEl: HTMLElement | null;
|
|
6
|
+
onUpdate: (fieldId: string, attrs: Partial<FieldNodeAttributes>) => void;
|
|
7
|
+
onDelete: (fieldId: string) => void;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function FieldEditPopover({ fieldId, attrs, anchorEl, onUpdate, onDelete, onClose, }: FieldEditPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=FieldEditPopover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldEditPopover.d.ts","sourceRoot":"","sources":["../../src/components/FieldEditPopover.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAcpE,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC;IAC3C,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACzE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,OAAO,GACR,EAAE,qBAAqB,2CAmWvB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormFieldType } from '../types';
|
|
3
|
+
import type { FieldNodeAttributes } from '../extensions/field-node';
|
|
4
|
+
interface FieldInsertPopoverProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
onInsert: (type: FormFieldType, attrs?: Partial<FieldNodeAttributes>) => void;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function FieldInsertPopover({ open, onOpenChange, onInsert, children, }: FieldInsertPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=FieldInsertPopover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldInsertPopover.d.ts","sourceRoot":"","sources":["../../src/components/FieldInsertPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAmBrD,OAAO,EAAE,aAAa,EAAwB,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAcpE,UAAU,uBAAuB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC9E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,QAAQ,GACT,EAAE,uBAAuB,2CAyWzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldNodeView.d.ts","sourceRoot":"","sources":["../../src/components/FieldNodeView.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAwBnD,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,aAAa,2CAkC9E"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FormFieldForExport } from '../types';
|
|
2
|
+
interface FieldOverlayProps {
|
|
3
|
+
field: FormFieldForExport;
|
|
4
|
+
renderScale: number;
|
|
5
|
+
pageHeight: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function FieldOverlay({ field, renderScale, pageHeight }: FieldOverlayProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=FieldOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldOverlay.d.ts","sourceRoot":"","sources":["../../src/components/FieldOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD,UAAU,iBAAiB;IACzB,KAAK,EAAE,kBAAkB,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AA6BD,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,iBAAiB,2CAkCjF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { JSONContent } from '@tiptap/core';
|
|
2
|
+
import type { DocumentGeneratorVariable } from '../types';
|
|
3
|
+
interface GeneratePanelProps {
|
|
4
|
+
editorMarkdown: string;
|
|
5
|
+
editorContent?: JSONContent;
|
|
6
|
+
editorVariables: DocumentGeneratorVariable[];
|
|
7
|
+
onGeneratePdf?: (blob: Blob, fileName: string) => void;
|
|
8
|
+
initialBulkData?: Record<string, string>[];
|
|
9
|
+
initialVariableValues?: Record<string, string>;
|
|
10
|
+
exportFileName?: string;
|
|
11
|
+
templateMode?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function GeneratePanel({ editorMarkdown, editorContent, editorVariables, onGeneratePdf, initialBulkData, initialVariableValues, exportFileName, templateMode, }: GeneratePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=GeneratePanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeneratePanel.d.ts","sourceRoot":"","sources":["../../src/components/GeneratePanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,yBAAyB,EAA0E,MAAM,UAAU,CAAC;AAelI,UAAU,kBAAkB;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,eAAe,EAAE,yBAAyB,EAAE,CAAC;IAC7C,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC3C,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AA4DD,wBAAgB,aAAa,CAAC,EAC5B,cAAc,EACd,aAAa,EACb,eAAe,EACf,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,YAAY,GACb,EAAE,kBAAkB,2CAg/BpB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PdfPage, FormFieldForExport } from '../types';
|
|
3
|
+
interface PreviewPanelProps {
|
|
4
|
+
pages: PdfPage[];
|
|
5
|
+
isGenerating: boolean;
|
|
6
|
+
positionedFields?: FormFieldForExport[];
|
|
7
|
+
headerLeft?: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function PreviewPanel({ pages, isGenerating, positionedFields, headerLeft, className, }: PreviewPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=PreviewPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewPanel.d.ts","sourceRoot":"","sources":["../../src/components/PreviewPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAW5D,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAG5D,UAAU,iBAAiB;IACzB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACxC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,SAAS,GACV,EAAE,iBAAiB,2CAoMnB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { VariableNodeAttributes } from '../extensions/variable-node';
|
|
2
|
+
interface VariableEditPopoverProps {
|
|
3
|
+
varName: string | null;
|
|
4
|
+
attrs: Partial<VariableNodeAttributes> | null;
|
|
5
|
+
anchorEl: HTMLElement | null;
|
|
6
|
+
onUpdate: (varName: string, attrs: Partial<VariableNodeAttributes>) => void;
|
|
7
|
+
onDelete: (varName: string) => void;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function VariableEditPopover({ varName, attrs, anchorEl, onUpdate, onDelete, onClose, }: VariableEditPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=VariableEditPopover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VariableEditPopover.d.ts","sourceRoot":"","sources":["../../src/components/VariableEditPopover.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,UAAU,wBAAwB;IAChC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAAG,IAAI,CAAC;IAC9C,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAC;IAC5E,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,OAAO,GACR,EAAE,wBAAwB,2CA8G1B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { VariableNodeAttributes } from '../extensions/variable-node';
|
|
3
|
+
import type { PredefinedVariable } from '../types';
|
|
4
|
+
interface VariableInsertPopoverProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
onInsert: (attrs: VariableNodeAttributes) => void;
|
|
8
|
+
predefinedVariables?: PredefinedVariable[];
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function VariableInsertPopover({ open, onOpenChange, onInsert, predefinedVariables, children, }: VariableInsertPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=VariableInsertPopover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VariableInsertPopover.d.ts","sourceRoot":"","sources":["../../src/components/VariableInsertPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAOzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAkBnD,UAAU,0BAA0B;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,QAAQ,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAClD,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC3C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,mBAAmB,EACnB,QAAQ,GACT,EAAE,0BAA0B,2CA4L5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VariableNodeView.d.ts","sourceRoot":"","sources":["../../src/components/VariableNodeView.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,aAAa,2CA+CjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WatermarkNodeView.d.ts","sourceRoot":"","sources":["../../src/components/WatermarkNodeView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAkBlE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ThemeMode, ThemeConfig } from '../types';
|
|
3
|
+
export interface ThemeContextValue {
|
|
4
|
+
themeMode: 'light' | 'dark';
|
|
5
|
+
originalMode: ThemeMode;
|
|
6
|
+
themeColor: string;
|
|
7
|
+
themeConfig?: ThemeConfig;
|
|
8
|
+
setThemeMode: (mode: ThemeMode) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function useTheme(): ThemeContextValue;
|
|
11
|
+
export interface ThemeProviderProps {
|
|
12
|
+
themeMode?: ThemeMode;
|
|
13
|
+
themeColor?: string;
|
|
14
|
+
themeConfig?: ThemeConfig;
|
|
15
|
+
rootElement?: HTMLElement | null;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare function ThemeProvider({ themeMode: initialMode, themeColor: initialColor, themeConfig, rootElement, children, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=ThemeContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0E,MAAM,OAAO,CAAC;AAC/F,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGlD,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,YAAY,EAAE,SAAS,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,YAAY,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACzC;AAID,wBAAgB,QAAQ,IAAI,iBAAiB,CAM5C;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EAAE,WAAoB,EAC/B,UAAU,EAAE,YAAwB,EACpC,WAAW,EACX,WAAW,EACX,QAAQ,GACT,EAAE,kBAAkB,2CA6CpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"columns-node.d.ts","sourceRoot":"","sources":["../../src/extensions/columns-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,WAAW,gBA4BtB,CAAC;AAEH,eAAO,MAAM,UAAU,gBAsBrB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
export interface FieldNodeAttributes {
|
|
3
|
+
fieldId: string;
|
|
4
|
+
fieldType: string;
|
|
5
|
+
fieldName: string;
|
|
6
|
+
fieldLabel: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
options: string;
|
|
9
|
+
placeholder: string;
|
|
10
|
+
fontSize: number | null;
|
|
11
|
+
defaultValue: string;
|
|
12
|
+
multiline: boolean;
|
|
13
|
+
maxLength: number | null;
|
|
14
|
+
acknowledgements: string;
|
|
15
|
+
}
|
|
16
|
+
declare module '@tiptap/core' {
|
|
17
|
+
interface Commands<ReturnType> {
|
|
18
|
+
fieldNode: {
|
|
19
|
+
insertField: (attrs: Partial<FieldNodeAttributes> & {
|
|
20
|
+
fieldId: string;
|
|
21
|
+
fieldType: string;
|
|
22
|
+
fieldName: string;
|
|
23
|
+
fieldLabel: string;
|
|
24
|
+
}) => ReturnType;
|
|
25
|
+
updateField: (fieldId: string, attrs: Partial<FieldNodeAttributes>) => ReturnType;
|
|
26
|
+
removeField: (fieldId: string) => ReturnType;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare const FieldNode: Node<any, any>;
|
|
31
|
+
//# sourceMappingURL=field-node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-node.d.ts","sourceRoot":"","sources":["../../src/extensions/field-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAIrD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,QAAQ,CAAC,UAAU;QAC3B,SAAS,EAAE;YACT,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG;gBAClD,OAAO,EAAE,MAAM,CAAC;gBAChB,SAAS,EAAE,MAAM,CAAC;gBAClB,SAAS,EAAE,MAAM,CAAC;gBAClB,UAAU,EAAE,MAAM,CAAC;aACpB,KAAK,UAAU,CAAC;YACjB,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,UAAU,CAAC;YAClF,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,UAAU,CAAC;SAC9C,CAAC;KACH;CACF;AAED,eAAO,MAAM,SAAS,gBAmGpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-node.d.ts","sourceRoot":"","sources":["../../src/extensions/panel-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,SAAS,gBA0CpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repeat-node.d.ts","sourceRoot":"","sources":["../../src/extensions/repeat-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,UAAU,gBAkBrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subtotals-node.d.ts","sourceRoot":"","sources":["../../src/extensions/subtotals-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,aAAa,gBAgBxB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
export interface VariableNodeAttributes {
|
|
3
|
+
varName: string;
|
|
4
|
+
varLabel: string;
|
|
5
|
+
varDefault: string;
|
|
6
|
+
format: string;
|
|
7
|
+
}
|
|
8
|
+
declare module '@tiptap/core' {
|
|
9
|
+
interface Commands<ReturnType> {
|
|
10
|
+
variableNode: {
|
|
11
|
+
insertVariable: (attrs: VariableNodeAttributes) => ReturnType;
|
|
12
|
+
updateVariable: (varName: string, attrs: Partial<VariableNodeAttributes>) => ReturnType;
|
|
13
|
+
removeVariable: (varName: string) => ReturnType;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare const VariableNode: Node<any, any>;
|
|
18
|
+
//# sourceMappingURL=variable-node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variable-node.d.ts","sourceRoot":"","sources":["../../src/extensions/variable-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAIrD,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,QAAQ,CAAC,UAAU;QAC3B,YAAY,EAAE;YACZ,cAAc,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,UAAU,CAAC;YAC9D,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK,UAAU,CAAC;YACxF,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,UAAU,CAAC;SACjD,CAAC;KACH;CACF;AAED,eAAO,MAAM,YAAY,gBAiGvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watermark-node.d.ts","sourceRoot":"","sources":["../../src/extensions/watermark-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAIrD,eAAO,MAAM,aAAa,gBA0BxB,CAAC"}
|