ts-d2 0.0.4 → 0.0.20

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/Border/index.ts","../src/Color/index.ts","../src/Connection/index.ts","../src/Content/Barcode/index.ts","../src/Content/DocumentElement/index.ts","../src/Measure/index.ts","../src/Measure/Measure.ts","../src/Content/ReferencePoint/index.ts","../src/Content/ColumnDefinition/index.ts","../src/Content/Directory/index.ts","../src/Content/Text/index.ts","../src/Content/BranchDocumentElement/index.ts","../src/Content/Document/index.ts","../src/OutputFormat/index.ts","../src/Content/Footer/index.ts","../src/Content/Header/index.ts","../src/Content/PageDefinition/index.ts","../src/ParagraphFormat/index.ts","../src/Content/SpaceVertically/index.ts","../src/Font/index.ts","../src/Content/Formatted/index.ts","../src/Content/Linebreak/index.ts","../src/Content/Pagebreak/index.ts","../src/Content/Paragraph/index.ts","../src/Content/Span/index.ts","../src/Content/Table/index.ts","../src/Content/TableCell/index.ts","../src/Content/TableRow/index.ts","../src/Content/index.ts"],"sourcesContent":["import { Border, SideBorders } from \"./Border\";\nimport { Color, Colors } from \"./Color\";\nimport { Connection } from \"./Connection\";\nimport Content from \"./Content\";\nimport { Font, StandardFonts } from \"./Font\";\nimport * as Measure from \"./Measure\";\nimport * as Output from \"./OutputFormat\";\nimport { ParagraphFormat } from \"./ParagraphFormat\";\n\nexport default {\n Border: {\n Border,\n SideBorders,\n },\n Color: {\n Color,\n Colors,\n },\n Connection,\n Content,\n Font: {\n Font,\n StandardFonts,\n },\n Measure,\n Output,\n ParagraphFormat,\n};\n","import Proto from \"docframe-types\";\nimport { Color } from \"~/Color\";\nimport { AbsoluteMeasure, Sides } from \"~/Measure\";\n\nexport class Border {\n width: AbsoluteMeasure;\n color: Color;\n\n constructor(width: AbsoluteMeasure, color: Color) {\n this.width = width;\n this.color = color;\n }\n\n public toDocFrame(): Proto.ProtoBorder {\n return new Proto.ProtoBorder({\n weight: this.width.toDocFrame(),\n color: this.color.toDocFrame(),\n });\n }\n}\n\nexport class SideBorders {\n value: Sides<Border>;\n\n constructor(settings: Sides<Border>) {\n this.value = settings;\n }\n\n public toDocFrame(): Proto.ProtoSideBorders {\n return new Proto.ProtoSideBorders({\n top: this.value.top?.toDocFrame(),\n right: this.value.right?.toDocFrame(),\n bottom: this.value.bottom?.toDocFrame(),\n left: this.value.left?.toDocFrame(),\n });\n }\n}\n","import Proto from \"docframe-types\";\n\nexport class Color {\n private color: Proto.ProtoColor;\n\n static rgb(r: number, g: number, b: number): Color {\n if (r < 0 || r > 255) {\n throw new Error(`Invalid red value: ${r}`);\n }\n\n if (g < 0 || g > 255) {\n throw new Error(`Invalid green value: ${g}`);\n }\n\n if (b < 0 || b > 255) {\n throw new Error(`Invalid blue value: ${b}`);\n }\n\n return new Color(Proto.ProtoColor.create({\n type: Proto.ProtoColorType.RGB,\n r,\n g,\n b,\n }));\n }\n\n static cmyk(c: number, m: number, y: number, k: number): Color {\n if (c < 0 || c > 100) {\n throw new Error(`Invalid cyan value: ${c}`);\n }\n\n if (m < 0 || m > 100) {\n throw new Error(`Invalid magenta value: ${m}`);\n }\n\n if (y < 0 || y > 100) {\n throw new Error(`Invalid yellow value: ${y}`);\n }\n\n if (k < 0 || k > 100) {\n throw new Error(`Invalid black value: ${k}`);\n }\n\n return new Color(Proto.ProtoColor.create({\n type: Proto.ProtoColorType.CMYK,\n c,\n m,\n y,\n k,\n }));\n }\n\n static fromHex(hex: string): Color {\n if (hex.startsWith(\"#\")) {\n hex = hex.slice(1);\n }\n\n if (hex.length !== 6) {\n throw new Error(`Invalid hex color: ${hex}`);\n }\n\n const r = parseInt(hex.slice(0, 2), 16);\n const g = parseInt(hex.slice(2, 4), 16);\n const b = parseInt(hex.slice(4, 6), 16);\n\n return new Color(Proto.ProtoColor.create({\n type: Proto.ProtoColorType.RGB,\n r,\n g,\n b,\n }));\n }\n\n private constructor(color: Proto.ProtoColor) {\n this.color = color;\n }\n\n\n public toDocFrame(): Proto.ProtoColor {\n return this.color;\n }\n}\n\nexport namespace Colors {\n export const white = Color.rgb(255, 255, 255);\n\n export const black = Color.cmyk(0, 0, 0, 100);\n}\n","import axios from \"axios\";\nimport FormData from \"form-data\";\nimport dotenv from \"dotenv\";\n\nimport Proto from \"docframe-types\";\n\nimport { Document } from \"content/Document\";\nimport { OutputParams } from \"~/OutputFormat\";\n\n// Load environment variables from .env file\ndotenv.config();\n\nexport class Connection {\n url: string;\n token: string;\n\n constructor(url?: string, token?: string) {\n this.url = url || process.env.DOCPIPE_URL || \"http://localhost:8080\";\n this.token = token || process.env.DOCPIPE_TOKEN || \"\";\n }\n\n get docframeCallUrl() {\n return `${this.url}/api/docframe?token=${this.token}`;\n }\n\n convertTo<K extends keyof OutputParams>(\n format: K,\n doc: Document,\n outputParams?: OutputParams[K],\n jobParams?: Record<string, any>,\n ): Promise<Blob> {\n const node = doc.toDocFrame();\n\n const protoData = Proto.Node.encode(node).finish();\n\n const form = new FormData();\n\n let meta = {\n format,\n };\n\n if (outputParams) {\n meta = {\n ...meta,\n ...outputParams,\n };\n }\n\n if (jobParams) {\n meta = {\n ...meta,\n ...jobParams,\n };\n }\n\n form.append(\"meta\", JSON.stringify(meta), {\n contentType: \"application/json\",\n filename: \"meta\",\n });\n\n form.append(\"proto-data\", protoData, {\n contentType: \"application/protobuf\",\n filename: \"data.proto\",\n });\n\n return new Promise((resolve, reject) => {\n axios\n .postForm(this.docframeCallUrl, form, {\n headers: {\n ...form.getHeaders(),\n },\n responseType: \"arraybuffer\",\n })\n .then(async (res) => {\n const blob = await new Response(res.data, {\n headers: {\n \"Content-Type\": res.headers[\"content-type\"],\n },\n }).blob();\n\n resolve(blob);\n })\n .catch((err) => {\n reject(err);\n });\n });\n }\n}\n\nexport const defaultConnection = new Connection();\n","import Proto from \"docframe-types\";\n\nimport { DocumentElement } from \"content/DocumentElement\";\nimport { AbsoluteMeasure, Measure } from \"~/Measure\";\nimport {\n ReferencePoint,\n referencePointToDocFrame,\n} from \"content/ReferencePoint\";\n\ninterface BarcodeProperties {\n type: Proto.ProtoBarcodeType;\n x: AbsoluteMeasure;\n y: AbsoluteMeasure;\n referencePoint: ReferencePoint;\n\n /**\n * Rotation in degrees, counter-clockwise\n */\n rotation: number;\n width: AbsoluteMeasure;\n height: AbsoluteMeasure;\n data: string;\n positionAbsolute: boolean;\n}\n\nexport class Barcode extends DocumentElement {\n props: BarcodeProperties;\n\n constructor(props: BarcodeProperties) {\n super();\n\n this.props = props;\n }\n\n public toDocFrame(): Proto.Node {\n return Proto.Node.create({\n barcode: Proto.ProtoBarcode.create({\n type: this.props.type,\n\n positionAbsolute: this.props.positionAbsolute,\n referencePoint: referencePointToDocFrame(this.props.referencePoint),\n x: this.props.x.toDocFrame(),\n y: this.props.y.toDocFrame(),\n rotation: this.props.rotation,\n\n width: this.props.width.toDocFrame(),\n height: this.props.height.toDocFrame(),\n padding: Measure.zero.toDocFrame(),\n\n data: this.props.data,\n }),\n });\n }\n}\n","import Proto from \"docframe-types\";\n\nexport abstract class DocumentElement {\n public abstract toDocFrame(): Proto.Node;\n}\n\nexport type Content = string | DocumentElement | (DocumentElement | string)[];\n","import { AbsoluteMeasure, Measure, SideMeasures, Sides } from \"./Measure\";\n\nexport { AbsoluteMeasure, Measure, SideMeasures, Sides };\n","import Proto from \"docframe-types\";\n\nexport type AbsoluteMeasureUnit = \"pt\" | \"cm\" | \"mm\" | \"in\" | \"px\";\n\nexport type RelativeMeasureUnit = \"%\";\nexport type MeasureUnit = AbsoluteMeasureUnit | RelativeMeasureUnit;\n\nexport class Measure<Unit = MeasureUnit> {\n readonly value: number;\n readonly unit: Unit;\n\n static zero = new Measure(0, \"pt\" as AbsoluteMeasureUnit);\n\n constructor(value: number, unit: Unit) {\n this.value = value;\n this.unit = unit;\n }\n\n public toDocFrame(): Proto.ProtoMeasure {\n switch (this.unit) {\n case \"pt\":\n return new Proto.ProtoMeasure({\n value: this.value,\n mtype: Proto.ProtoMeasureType.PT,\n });\n\n case \"cm\":\n return new Proto.ProtoMeasure({\n value: this.value,\n mtype: Proto.ProtoMeasureType.CM,\n });\n\n case \"mm\":\n return new Proto.ProtoMeasure({\n value: this.value,\n mtype: Proto.ProtoMeasureType.MM,\n });\n\n case \"in\":\n return new Proto.ProtoMeasure({\n value: this.value,\n mtype: Proto.ProtoMeasureType.IN,\n });\n\n case \"px\":\n return new Proto.ProtoMeasure({\n value: this.value,\n mtype: Proto.ProtoMeasureType.PX,\n });\n\n case \"%\":\n return new Proto.ProtoMeasure({\n value: this.value,\n mtype: Proto.ProtoMeasureType.PERCENT,\n });\n\n default:\n throw new Error(`Unknown measure unit: ${this.unit}`);\n }\n }\n}\n\nexport class AbsoluteMeasure extends Measure<AbsoluteMeasureUnit> {}\n\nexport class SideMeasures {\n value: Sides<AbsoluteMeasure>;\n\n constructor(settings: Sides<AbsoluteMeasure>) {\n this.value = settings;\n }\n\n public toDocFrame(): Proto.ProtoSideMeasures {\n return new Proto.ProtoSideMeasures({\n top: this.value.top?.toDocFrame(),\n right: this.value.right?.toDocFrame(),\n bottom: this.value.bottom?.toDocFrame(),\n left: this.value.left?.toDocFrame(),\n });\n }\n}\n\n\nexport class Sides<T> {\n top?: T;\n right?: T;\n bottom?: T;\n left?: T;\n}\n\n/*\n\n\n\nexport class RelativeMeasure extends Measure<RelativeMeasureUnit> {\n constructor(value: number) {\n super(value, \"%\");\n }\n}\n\n\n\n\n*/","import Proto from \"docframe-types\";\n\n/**\n * A ReferencePoint is used for elements like barcodes to specify the reference point\n * of an object.\n * Example:\n * When specified reference point \"top-left\", the top-left point of a barcode is positioned\n * relative to the top-left edge of the current line or page.\n */\nexport type ReferencePoint = \"top-left\" | \"top-right\" | \"center\" | \"bottom-left\" | \"bottom-right\";\n\nexport function referencePointToDocFrame(point: ReferencePoint): Proto.ProtoImageReferencePoint {\n switch (point) {\n case \"top-left\":\n return Proto.ProtoImageReferencePoint.REF_POINT_TOP_LEFT;\n\n case \"top-right\":\n return Proto.ProtoImageReferencePoint.REF_POINT_TOP_RIGHT;\n\n case \"center\":\n return Proto.ProtoImageReferencePoint.REF_POINT_CENTER;\n\n case \"bottom-left\":\n return Proto.ProtoImageReferencePoint.REF_POINT_BOTTOM_LEFT;\n\n case \"bottom-right\":\n return Proto.ProtoImageReferencePoint.REF_POINT_BOTTOM_RIGHT;\n\n default:\n throw new Error(`Unknown reference point: ${point}`);\n }\n}","import Proto from \"docframe-types\";\n\nimport { v4 as uuidv4 } from \"uuid\";\nimport { AbsoluteMeasure } from \"~/Measure\";\n\nclass ColumnPositionMode {\n public readonly value: Proto.ProtoPositionMode;\n\n constructor(value: Proto.ProtoPositionMode) {\n this.value = value;\n }\n\n public toDocFrame(): Proto.ProtoPositionMode {\n return this.value;\n }\n}\n\nexport namespace ColumnPosition {\n export const Center = new ColumnPositionMode(Proto.ProtoPositionMode.CENTER);\n export const Left = new ColumnPositionMode(Proto.ProtoPositionMode.LEFT);\n export const Folio = new ColumnPositionMode(Proto.ProtoPositionMode.FOLIO);\n export const Right = new ColumnPositionMode(Proto.ProtoPositionMode.RIGHT);\n export const ReverseFolio = new ColumnPositionMode(\n Proto.ProtoPositionMode.REVERSE_FOLIO,\n );\n}\n\nexport interface ColumnDefinitionProperties {\n width: AbsoluteMeasure;\n position: ColumnPositionMode;\n interColumnSpace: AbsoluteMeasure;\n positionOffset: AbsoluteMeasure;\n}\n\nexport class ColumnDefinition {\n props: ColumnDefinitionProperties;\n uuid: string;\n\n constructor(props: ColumnDefinitionProperties) {\n this.props = props;\n\n this.uuid = uuidv4();\n }\n\n public toDocFrame(applyImmediate: boolean): Proto.Node[] {\n const result = [\n Proto.Node.create({\n cDef: Proto.ProtoCDef.create({\n Uuid: this.uuid,\n columSettings: Proto.ProtoColumnSettings.create({\n width: Proto.ProtoBoxedMeasure.create({\n isNull: false,\n value: this.props.width.toDocFrame(),\n }),\n positionOffset: Proto.ProtoBoxedMeasure.create({\n isNull: false,\n value: this.props.positionOffset.toDocFrame(),\n }),\n positionMode: this.props.position.toDocFrame(),\n interColumnSpace: Proto.ProtoBoxedMeasure.create({\n isNull: false,\n value: this.props.interColumnSpace.toDocFrame(),\n }),\n }),\n }),\n }),\n ];\n\n if (applyImmediate) {\n result.push(\n Proto.Node.create({\n applyCDef: Proto.ProtoApplyProtoCDef.create({\n cDefUuid: this.uuid,\n }),\n }),\n );\n }\n\n return result;\n }\n}\n\nexport const ColumnDefinitions = {\n A4: {\n Single: new ColumnDefinition({\n width: new AbsoluteMeasure(490, \"pt\"),\n position: ColumnPosition.Left,\n positionOffset: new AbsoluteMeasure(70, \"pt\"),\n interColumnSpace: new AbsoluteMeasure(30, \"pt\"),\n }),\n Double: new ColumnDefinition({\n width: new AbsoluteMeasure(230, \"pt\"),\n position: ColumnPosition.Left,\n positionOffset: new AbsoluteMeasure(70, \"pt\"),\n interColumnSpace: new AbsoluteMeasure(30, \"pt\"),\n }),\n },\n};\n","import Proto from \"docframe-types\";\n\nimport { BranchDocumentElement } from \"content/BranchDocumentElement\";\n\nexport class Directory extends BranchDocumentElement {\n public toDocFrame(): Proto.Node {\n return Proto.Node.create({\n directory: Proto.ProtoDirectory.create({}),\n\n children: this.childrenToDocFrame(),\n });\n }\n}\n","import Proto from \"docframe-types\";\n\nimport { DocumentElement } from \"content/DocumentElement\";\n\nexport class Text extends DocumentElement {\n constructor(content: string) {\n super();\n this.content = content;\n }\n\n public content: string;\n\n public toDocFrame(): Proto.Node {\n return Proto.Node.create({\n text: Proto.ProtoText.create({\n content: this.content,\n }),\n });\n }\n}\n","import { Node } from \"docframe-types\";\nimport { Content, DocumentElement } from \"content/DocumentElement\";\nimport { Text } from \"content/Text\";\n\nexport abstract class BranchDocumentElement<P = never> extends DocumentElement {\n protected children: DocumentElement[] = [];\n protected _props?: P;\n\n constructor(children?: Content, props?: P) {\n super();\n\n this._props = props;\n\n if (children === undefined) {\n this.children = [];\n return;\n }\n\n this.children = documentElementsFromContent(children);\n }\n\n public appendChildren(children: DocumentElement[]): void {\n this.children = this.children.concat(children);\n }\n\n public appendChild(child: DocumentElement): void {\n this.children.push(child);\n }\n\n public prependChildren(children: DocumentElement[]): void {\n this.children = children.concat(this.children);\n }\n\n public prependChild(child: DocumentElement): void {\n this.children.unshift(child);\n }\n\n public childrenToDocFrame(): Node[] {\n return this.children.map((child) => child.toDocFrame());\n }\n\n set props(props: P | undefined) {\n this._props = props;\n }\n\n get props(): P | undefined {\n return this._props;\n }\n}\n\nfunction documentElementsFromContent(content: Content): DocumentElement[] {\n if (typeof content === \"string\") {\n return [new Text(content)];\n } else if (Array.isArray(content)) {\n return content.map(documentElementsFromContent).flat();\n } else {\n return [content];\n }\n}\n","import Proto from \"docframe-types\";\n\nimport { defaultConnection } from \"~/Connection\";\nimport { OutputFormat, OutputParams } from \"~/OutputFormat\";\nimport { BranchDocumentElement } from \"content/BranchDocumentElement\";\nimport { ColumnDefinition, ColumnDefinitions } from \"content/ColumnDefinition\";\nimport { Content } from \"content/DocumentElement\";\nimport { Footer } from \"content/Footer\";\nimport { Header } from \"content/Header\";\nimport { PageDefinition, PageDefinitions } from \"content/PageDefinition\";\nimport { ParagraphFormat } from \"~/ParagraphFormat\";\nimport { SpaceVertically } from \"content/SpaceVertically\";\nimport { StandardFonts } from \"~/Font\";\nimport { AbsoluteMeasure } from \"~/Measure\";\n\nexport interface DocumentProperties {\n pageDefinition: PageDefinition;\n columnDefinition: ColumnDefinition;\n\n defaultHeader?: Header;\n defaultFooter?: Footer;\n\n paragraphFormats?: Record<string, ParagraphFormat>;\n}\n\nexport class Document extends BranchDocumentElement<DocumentProperties> {\n paragraphFormats: Record<string, ParagraphFormat> = {};\n\n constructor(content?: Content, props?: DocumentProperties) {\n super(content, props);\n\n if (props === undefined) {\n this.props = {\n pageDefinition: PageDefinitions.A4,\n columnDefinition: ColumnDefinitions.A4.Single,\n defaultHeader: new Header(\n new SpaceVertically(new AbsoluteMeasure(40, \"pt\")),\n ),\n defaultFooter: new Footer(\n new SpaceVertically(new AbsoluteMeasure(40, \"pt\")),\n ),\n };\n } else {\n this.props = props;\n }\n\n this.paragraphFormats = this.props.paragraphFormats || {\n Text: new ParagraphFormat({\n font: StandardFonts.Helvetica,\n fontSize: new AbsoluteMeasure(12, \"pt\"),\n lineFeed: new AbsoluteMeasure(14, \"pt\"),\n indentionWidth: new AbsoluteMeasure(15, \"pt\"),\n name: \"Text\",\n default: true,\n }),\n };\n }\n\n getParagraphFormat(name: string): ParagraphFormat | undefined {\n return this.paragraphFormats[name];\n }\n\n registerParagraphFormat(name: string, pf: ParagraphFormat) {\n this.paragraphFormats[name] = pf;\n }\n\n convertTo<Format extends keyof OutputParams>(\n outputFormat: Format,\n outputParams?: OutputParams[Format],\n ): Promise<Blob> {\n return defaultConnection.convertTo(outputFormat, this, outputParams);\n }\n\n convertToPDF(outputParams?: OutputParams[\"pdf\"]): Promise<Blob> {\n return defaultConnection.convertTo(OutputFormat.PDF, this, outputParams);\n }\n\n /*\n public getProtoParagraphFormat(format?: ParagraphFormat): Proto.IProtoParagraphFormat {\n if (!format) {\n return this.defaultParagraphFormat;\n }\n\n if (!format.format.name) {\n throw new Error(\"ParagraphFormat must have a name\");\n }\n\n if (!this.paragraphFormats[format.format.name]) {\n this.paragraphFormats[format.format.name] = format.toDocFrame();\n }\n\n return this.paragraphFormats[format.format.name];\n }\n */\n\n public toDocFrame(): Proto.Node {\n const props = this.props!;\n\n const docSettings = Object.values(this.paragraphFormats)\n .map((pf) =>\n Proto.Node.create({\n paragraphFormat: pf.toDocFrame(),\n }),\n )\n .concat([\n Proto.Node.create({\n pDef: props.pageDefinition.toDocFrame(),\n }),\n Proto.Node.create({\n applyPDef: Proto.ProtoApplyProtoPDef.create({\n pDefUuid: props.pageDefinition.uuid,\n }),\n }),\n ...props.columnDefinition.toDocFrame(true),\n ]);\n\n if (props.defaultHeader) {\n docSettings.push(props.defaultHeader.toDocFrame());\n }\n\n if (props.defaultFooter) {\n docSettings.push(props.defaultFooter.toDocFrame());\n }\n\n const content = this.childrenToDocFrame();\n\n for (const format of Object.values(this.paragraphFormats)) {\n docSettings.push(\n Proto.Node.create({\n paragraphFormat: format.toDocFrame(),\n }),\n );\n }\n\n return Proto.Node.create({\n children: docSettings.concat(...content),\n });\n }\n}\n","enum OutputFormat {\n PDF = \"pdf\",\n PNG = \"png\",\n JPEG = \"jpeg\",\n HTML = \"html\",\n PS = \"ps\",\n TEXT = \"text\",\n}\n\ntype OutputParams = {\n [OutputFormat.HTML]: {};\n [OutputFormat.PDF]: {};\n [OutputFormat.JPEG]: {};\n [OutputFormat.PS]: {};\n [OutputFormat.TEXT]: {};\n [OutputFormat.PNG]: {\n /**\n * The width of the output in pixels.\n * @default The width of the document in pixels.\n */\n width?: number;\n\n /**\n * The height of the output in pixels.\n * @default The height of the document in pixels.\n */\n height?: number;\n\n /**\n * The resolution of the output in pixels per inch.\n * @default 300 dpi.\n */\n dpi?: number;\n };\n}\n\nexport {\n OutputFormat,\n OutputParams,\n}","import { BranchDocumentElement } from \"content/BranchDocumentElement\";\n\nimport Proto from \"docframe-types\";\n\nexport class Footer extends BranchDocumentElement {\n public toDocFrame(): Proto.Node {\n return Proto.Node.create({\n footer: Proto.ProtoFooter.create(),\n children: this.childrenToDocFrame(),\n });\n }\n}\n","import { BranchDocumentElement } from \"content/BranchDocumentElement\";\n\nimport Proto from \"docframe-types\";\n\nexport class Header extends BranchDocumentElement<never> {\n public toDocFrame(): Proto.Node {\n return Proto.Node.create({\n header: Proto.ProtoHeader.create(),\n children: this.childrenToDocFrame(),\n });\n }\n}\n","import Proto from \"docframe-types\";\nimport { v4 } from \"uuid\";\nimport { AbsoluteMeasure } from \"~/Measure\";\n\nexport class PageDefinition {\n width?: AbsoluteMeasure;\n height?: AbsoluteMeasure;\n uuid: string;\n\n constructor(width?: AbsoluteMeasure, height?: AbsoluteMeasure) {\n this.width = width;\n this.height = height;\n\n this.uuid = v4();\n }\n\n public toDocFrame(): Proto.ProtoPDef {\n return new Proto.ProtoPDef({\n pageDepth: new Proto.ProtoBoxedMeasure({\n isNull: this.height === undefined,\n value: this.height?.toDocFrame(),\n }),\n pageWidth: new Proto.ProtoBoxedMeasure({\n isNull: this.width === undefined,\n value: this.width?.toDocFrame(),\n }),\n Uuid: this.uuid,\n });\n }\n}\n\nexport namespace PageDefinitions {\n export const A3 = new PageDefinition(\n new AbsoluteMeasure(297, \"mm\"),\n new AbsoluteMeasure(420, \"mm\"),\n );\n\n export const A4 = new PageDefinition(\n new AbsoluteMeasure(210, \"mm\"),\n new AbsoluteMeasure(297, \"mm\"),\n );\n\n export const A5 = new PageDefinition(\n new AbsoluteMeasure(148, \"mm\"),\n new AbsoluteMeasure(210, \"mm\"),\n );\n}\n","import Proto, { IProtoParagraphFormat } from \"docframe-types\";\nimport { v4 as uuidv4 } from \"uuid\";\nimport { AbsoluteMeasure } from \"~/Measure\";\nimport { Font } from \"~/Font\";\nimport { HorizontalAlignment } from \"~/Alignment\";\n\nexport interface ParagraphFormatProperties {\n default?: boolean;\n name?: string;\n\n alignment?: HorizontalAlignment;\n\n font?: Font;\n fontSize?: AbsoluteMeasure;\n characterWidth?: AbsoluteMeasure;\n characterSpacing?: AbsoluteMeasure;\n lineFeed?: AbsoluteMeasure;\n bold?: boolean;\n italic?: boolean;\n\n indentionLevel?: number;\n indentionWidth?: AbsoluteMeasure;\n\n spaceAbove?: AbsoluteMeasure;\n spaceBelow?: AbsoluteMeasure;\n}\n\nexport class ParagraphFormat {\n props: ParagraphFormatProperties;\n\n constructor(props: ParagraphFormatProperties) {\n this.props = props;\n\n this.props.name = props.name || uuidv4();\n }\n\n public toDocFrame(): Proto.IProtoParagraphFormat {\n let format: IProtoParagraphFormat = {\n default: Proto.ProtoBoxedBool.create({\n isNull: false,\n value: this.props.default || false,\n }),\n name: Proto.ProtoBoxedString.create({\n isNull: false,\n value: this.props.name,\n }),\n };\n\n if (this.props.alignment) {\n format.alignment = Proto.ProtoBoxedHorizontalAlignment.create({\n isNull: false,\n value: this.props.alignment.toDocFrame(),\n });\n }\n\n if (this.props.font) {\n format.font = Proto.ProtoBoxedFont.create({\n isNull: false,\n value: this.props.font.toDocFrame(),\n });\n }\n\n if (this.props.fontSize) {\n format.fontSize = Proto.ProtoBoxedMeasure.create({\n isNull: false,\n value: this.props.fontSize.toDocFrame(),\n });\n }\n\n if (this.props.characterWidth) {\n format.characterWidth = Proto.ProtoBoxedMeasure.create({\n isNull: false,\n value: this.props.characterWidth.toDocFrame(),\n });\n }\n\n if (this.props.characterSpacing) {\n format.characterSpacing = Proto.ProtoBoxedMeasure.create({\n isNull: false,\n value: this.props.characterSpacing.toDocFrame(),\n });\n }\n\n if (this.props.lineFeed) {\n format.lineFeed = Proto.ProtoBoxedMeasure.create({\n isNull: false,\n value: this.props.lineFeed.toDocFrame(),\n });\n }\n\n if (this.props.indentionLevel !== undefined) {\n format.indentionLevel = Proto.ProtoBoxedInt32.create({\n isNull: false,\n value: this.props.indentionLevel,\n });\n }\n\n if (this.props.indentionWidth) {\n format.indentionWidth = Proto.ProtoBoxedMeasure.create({\n isNull: false,\n value: this.props.indentionWidth.toDocFrame(),\n });\n }\n\n if (this.props.bold !== undefined) {\n format.bold = Proto.ProtoBoxedBool.create({\n isNull: false,\n value: !!this.props.bold,\n });\n }\n\n if (this.props.italic !== undefined) {\n format.italic = Proto.ProtoBoxedBool.create({\n isNull: false,\n value: !!this.props.italic,\n });\n }\n\n if (this.props.spaceAbove) {\n format.spaceAbove = Proto.ProtoBoxedMeasure.create({\n isNull: false,\n value: this.props.spaceAbove.toDocFrame(),\n });\n }\n\n if (this.props.spaceBelow) {\n format.spaceBelow = Proto.ProtoBoxedMeasure.create({\n isNull: false,\n value: this.props.spaceBelow.toDocFrame(),\n });\n }\n\n return Proto.ProtoParagraphFormat.create(format);\n }\n}\n","import Proto from \"docframe-types\";\n\nimport { DocumentElement } from \"content/DocumentElement\";\nimport { AbsoluteMeasure } from \"~/Measure\";\n\nexport class SpaceVertically extends DocumentElement {\n space: AbsoluteMeasure;\n\n constructor(space: AbsoluteMeasure) {\n super();\n\n this.space = space;\n }\n\n public toDocFrame(): Proto.Node {\n return Proto.Node.create({\n spaceVertically: Proto.ProtoSpaceVertically.create({\n space: this.space.toDocFrame(),\n }),\n });\n }\n}\n","import { ProtoFont } from \"docframe-types\";\n\nexport class Font {\n private name: string;\n\n constructor(name: string) {\n this.name = name;\n }\n\n public toDocFrame(): ProtoFont {\n return ProtoFont.create({\n name: this.name,\n // TODO: suppot font mapping for docframe step\n id: 5\n });\n }\n}\n\nexport const StandardFonts = {\n Helvetica: new Font(\"helvetica\"),\n};\n","import Proto from \"docframe-types\";\n\nimport { DocumentElement } from \"content/DocumentElement\";\n\nexport class Formatted extends DocumentElement {\n constructor(doctypeContent: string | undefined, htmlContent?: string) {\n super();\n this.content = {\n doctype: doctypeContent,\n html: htmlContent,\n };\n }\n\n public content: {\n doctype: string | undefined;\n html: string | undefined;\n };\n\n public toDocFrame(): Proto.Node {\n return Proto.Node.create({\n formatted: Proto.ProtoFormatted.create({\n doctypeContent: this.content.doctype,\n htmlContent: this.content.html,\n }),\n });\n }\n}\n","import Proto from \"docframe-types\";\n\nimport { DocumentElement } from \"content/DocumentElement\";\n\nexport class Linebreak extends DocumentElement {\n public toDocFrame(): Proto.Node {\n return Proto.Node.create({\n linebreak: Proto.ProtoLinebreak.create({}),\n });\n }\n}\n","import Proto from \"docframe-types\";\n\nimport { DocumentElement } from \"content/DocumentElement\";\n\nexport class Pagebreak extends DocumentElement {\n public toDocFrame(): Proto.Node {\n return Proto.Node.create({\n newPage: Proto.ProtoNewPage.create({}),\n });\n }\n}\n","import { BranchDocumentElement } from \"content/BranchDocumentElement\";\n\nimport Proto from \"docframe-types\";\nimport { ParagraphFormat } from \"~/ParagraphFormat\";\nimport { Content } from \"content/DocumentElement\";\n\nexport interface ParagraphSettings {\n paragraphFormatName?: string;\n overwrite?: ParagraphFormat;\n}\n\nexport class Paragraph extends BranchDocumentElement<ParagraphSettings> {\n constructor(\n content?: Content,\n paragraphFormatName?: string | ParagraphFormat,\n overwrite?: ParagraphFormat,\n ) {\n super(content, {\n overwrite,\n paragraphFormatName:\n typeof paragraphFormatName === \"string\"\n ? paragraphFormatName\n : paragraphFormatName?.props?.name,\n });\n }\n\n public toDocFrame(): Proto.Node {\n const par = {} as Proto.IProtoParagraph;\n\n if (this.props!.overwrite) {\n par.overwrite = this.props!.overwrite.toDocFrame();\n }\n\n if (this.props!.paragraphFormatName) {\n par.format = Proto.ProtoParagraphFormat.create({\n name: Proto.ProtoBoxedString.create({\n isNull: false,\n value: this.props!.paragraphFormatName,\n }),\n });\n }\n\n return Proto.Node.create({\n paragraph: Proto.ProtoParagraph.create(par),\n children: this.childrenToDocFrame(),\n });\n }\n}\n","import Proto from \"docframe-types\";\n\nimport { BranchDocumentElement } from \"content/BranchDocumentElement\";\nimport { Content } from \"content/DocumentElement\";\n\nexport interface SpanProperties {\n bold?: boolean;\n italic?: boolean;\n underline?: boolean;\n strikethrough?: boolean;\n}\n\nexport class Span extends BranchDocumentElement<SpanProperties> {\n constructor(content?: Content, props?: SpanProperties) {\n super(content, props || {});\n }\n\n public toDocFrame(): Proto.Node {\n let bold: Proto.ProtoBoxedBool | undefined = undefined;\n if (this.props?.bold !== undefined) {\n bold = Proto.ProtoBoxedBool.create({\n isNull: false,\n value: this.props.bold,\n });\n }\n\n let italic: Proto.ProtoBoxedBool | undefined = undefined;\n if (this.props?.italic !== undefined) {\n italic = Proto.ProtoBoxedBool.create({\n isNull: false,\n value: this.props.italic,\n });\n }\n\n let underline: Proto.ProtoBoxedBool | undefined = undefined;\n if (this.props?.underline !== undefined) {\n underline = Proto.ProtoBoxedBool.create({\n isNull: false,\n value: this.props.underline,\n });\n }\n\n let strikethrough: Proto.ProtoBoxedBool | undefined = undefined;\n if (this.props?.strikethrough !== undefined) {\n strikethrough = Proto.ProtoBoxedBool.create({\n isNull: false,\n value: this.props.strikethrough,\n });\n }\n\n return Proto.Node.create({\n span: Proto.ProtoSpan.create({\n bold: bold,\n italic: italic,\n underline: underline,\n strikethrough: strikethrough,\n }),\n\n children: this.childrenToDocFrame(),\n });\n }\n}\n","import Proto from \"docframe-types\";\n\nimport { BranchDocumentElement } from \"content/BranchDocumentElement\";\nimport { Content } from \"content/DocumentElement\";\nimport { Measure } from \"~/Measure\";\n\nexport interface TableSettings {\n width?: Measure;\n xOffset?: Measure;\n}\n\nexport class Table extends BranchDocumentElement<TableSettings> {\n constructor(content?: Content, props?: TableSettings) {\n super(content, props || {});\n if (!this.props!.xOffset) {\n this.props!.xOffset = Measure.zero;\n }\n }\n\n public toDocFrame(): Proto.Node {\n const props = this.props!;\n\n return Proto.Node.create({\n table: Proto.ProtoTable.create({\n settings: Proto.ProtoTableSettings.create({\n width: props.width?.toDocFrame(),\n leftMeasure: Proto.ProtoBoxedBool.create({\n isNull: false,\n value: false,\n }),\n xOffset: props.xOffset?.toDocFrame(),\n }),\n }),\n children: this.childrenToDocFrame(),\n });\n }\n}\n","import Proto from \"docframe-types\";\n\nimport { BranchDocumentElement } from \"content/BranchDocumentElement\";\nimport { Content } from \"content/DocumentElement\";\nimport { Measure, SideMeasures } from \"~/Measure\";\nimport { HorizontalAlignment, VerticalAlignment } from \"~/Alignment\";\nimport { Color } from \"~/Color\";\nimport { SideBorders } from \"~/Border\";\n\nexport interface TableCellProperties {\n alignment?: HorizontalAlignment;\n backgroundColor?: Color;\n border?: SideBorders;\n margin?: SideMeasures;\n padding?: SideMeasures;\n verticalAlignment?: VerticalAlignment;\n width?: Measure;\n}\n\nexport class TableCell extends BranchDocumentElement<TableCellProperties> {\n constructor(content?: Content, props?: TableCellProperties) {\n super(content, props || {});\n }\n\n public toDocFrame(): Proto.Node {\n const props = this.props!;\n\n return Proto.Node.create({\n tableCell: Proto.ProtoTableCell.create({\n settings: Proto.ProtoTableCellSettings.create({\n align: Proto.ProtoBoxedHorizontalAlignment.create({\n isNull: false,\n value:\n props!.alignment?.toDocFrame() ||\n Proto.ProtoHorizontalAlignment.ALIGN_LEFT,\n }),\n backgroundColor: props.backgroundColor?.toDocFrame(),\n border: props.border?.toDocFrame(),\n margin: props.margin?.toDocFrame(),\n padding: props.padding?.toDocFrame(),\n valign: Proto.ProtoBoxedVerticalAlignment.create({\n isNull: false,\n value:\n props.verticalAlignment?.toDocFrame() ||\n Proto.ProtoVerticalAlignment.TOP,\n }),\n width: props.width?.toDocFrame(),\n }),\n }),\n children: this.childrenToDocFrame(),\n });\n }\n}\n","import Proto from \"docframe-types\";\n\nimport { BranchDocumentElement } from \"content/BranchDocumentElement\";\nimport { Content } from \"content/DocumentElement\";\nimport { AbsoluteMeasure } from \"~/Measure\";\n\nexport interface TableRowProperties {\n minHeight?: AbsoluteMeasure;\n}\n\nexport class TableRow extends BranchDocumentElement<TableRowProperties> {\n constructor(content?: Content, props?: TableRowProperties) {\n super(content, props || {});\n }\n\n public toDocFrame(): Proto.Node {\n return Proto.Node.create({\n tableRow: Proto.ProtoTableRow.create({\n settings: Proto.ProtoTableRowSettings.create({\n minHeight: this.props!.minHeight?.toDocFrame(),\n }),\n }),\n children: this.childrenToDocFrame(),\n });\n }\n}\n","import { Barcode } from \"./Barcode\";\nimport { ColumnDefinition, ColumnPosition } from \"./ColumnDefinition\";\nimport { Directory } from \"./Directory\";\nimport { Document } from \"./Document\";\nimport { Footer } from \"./Footer\";\nimport { Formatted } from \"./Formatted\";\nimport { Header } from \"./Header\";\nimport { Linebreak } from \"./Linebreak\";\nimport { Pagebreak } from \"./Pagebreak\";\nimport { PageDefinition } from \"./PageDefinition\";\nimport { Paragraph } from \"./Paragraph\";\nimport { SpaceVertically } from \"./SpaceVertically\";\nimport { Span } from \"./Span\";\nimport { Table } from \"./Table\";\nimport { TableCell } from \"./TableCell\";\nimport { TableRow } from \"./TableRow\";\nimport { Text } from \"./Text\";\n\nexport default {\n Barcode,\n ColumnDefinition,\n ColumnPosition,\n Directory,\n Document,\n Footer,\n Formatted,\n Header,\n Linebreak,\n Pagebreak,\n PageDefinition,\n Paragraph,\n SpaceVert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,wBAAAA,QAAM,sBAAsB,OAAO;AAAA,UAC3C,YAAW,UAAK,MAAO,cAAZ,mBAAuB;AAAA,QACpC,CAAC;AAAA,MACH,CAAC;AAAA,MACD,UAAU,KAAK,mBAAmB;AAAA,IACpC,CAAC;AAAA,EACH;AACF;;;ACPA,IAAO,kBAAQ;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;;;A7B5BA,IAAO,gBAAQ;AAAA,EACb,QAAQ;AAAA,IACN;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,EACA;AAAA,EACA,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":["Proto","import_docframe_types","Proto","Colors","import_docframe_types","dotenv","Proto","FormData","axios","import_docframe_types","import_docframe_types","Proto","import_docframe_types","Proto","Proto","import_docframe_types","ColumnPosition","Proto","uuidv4","import_docframe_types","import_docframe_types","Proto","Proto","import_docframe_types","OutputFormat","import_docframe_types","Proto","import_docframe_types","Proto","import_docframe_types","import_uuid","Proto","PageDefinitions","import_docframe_types","import_uuid","uuidv4","Proto","import_docframe_types","Proto","import_docframe_types","Proto","import_docframe_types","Proto","import_docframe_types","Proto","import_docframe_types","Proto","import_docframe_types","Proto","import_docframe_types","Proto","import_docframe_types","Proto","import_docframe_types","Proto","import_docframe_types","Proto"]}
@@ -36,24 +36,16 @@ declare class Measure$1<Unit = MeasureUnit> {
36
36
  }
