@signiphi/pdf-compose 0.1.0-beta.5 → 0.1.0-beta.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/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 +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- 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/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 +27 -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 +21 -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 +46 -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 +2 -2
|
@@ -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,2CA6+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,gBAgGvB,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"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type Editor } from '@tiptap/react';
|
|
2
|
+
import type { JSONContent } from '@tiptap/core';
|
|
3
|
+
import { type FieldNodeAttributes } from '../extensions/field-node';
|
|
4
|
+
import { type VariableNodeAttributes } from '../extensions/variable-node';
|
|
5
|
+
import { FormFieldType, type DocumentGeneratorField, type DocumentGeneratorVariable, type FormFieldPosition, type FormFieldForExport, type PdfPage, type DocumentGeneratorExportResult, type GeneratedDocument } from '../types';
|
|
6
|
+
export interface UseDocumentGeneratorOptions {
|
|
7
|
+
initialMarkdown?: string;
|
|
8
|
+
initialContent?: JSONContent;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
onChange?: (data: {
|
|
11
|
+
markdown: string;
|
|
12
|
+
content: JSONContent;
|
|
13
|
+
fields: DocumentGeneratorField[];
|
|
14
|
+
variables: DocumentGeneratorVariable[];
|
|
15
|
+
}) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface UseDocumentGeneratorReturn {
|
|
18
|
+
editor: Editor | null;
|
|
19
|
+
fields: DocumentGeneratorField[];
|
|
20
|
+
variables: DocumentGeneratorVariable[];
|
|
21
|
+
fieldPositions: Map<string, FormFieldPosition>;
|
|
22
|
+
positionedFields: FormFieldForExport[];
|
|
23
|
+
markdown: string;
|
|
24
|
+
pdfBytes: Uint8Array | null;
|
|
25
|
+
pdfPages: PdfPage[];
|
|
26
|
+
isGenerating: boolean;
|
|
27
|
+
error: string | null;
|
|
28
|
+
fieldWarnings: string[];
|
|
29
|
+
insertField: (type: FormFieldType, attrs?: Partial<FieldNodeAttributes>) => void;
|
|
30
|
+
updateField: (fieldId: string, attrs: Partial<FieldNodeAttributes>) => void;
|
|
31
|
+
deleteField: (fieldId: string) => void;
|
|
32
|
+
insertVariable: (attrs: VariableNodeAttributes) => void;
|
|
33
|
+
updateVariable: (varName: string, attrs: Partial<VariableNodeAttributes>) => void;
|
|
34
|
+
deleteVariable: (varName: string) => void;
|
|
35
|
+
generatePdf: () => Promise<void>;
|
|
36
|
+
generateWithVariables: (values: Record<string, string>) => Promise<{
|
|
37
|
+
pdfBytes: Uint8Array;
|
|
38
|
+
pdfPages: PdfPage[];
|
|
39
|
+
}>;
|
|
40
|
+
exportDocument: () => Promise<DocumentGeneratorExportResult | null>;
|
|
41
|
+
exportMarkdown: () => string;
|
|
42
|
+
getDocument: (title: string) => GeneratedDocument;
|
|
43
|
+
loadDocument: (doc: GeneratedDocument) => void;
|
|
44
|
+
}
|
|
45
|
+
export declare function useDocumentGenerator(options?: UseDocumentGeneratorOptions): UseDocumentGeneratorReturn;
|
|
46
|
+
//# sourceMappingURL=useDocumentGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDocumentGenerator.d.ts","sourceRoot":"","sources":["../../src/hooks/useDocumentGenerator.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AASvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAa,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAgB,KAAK,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAMxF,OAAO,EAAE,aAAa,EAAE,KAAK,sBAAsB,EAAE,KAAK,yBAAyB,EAAE,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,KAAK,OAAO,EAAE,KAAK,6BAA6B,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAUjO,MAAM,WAAW,2BAA2B;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,WAAW,CAAC;QACrB,MAAM,EAAE,sBAAsB,EAAE,CAAC;QACjC,SAAS,EAAE,yBAAyB,EAAE,CAAC;KACxC,KAAK,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,sBAAsB,EAAE,CAAC;IACjC,SAAS,EAAE,yBAAyB,EAAE,CAAC;IACvC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC/C,gBAAgB,EAAE,kBAAkB,EAAE,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,UAAU,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACjF,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC5E,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,cAAc,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACxD,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAC;IAClF,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,qBAAqB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC;QAAE,QAAQ,EAAE,UAAU,CAAC;QAAC,QAAQ,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC,CAAC;IAClH,cAAc,EAAE,MAAM,OAAO,CAAC,6BAA6B,GAAG,IAAI,CAAC,CAAC;IACpE,cAAc,EAAE,MAAM,MAAM,CAAC;IAC7B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,iBAAiB,CAAC;IAClD,YAAY,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAChD;AAED,wBAAgB,oBAAoB,CAClC,OAAO,GAAE,2BAAgC,GACxC,0BAA0B,CA4T5B"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { DocumentGenerator } from './components/DocumentGenerator';
|
|
2
|
+
export { EditorPanel } from './components/EditorPanel';
|
|
3
|
+
export { PreviewPanel } from './components/PreviewPanel';
|
|
4
|
+
export { useDocumentGenerator } from './hooks/useDocumentGenerator';
|
|
5
|
+
export type { Acknowledgement, DocumentGeneratorField, DocumentGeneratorVariable, DocumentTemplate, VariableValues, GeneratedDocument, DocumentGeneratorExportResult, FormFieldForExport, DocumentGeneratorProps, PredefinedVariable, ThemeMode, ThemeConfig, PdfPage, } from './types';
|
|
6
|
+
export { FormFieldType } from './types';
|
|
7
|
+
export { suppressZeroContent, isZeroLike, expandRepeatContent, extractVariablesFromContent } from './utils/variable-helpers';
|
|
8
|
+
export { generatePdfFromMarkdown, generatePdfFromTiptap } from './utils/template-pipeline';
|
|
9
|
+
export type { HeadlessPdfResult } from './utils/template-pipeline';
|
|
10
|
+
export { markdownToTiptap } from './utils/markdown-parser';
|
|
11
|
+
export { tiptapToMarkdown } from './utils/markdown-writer';
|
|
12
|
+
export { RepeatNode } from './extensions/repeat-node';
|
|
13
|
+
export { SubtotalsNode } from './extensions/subtotals-node';
|
|
14
|
+
export { parseXmlTemplate } from './utils/xml-template-parser';
|
|
15
|
+
export type { XmlTemplateParseResult } from './utils/xml-template-parser';
|
|
16
|
+
export { ThemeProvider, useTheme } from './contexts/ThemeContext';
|
|
17
|
+
export type { ThemeContextValue } from './contexts/ThemeContext';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpE,YAAY,EACV,eAAe,EACf,sBAAsB,EACtB,yBAAyB,EACzB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,6BAA6B,EAC7B,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,OAAO,GACR,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGxC,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAG7H,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,YAAY,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAG1E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAClE,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4248,7 +4248,8 @@ function VariableInsertPopover({
|
|
|
4248
4248
|
onInsert({
|
|
4249
4249
|
varName: varName.trim(),
|
|
4250
4250
|
varLabel: varLabel.trim(),
|
|
4251
|
-
varDefault: varDefault.trim()
|
|
4251
|
+
varDefault: varDefault.trim(),
|
|
4252
|
+
format: ""
|
|
4252
4253
|
});
|
|
4253
4254
|
handleOpenChange(false);
|
|
4254
4255
|
}, [varLabel, varName, varDefault, onInsert, handleOpenChange]);
|
|
@@ -4257,7 +4258,8 @@ function VariableInsertPopover({
|
|
|
4257
4258
|
onInsert({
|
|
4258
4259
|
varName: pv.varName,
|
|
4259
4260
|
varLabel: pv.varLabel || varNameToLabel(pv.varName),
|
|
4260
|
-
varDefault: ""
|
|
4261
|
+
varDefault: "",
|
|
4262
|
+
format: ""
|
|
4261
4263
|
});
|
|
4262
4264
|
handleOpenChange(false);
|
|
4263
4265
|
},
|
|
@@ -6928,7 +6930,7 @@ function renderOperationsSection(pageHeaderControls, detailControls, groupFooter
|
|
|
6928
6930
|
lines.push("");
|
|
6929
6931
|
return lines.join("\n");
|
|
6930
6932
|
}
|
|
6931
|
-
function renderGroupFooterBand(controls, registry,
|
|
6933
|
+
function renderGroupFooterBand(controls, registry, _contentWidth) {
|
|
6932
6934
|
const rows = groupByRow(controls);
|
|
6933
6935
|
const entries = [];
|
|
6934
6936
|
for (const row of rows) {
|