37
37
  declare class AbsoluteMeasure extends Measure$1<AbsoluteMeasureUnit> {
38
38
  }
39
- type Sides<T> = {
40
- top?: T;
41
- right?: T;
42
- bottom?: T;
43
- left?: T;
44
- };
45
39
  declare class SideMeasures {
46
40
  value: Sides<AbsoluteMeasure>;
47
41
  constructor(settings: Sides<AbsoluteMeasure>);
48
42
  toDocFrame(): Proto.ProtoSideMeasures;
49
43
  }
50
-
51
- interface TableRowProperties {
52
- minHeight?: AbsoluteMeasure;
53
- }
54
- declare class TableRow extends BranchDocumentElement<TableRowProperties> {
55
- constructor(content?: Content, props?: TableRowProperties);
56
- toDocFrame(): Proto.Node;
44
+ declare class Sides<T> {
45
+ top?: T;
46
+ right?: T;
47
+ bottom?: T;
48
+ left?: T;
57
49
  }
58
50
 
59
51
  type Measure_AbsoluteMeasure = AbsoluteMeasure;
@@ -61,8 +53,17 @@ declare const Measure_AbsoluteMeasure: typeof AbsoluteMeasure;
61
53
  type Measure_SideMeasures = SideMeasures;
62
54
  declare const Measure_SideMeasures: typeof SideMeasures;
63
55
  type Measure_Sides<T> = Sides<T>;
56
+ declare const Measure_Sides: typeof Sides;
64
57
  declare namespace Measure {
65
- export { Measure_AbsoluteMeasure as AbsoluteMeasure, Measure$1 as Measure, Measure_SideMeasures as SideMeasures, type Measure_Sides as Sides };
58
+ export { Measure_AbsoluteMeasure as AbsoluteMeasure, Measure$1 as Measure, Measure_SideMeasures as SideMeasures, Measure_Sides as Sides };
59
+ }
60
+
61
+ interface TableRowProperties {
62
+ minHeight?: AbsoluteMeasure;
63
+ }
64
+ declare class TableRow extends BranchDocumentElement<TableRowProperties> {
65
+ constructor(content?: Content, props?: TableRowProperties);
66
+ toDocFrame(): Proto.Node;
66
67
  }
67
68
 
68
69
  declare class HorizontalAlignment {
@@ -124,6 +125,17 @@ declare class Table extends BranchDocumentElement<TableSettings> {
124
125
  toDocFrame(): Proto.Node;
125
126
  }
126
127
 
128
+ interface SpanProperties {
129
+ bold?: boolean;
130
+ italic?: boolean;
131
+ underline?: boolean;
132
+ strikethrough?: boolean;
133
+ }
134
+ declare class Span extends BranchDocumentElement<SpanProperties> {
135
+ constructor(content?: Content, props?: SpanProperties);
136
+ toDocFrame(): Proto.Node;
137
+ }
138
+
127
139
  declare class SpaceVertically extends DocumentElement {
128
140
  space: AbsoluteMeasure;
129
141
  constructor(space: AbsoluteMeasure);
@@ -167,10 +179,6 @@ declare class Paragraph extends BranchDocumentElement<ParagraphSettings> {
167
179
  toDocFrame(): Proto.Node;
168
180
  }
169
181
 
170
- declare class Pagebreak extends DocumentElement {
171
- toDocFrame(): Proto.Node;
172
- }
173
-
174
182
  declare class PageDefinition {
175
183
  width?: AbsoluteMeasure;
176
184
  height?: AbsoluteMeasure;
@@ -179,6 +187,18 @@ declare class PageDefinition {
179
187
  toDocFrame(): Proto.ProtoPDef;
180
188
  }
181
189
 
190
+ declare class Pagebreak extends DocumentElement {
191
+ toDocFrame(): Proto.Node;
192
+ }
193
+
194
+ declare class Linebreak extends DocumentElement {
195
+ toDocFrame(): Proto.Node;
196
+ }
197
+
198
+ declare class Header extends BranchDocumentElement<never> {
199
+ toDocFrame(): Proto.Node;
200
+ }
201
+
182
202
  declare class Formatted extends DocumentElement {
183
203
  constructor(doctypeContent: string | undefined, htmlContent?: string);
184
204
  content: {
@@ -188,6 +208,10 @@ declare class Formatted extends DocumentElement {
188
208
  toDocFrame(): Proto.Node;
189
209
  }
190
210
 
211
+ declare class Footer extends BranchDocumentElement {
212
+ toDocFrame(): Proto.Node;
213
+ }
214
+
191
215
  declare enum OutputFormat {
192
216
  PDF = "pdf",
193
217
  PNG = "png",
@@ -253,14 +277,6 @@ declare class ColumnDefinition {
253
277
  toDocFrame(applyImmediate: boolean): Proto.Node[];
254
278
  }
255
279
 
256
- declare class Footer extends BranchDocumentElement {
257
- toDocFrame(): Proto.Node;
258
- }
259
-
260
- declare class Header extends BranchDocumentElement<never> {
261
- toDocFrame(): Proto.Node;
262
- }
263
-
264
280
  interface DocumentProperties {
265
281
  pageDefinition: PageDefinition;
266
282
  columnDefinition: ColumnDefinition;
@@ -278,6 +294,10 @@ declare class Document extends BranchDocumentElement<DocumentProperties> {
278
294
  toDocFrame(): Proto.Node;
279
295
  }
280
296
 
297
+ declare class Directory extends BranchDocumentElement {
298
+ toDocFrame(): Proto.Node;
299
+ }
300
+
281
301
  /**
282
302
  * A ReferencePoint is used for elements like barcodes to specify the reference point
283
303
  * of an object.
@@ -312,7 +332,7 @@ declare class Connection {
312
332
  token: string;
313
333
  constructor(url?: string, token?: string);
314
334
  get docframeCallUrl(): string;
315
- convertTo<K extends keyof OutputParams>(format: K, doc: Document, outputParams?: OutputParams[K]): Promise<Blob>;
335
+ convertTo<K extends keyof OutputParams>(format: K, doc: Document, outputParams?: OutputParams[K], jobParams?: Record<string, any>): Promise<Blob>;
316
336
  }
317
337
 
318
338
  declare const _default: {
@@ -329,12 +349,17 @@ declare const _default: {
329
349
  Barcode: typeof Barcode;
330
350
  ColumnDefinition: typeof ColumnDefinition;
331
351
  ColumnPosition: typeof ColumnPosition;
352
+ Directory: typeof Directory;
332
353
  Document: typeof Document;
354
+ Footer: typeof Footer;
333
355
  Formatted: typeof Formatted;
334
- PageDefinition: typeof PageDefinition;
356
+ Header: typeof Header;
357
+ Linebreak: typeof Linebreak;
335
358
  Pagebreak: typeof Pagebreak;
359
+ PageDefinition: typeof PageDefinition;
336
360
  Paragraph: typeof Paragraph;
337
361
  SpaceVertically: typeof SpaceVertically;
362
+ Span: typeof Span;
338
363
  Table: typeof Table;
339
364
  TableCell: typeof TableCell;
340
365
  TableRow: typeof TableRow;
package/dist/index.d.ts CHANGED
@@ -36,24 +36,16 @@ declare class Measure$1<Unit = MeasureUnit> {
36
36
  }
37
37
  declare class AbsoluteMeasure extends Measure$1<AbsoluteMeasureUnit> {
38
38
  }
39
- type Sides<T> = {
40
- top?: T;
41
- right?: T;
42
- bottom?: T;
43
- left?: T;
44
- };
45
39
  declare class SideMeasures {
46
40
  value: Sides<AbsoluteMeasure>;
47
41
  constructor(settings: Sides<AbsoluteMeasure>);
48
42
  toDocFrame(): Proto.ProtoSideMeasures;
49
43
  }
50
-
51
- interface TableRowProperties {
52
- minHeight?: AbsoluteMeasure;
53
- }
54
- declare class TableRow extends BranchDocumentElement<TableRowProperties> {
55
- constructor(content?: Content, props?: TableRowProperties);
56
- toDocFrame(): Proto.Node;
44
+ declare class Sides<T> {
45
+ top?: T;
46
+ right?: T;
47
+ bottom?: T;
48
+ left?: T;
57
49
  }
58
50
 
59
51
  type Measure_AbsoluteMeasure = AbsoluteMeasure;
@@ -61,8 +53,17 @@ declare const Measure_AbsoluteMeasure: typeof AbsoluteMeasure;
61
53
  type Measure_SideMeasures = SideMeasures;
62
54
  declare const Measure_SideMeasures: typeof SideMeasures;
63
55
  type Measure_Sides<T> = Sides<T>;
56
+ declare const Measure_Sides: typeof Sides;
64
57
  declare namespace Measure {
65
- export { Measure_AbsoluteMeasure as AbsoluteMeasure, Measure$1 as Measure, Measure_SideMeasures as SideMeasures, type Measure_Sides as Sides };
58
+ export { Measure_AbsoluteMeasure as AbsoluteMeasure, Measure$1 as Measure, Measure_SideMeasures as SideMeasures, Measure_Sides as Sides };
59
+ }
60
+
61
+ interface TableRowProperties {
62
+ minHeight?: AbsoluteMeasure;
63
+ }
64
+ declare class TableRow extends BranchDocumentElement<TableRowProperties> {
65
+ constructor(content?: Content, props?: TableRowProperties);
66
+ toDocFrame(): Proto.Node;
66
67
  }
67
68
 
68
69
  declare class HorizontalAlignment {
@@ -124,6 +125,17 @@ declare class Table extends BranchDocumentElement<TableSettings> {
124
125
  toDocFrame(): Proto.Node;
125
126
  }
126
127
 
128
+ interface SpanProperties {
129
+ bold?: boolean;
130
+ italic?: boolean;
131
+ underline?: boolean;
132
+ strikethrough?: boolean;
133
+ }
134
+ declare class Span extends BranchDocumentElement<SpanProperties> {
135
+ constructor(content?: Content, props?: SpanProperties);
136
+ toDocFrame(): Proto.Node;
137
+ }
138
+
127
139
  declare class SpaceVertically extends DocumentElement {
128
140
  space: AbsoluteMeasure;
129
141
  constructor(space: AbsoluteMeasure);
@@ -167,10 +179,6 @@ declare class Paragraph extends BranchDocumentElement<ParagraphSettings> {
167
179
  toDocFrame(): Proto.Node;
168
180
  }
169
181
 
170
- declare class Pagebreak extends DocumentElement {
171
- toDocFrame(): Proto.Node;
172
- }
173
-
174
182
  declare class PageDefinition {
175
183
  width?: AbsoluteMeasure;
176
184
  height?: AbsoluteMeasure;
@@ -179,6 +187,18 @@ declare class PageDefinition {
179
187
  toDocFrame(): Proto.ProtoPDef;
180
188
  }
181
189
 
190
+ declare class Pagebreak extends DocumentElement {
191
+ toDocFrame(): Proto.Node;
192
+ }
193
+
194
+ declare class Linebreak extends DocumentElement {
195
+ toDocFrame(): Proto.Node;
196
+ }
197
+
198
+ declare class Header extends BranchDocumentElement<never> {
199
+ toDocFrame(): Proto.Node;
200
+ }
201
+
182
202
  declare class Formatted extends DocumentElement {
183
203
  constructor(doctypeContent: string | undefined, htmlContent?: string);
184
204
  content: {
@@ -188,6 +208,10 @@ declare class Formatted extends DocumentElement {
188
208
  toDocFrame(): Proto.Node;
189
209
  }
190
210
 
211
+ declare class Footer extends BranchDocumentElement {
212
+ toDocFrame(): Proto.Node;
213
+ }
214
+
191
215
  declare enum OutputFormat {
192
216
  PDF = "pdf",
193
217
  PNG = "png",
@@ -253,14 +277,6 @@ declare class ColumnDefinition {
253
277
  toDocFrame(applyImmediate: boolean): Proto.Node[];
254
278
  }
255
279
 
256
- declare class Footer extends BranchDocumentElement {
257
- toDocFrame(): Proto.Node;
258
- }
259
-
260
- declare class Header extends BranchDocumentElement<never> {
261
- toDocFrame(): Proto.Node;
262
- }
263
-
264
280
  interface DocumentProperties {
265
281
  pageDefinition: PageDefinition;
266
282
  columnDefinition: ColumnDefinition;
@@ -278,6 +294,10 @@ declare class Document extends BranchDocumentElement<DocumentProperties> {
278
294
  toDocFrame(): Proto.Node;
279
295
  }
280
296
 
297
+ declare class Directory extends BranchDocumentElement {
298
+ toDocFrame(): Proto.Node;
299
+ }
300
+
281
301
  /**
282
302
  * A ReferencePoint is used for elements like barcodes to specify the reference point
283
303
  * of an object.
@@ -312,7 +332,7 @@ declare class Connection {
312
332
  token: string;
313
333
  constructor(url?: string, token?: string);
314
334
  get docframeCallUrl(): string;
315
- convertTo<K extends keyof OutputParams>(format: K, doc: Document, outputParams?: OutputParams[K]): Promise<Blob>;
335
+ convertTo<K extends keyof OutputParams>(format: K, doc: Document, outputParams?: OutputParams[K], jobParams?: Record<string, any>): Promise<Blob>;
316
336
  }
317
337
 
318
338
  declare const _default: {
@@ -329,12 +349,17 @@ declare const _default: {
329
349
  Barcode: typeof Barcode;
330
350
  ColumnDefinition: typeof ColumnDefinition;
331
351
  ColumnPosition: typeof ColumnPosition;
352
+ Directory: typeof Directory;
332
353
  Document: typeof Document;
354
+ Footer: typeof Footer;
333
355
  Formatted: typeof Formatted;
334
- PageDefinition: typeof PageDefinition;
356
+ Header: typeof Header;
357
+ Linebreak: typeof Linebreak;
335
358
  Pagebreak: typeof Pagebreak;
359
+ PageDefinition: typeof PageDefinition;
336
360
  Paragraph: typeof Paragraph;
337
361
  SpaceVertically: typeof SpaceVertically;
362
+ Span: typeof Span;
338
363
  Table: typeof Table;
339
364
  TableCell: typeof TableCell;
340
365
  TableRow: typeof TableRow;