@lpdfio/lpdf 0.29.0 → 0.30.0

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/attrs.d.ts CHANGED
@@ -15,7 +15,8 @@ export interface ColumnAttr {
15
15
  /**
16
16
  * Space between the edge of the box and its content, written like CSS: one value for all sides,
17
17
  * two for top-bottom and left-right, three for top, left-right and bottom, four for top, right,
18
- * bottom and left.
18
+ * bottom and left. Each value is a length or a name from the space row of the tokens, and they
19
+ * can be mixed: 0pt 0pt 0pt m.
19
20
  */
20
21
  padding?: string;
21
22
  /**
@@ -47,9 +48,10 @@ export interface ColumnAttr {
47
48
  * Where the box falls in the page flow. no: never split the box, and move it whole to the next
48
49
  * page when it does not fit. break-before: start it on a new page. break-after: start the next
49
50
  * sibling on a new page. keep-next: keep it on one page with the sibling that follows, moving
50
- * both to the next page if that sibling would not fit. break-before, break-after and keep-next
51
- * take effect on the children of layout; on a box inside another box they are not applied. no
52
- * applies at any depth.
51
+ * both to the next page if that sibling would not fit and cannot start on this page: a table
52
+ * splits after its header and a row, and a text after a few lines, and then it stays with that
53
+ * first part. break-before, break-after and keep-next take effect on the children of layout; on a
54
+ * box inside another box they are not applied. no applies at any depth.
53
55
  */
54
56
  paginate?: string;
55
57
  debug?: string;
@@ -81,7 +83,8 @@ export interface RowAttr {
81
83
  /**
82
84
  * Space between the edge of the box and its content, written like CSS: one value for all sides,
83
85
  * two for top-bottom and left-right, three for top, left-right and bottom, four for top, right,
84
- * bottom and left.
86
+ * bottom and left. Each value is a length or a name from the space row of the tokens, and they
87
+ * can be mixed: 0pt 0pt 0pt m.
85
88
  */
86
89
  padding?: string;
87
90
  /**
@@ -113,9 +116,10 @@ export interface RowAttr {
113
116
  * Where the box falls in the page flow. no: never split the box, and move it whole to the next
114
117
  * page when it does not fit. break-before: start it on a new page. break-after: start the next
115
118
  * sibling on a new page. keep-next: keep it on one page with the sibling that follows, moving
116
- * both to the next page if that sibling would not fit. break-before, break-after and keep-next
117
- * take effect on the children of layout; on a box inside another box they are not applied. no
118
- * applies at any depth.
119
+ * both to the next page if that sibling would not fit and cannot start on this page: a table
120
+ * splits after its header and a row, and a text after a few lines, and then it stays with that
121
+ * first part. break-before, break-after and keep-next take effect on the children of layout; on a
122
+ * box inside another box they are not applied. no applies at any depth.
119
123
  */
120
124
  paginate?: string;
121
125
  debug?: string;
@@ -145,7 +149,8 @@ export interface GridAttr {
145
149
  /**
146
150
  * Space between the edge of the box and its content, written like CSS: one value for all sides,
147
151
  * two for top-bottom and left-right, three for top, left-right and bottom, four for top, right,
148
- * bottom and left.
152
+ * bottom and left. Each value is a length or a name from the space row of the tokens, and they
153
+ * can be mixed: 0pt 0pt 0pt m.
149
154
  */
150
155
  padding?: string;
151
156
  /**
@@ -177,9 +182,10 @@ export interface GridAttr {
177
182
  * Where the box falls in the page flow. no: never split the box, and move it whole to the next
178
183
  * page when it does not fit. break-before: start it on a new page. break-after: start the next
179
184
  * sibling on a new page. keep-next: keep it on one page with the sibling that follows, moving
180
- * both to the next page if that sibling would not fit. break-before, break-after and keep-next
181
- * take effect on the children of layout; on a box inside another box they are not applied. no
182
- * applies at any depth.
185
+ * both to the next page if that sibling would not fit and cannot start on this page: a table
186
+ * splits after its header and a row, and a text after a few lines, and then it stays with that
187
+ * first part. break-before, break-after and keep-next take effect on the children of layout; on a
188
+ * box inside another box they are not applied. no applies at any depth.
183
189
  */
184
190
  paginate?: string;
185
191
  debug?: string;
@@ -192,6 +198,176 @@ export interface GridAttr {
192
198
  colWidth?: string;
193
199
  cols?: string;
194
200
  }
201
+ /**
202
+ * A list of items, each with a marker: a bullet drawn as a shape, or a number the engine gives. The
203
+ * items go top to bottom with gap between them, each one a li, and a list nests inside an item. The
204
+ * words of an item start indent from the list's left edge, at every level. A long item splits
205
+ * across pages through the line the page ends in, and its marker stays with the first part.
206
+ */
207
+ export interface ListAttr {
208
+ font?: string;
209
+ fontSize?: string;
210
+ /**
211
+ * The color of the text inside the box. A text that sets no color of its own takes the nearest
212
+ * box's, and the text token when no box sets one. A divider or a barcode in the box keeps its own
213
+ * color.
214
+ */
215
+ color?: string;
216
+ gap?: string;
217
+ /**
218
+ * Space between the edge of the box and its content, written like CSS: one value for all sides,
219
+ * two for top-bottom and left-right, three for top, left-right and bottom, four for top, right,
220
+ * bottom and left. Each value is a length or a name from the space row of the tokens, and they
221
+ * can be mixed: 0pt 0pt 0pt m.
222
+ */
223
+ padding?: string;
224
+ /**
225
+ * Height of the box. Leave it out to size to the content. A length, or a name from the height row
226
+ * of the tokens, fixes it; fill takes what is left after its siblings (shared equally if several
227
+ * use fill); full takes all the height available. Any of these stops the box splitting across
228
+ * pages.
229
+ */
230
+ height?: string;
231
+ background?: string;
232
+ border?: string;
233
+ radius?: string;
234
+ /**
235
+ * How opaque the box and everything in it is, from 0 to 1. The box is faded as one, so children
236
+ * that overlap do not show through each other, and a box inside a faded box is faded further: 0.5
237
+ * inside 0.5 is drawn at 0.25. A form field in the box is not faded. Default 1.
238
+ */
239
+ opacity?: string;
240
+ /**
241
+ * A hard-edged shadow: a copy of the box, moved right and down by the first two lengths (negative
242
+ * is left and up) and filled with the color, drawn under the box with the same radius. An opacity
243
+ * from 0 to 1 after the color fades the shadow alone: "2pt 3pt #000000 0.2". There is no blur.
244
+ * The shadow takes no room in the layout, so it can run into the margin or a neighbor, and the
245
+ * siblings after the box are drawn over it. A box with no background shows the shadow only
246
+ * outside it. The box's own opacity fades the box and its shadow together.
247
+ */
248
+ shadow?: string;
249
+ /**
250
+ * Where the box falls in the page flow. no: never split the box, and move it whole to the next
251
+ * page when it does not fit. break-before: start it on a new page. break-after: start the next
252
+ * sibling on a new page. keep-next: keep it on one page with the sibling that follows, moving
253
+ * both to the next page if that sibling would not fit and cannot start on this page: a table
254
+ * splits after its header and a row, and a text after a few lines, and then it stays with that
255
+ * first part. break-before, break-after and keep-next take effect on the children of layout; on a
256
+ * box inside another box they are not applied. no applies at any depth.
257
+ */
258
+ paginate?: string;
259
+ debug?: string;
260
+ /** bullet marks each item with a shape, number with a number. Default bullet. */
261
+ type?: string;
262
+ /**
263
+ * How a number list writes its numbers: decimal (1, 2, 3), lower-alpha (a, b, c, then aa, ab),
264
+ * upper-alpha (A, B, C), lower-roman (i, ii, iii) or upper-roman (I, II, III). A number that a
265
+ * letter or a numeral can't write, below 1 or past 3999 for a numeral, is written in decimal.
266
+ * Default decimal.
267
+ */
268
+ format?: string;
269
+ /**
270
+ * The number of a number list's first item, to continue a list that something cut in two. Default
271
+ * 1.
272
+ */
273
+ start?: string;
274
+ /**
275
+ * Text before each number of a number list: prefix="(" and suffix=")" write (a). Default none.
276
+ */
277
+ prefix?: string;
278
+ /**
279
+ * Text after each number of a number list: suffix=")" writes a). Default a full stop, so a number
280
+ * is written 1.
281
+ */
282
+ suffix?: string;
283
+ /**
284
+ * The shape that marks the items of a bullet list. Without it a list uses a disc, a list inside a
285
+ * bullet list a circle, and one inside that a square, then the three again.
286
+ */
287
+ bullet?: string;
288
+ /**
289
+ * The width of the marker's column: the words of an item start this far from the list's left
290
+ * edge, and a list inside an item starts there too. The marker is set at the right of its column,
291
+ * so 9. and 10. end together, and a marker wider than the column is not made to fit. The same
292
+ * length at every level. Default 24pt.
293
+ */
294
+ indent?: string;
295
+ /**
296
+ * Width of the element. A length fixes it. fill, in a row, takes the width its line leaves after
297
+ * the other children, shared equally if several on the line use fill, and never moves to the next
298
+ * line; in a column it takes the full width.
299
+ */
300
+ width?: string;
301
+ }
302
+ /**
303
+ * One item of a list: a box that holds what a layout holds, such as a text, an image, a table or
304
+ * another list, and sits beside the item's marker. The words go in a text. data-source repeats the
305
+ * item once for each entry of the data, and the numbers of a number list follow what is made. The
306
+ * item's own box (padding, background, border) surrounds the marker and the content, and its gap
307
+ * goes between its children: the gap of the list, unless the item sets one.
308
+ */
309
+ export interface LiAttr {
310
+ font?: string;
311
+ fontSize?: string;
312
+ /**
313
+ * The color of the text inside the box. A text that sets no color of its own takes the nearest
314
+ * box's, and the text token when no box sets one. A divider or a barcode in the box keeps its own
315
+ * color.
316
+ */
317
+ color?: string;
318
+ gap?: string;
319
+ /**
320
+ * Space between the edge of the box and its content, written like CSS: one value for all sides,
321
+ * two for top-bottom and left-right, three for top, left-right and bottom, four for top, right,
322
+ * bottom and left. Each value is a length or a name from the space row of the tokens, and they
323
+ * can be mixed: 0pt 0pt 0pt m.
324
+ */
325
+ padding?: string;
326
+ /**
327
+ * Height of the box. Leave it out to size to the content. A length, or a name from the height row
328
+ * of the tokens, fixes it; fill takes what is left after its siblings (shared equally if several
329
+ * use fill); full takes all the height available. Any of these stops the box splitting across
330
+ * pages.
331
+ */
332
+ height?: string;
333
+ background?: string;
334
+ border?: string;
335
+ radius?: string;
336
+ /**
337
+ * How opaque the box and everything in it is, from 0 to 1. The box is faded as one, so children
338
+ * that overlap do not show through each other, and a box inside a faded box is faded further: 0.5
339
+ * inside 0.5 is drawn at 0.25. A form field in the box is not faded. Default 1.
340
+ */
341
+ opacity?: string;
342
+ /**
343
+ * A hard-edged shadow: a copy of the box, moved right and down by the first two lengths (negative
344
+ * is left and up) and filled with the color, drawn under the box with the same radius. An opacity
345
+ * from 0 to 1 after the color fades the shadow alone: "2pt 3pt #000000 0.2". There is no blur.
346
+ * The shadow takes no room in the layout, so it can run into the margin or a neighbor, and the
347
+ * siblings after the box are drawn over it. A box with no background shows the shadow only
348
+ * outside it. The box's own opacity fades the box and its shadow together.
349
+ */
350
+ shadow?: string;
351
+ /**
352
+ * Where the box falls in the page flow. no: never split the box, and move it whole to the next
353
+ * page when it does not fit. break-before: start it on a new page. break-after: start the next
354
+ * sibling on a new page. keep-next: keep it on one page with the sibling that follows, moving
355
+ * both to the next page if that sibling would not fit and cannot start on this page: a table
356
+ * splits after its header and a row, and a text after a few lines, and then it stays with that
357
+ * first part. break-before, break-after and keep-next take effect on the children of layout; on a
358
+ * box inside another box they are not applied. no applies at any depth.
359
+ */
360
+ paginate?: string;
361
+ debug?: string;
362
+ /**
363
+ * Makes the item's marker a checkbox in place of the bullet or the number: an outline in the line
364
+ * color, with a tick in the color of the item's words when this is true, and empty when it is
365
+ * false. The words start where those of a bullet do, and an item of a number list still takes its
366
+ * number. An item without it keeps its bullet or number. A task item of a Markdown, - [ ] or -
367
+ * [x], is one.
368
+ */
369
+ checked?: string;
370
+ }
195
371
  /**
196
372
  * A box around a single child, which it centres. Never splits across pages: if it does not fit, the
197
373
  * whole box moves to the next page.
@@ -208,7 +384,8 @@ export interface FrameAttr {
208
384
  /**
209
385
  * Space between the edge of the box and its content, written like CSS: one value for all sides,
210
386
  * two for top-bottom and left-right, three for top, left-right and bottom, four for top, right,
211
- * bottom and left.
387
+ * bottom and left. Each value is a length or a name from the space row of the tokens, and they
388
+ * can be mixed: 0pt 0pt 0pt m.
212
389
  */
213
390
  padding?: string;
214
391
  /**
@@ -240,9 +417,10 @@ export interface FrameAttr {
240
417
  * Where the box falls in the page flow. no: never split the box, and move it whole to the next
241
418
  * page when it does not fit. break-before: start it on a new page. break-after: start the next
242
419
  * sibling on a new page. keep-next: keep it on one page with the sibling that follows, moving
243
- * both to the next page if that sibling would not fit. break-before, break-after and keep-next
244
- * take effect on the children of layout; on a box inside another box they are not applied. no
245
- * applies at any depth.
420
+ * both to the next page if that sibling would not fit and cannot start on this page: a table
421
+ * splits after its header and a row, and a text after a few lines, and then it stays with that
422
+ * first part. break-before, break-after and keep-next take effect on the children of layout; on a
423
+ * box inside another box they are not applied. no applies at any depth.
246
424
  */
247
425
  paginate?: string;
248
426
  debug?: string;
@@ -302,6 +480,18 @@ export interface SpanAttr {
302
480
  underline?: string;
303
481
  strike?: string;
304
482
  }
483
+ /**
484
+ * A run of code inside a text: its words in Courier on a light tint, the tint drawn behind them. It
485
+ * is the inline twin of code, and like a span it is not broken inside, so it goes to the next line
486
+ * whole, and a run longer than a whole line breaks at the last character that fits, so nothing runs
487
+ * past the box. White space in it collapses as in the text around it.
488
+ */
489
+ export interface CodeSpanAttr {
490
+ font?: string;
491
+ color?: string;
492
+ /** The tint drawn behind the run. Default #f3f4f6. */
493
+ background?: string;
494
+ }
305
495
  /**
306
496
  * An image. It is never stretched. With only a width or a height, the other follows the image's
307
497
  * proportions. With both, they are a maximum: the image takes the largest size that fits in them,
@@ -474,6 +664,98 @@ export interface TextAttr {
474
664
  paginate?: string;
475
665
  debug?: string;
476
666
  }
667
+ /**
668
+ * Code, or any text whose spaces and lines matter, in a box. The text is kept as it is written:
669
+ * every space, and a new line wherever one is written, except the line break after the start tag
670
+ * and the indent of the line the end tag stands on. A line longer than the box wraps at a space,
671
+ * and a word with none breaks at the last character that fits, so nothing is cut off. A tab fills
672
+ * to the next multiple of tab-size columns. The box fills the width and grows with its lines, in
673
+ * Courier on a light tint with padding m unless font, background and padding say otherwise. It
674
+ * holds text and span children, which color or style parts of it. It splits across pages between
675
+ * lines, and each part is drawn in its own box. A code element is a column around one text, so the
676
+ * text takes its font, size and color from font, font-size and color.
677
+ */
678
+ export interface CodeAttr {
679
+ font?: string;
680
+ fontSize?: string;
681
+ /**
682
+ * The color of the text inside the box. A text that sets no color of its own takes the nearest
683
+ * box's, and the text token when no box sets one. A divider or a barcode in the box keeps its own
684
+ * color.
685
+ */
686
+ color?: string;
687
+ /**
688
+ * Space between the edge of the box and its content, written like CSS: one value for all sides,
689
+ * two for top-bottom and left-right, three for top, left-right and bottom, four for top, right,
690
+ * bottom and left. Each value is a length or a name from the space row of the tokens, and they
691
+ * can be mixed: 0pt 0pt 0pt m.
692
+ */
693
+ padding?: string;
694
+ /**
695
+ * Height of the box. Leave it out to size to the content. A length, or a name from the height row
696
+ * of the tokens, fixes it; fill takes what is left after its siblings (shared equally if several
697
+ * use fill); full takes all the height available. Any of these stops the box splitting across
698
+ * pages.
699
+ */
700
+ height?: string;
701
+ background?: string;
702
+ border?: string;
703
+ radius?: string;
704
+ /**
705
+ * How opaque the box and everything in it is, from 0 to 1. The box is faded as one, so children
706
+ * that overlap do not show through each other, and a box inside a faded box is faded further: 0.5
707
+ * inside 0.5 is drawn at 0.25. A form field in the box is not faded. Default 1.
708
+ */
709
+ opacity?: string;
710
+ /**
711
+ * A hard-edged shadow: a copy of the box, moved right and down by the first two lengths (negative
712
+ * is left and up) and filled with the color, drawn under the box with the same radius. An opacity
713
+ * from 0 to 1 after the color fades the shadow alone: "2pt 3pt #000000 0.2". There is no blur.
714
+ * The shadow takes no room in the layout, so it can run into the margin or a neighbor, and the
715
+ * siblings after the box are drawn over it. A box with no background shows the shadow only
716
+ * outside it. The box's own opacity fades the box and its shadow together.
717
+ */
718
+ shadow?: string;
719
+ /**
720
+ * Where the box falls in the page flow. no: never split the box, and move it whole to the next
721
+ * page when it does not fit. break-before: start it on a new page. break-after: start the next
722
+ * sibling on a new page. keep-next: keep it on one page with the sibling that follows, moving
723
+ * both to the next page if that sibling would not fit and cannot start on this page: a table
724
+ * splits after its header and a row, and a text after a few lines, and then it stays with that
725
+ * first part. break-before, break-after and keep-next take effect on the children of layout; on a
726
+ * box inside another box they are not applied. no applies at any depth.
727
+ */
728
+ paginate?: string;
729
+ debug?: string;
730
+ /**
731
+ * Width of the element. A length fixes it. fill, in a row, takes the width its line leaves after
732
+ * the other children, shared equally if several on the line use fill, and never moves to the next
733
+ * line; in a column it takes the full width.
734
+ */
735
+ width?: string;
736
+ /**
737
+ * How many columns a tab fills to: it moves the next character to the next multiple of this many
738
+ * characters from the start of the line. Default 4.
739
+ */
740
+ tabSize?: string;
741
+ /**
742
+ * The distance between lines, as a factor of the font size: a number above 0, such as 1.5, or a
743
+ * name from the line-height row of the tokens. Default 1.2, which is the token m.
744
+ */
745
+ lineHeight?: string;
746
+ /**
747
+ * The fewest lines of the code that may stand alone at the top of the next page when it splits.
748
+ * Default 2. If fewer would be left, lines move from the first page to the next; 1 turns the
749
+ * protection off.
750
+ */
751
+ widows?: string;
752
+ /**
753
+ * The fewest lines of the code that may stand alone at the bottom of a page when it splits.
754
+ * Default 2. If fewer would fit, the whole code moves to the next page; 1 turns the protection
755
+ * off.
756
+ */
757
+ orphans?: string;
758
+ }
477
759
  /**
478
760
  * Attributes of the `td` element.
479
761
  */
@@ -490,7 +772,8 @@ export interface TdAttr {
490
772
  /**
491
773
  * Space between the edge of the box and its content, written like CSS: one value for all sides,
492
774
  * two for top-bottom and left-right, three for top, left-right and bottom, four for top, right,
493
- * bottom and left.
775
+ * bottom and left. Each value is a length or a name from the space row of the tokens, and they
776
+ * can be mixed: 0pt 0pt 0pt m.
494
777
  */
495
778
  padding?: string;
496
779
  /**
@@ -522,9 +805,10 @@ export interface TdAttr {
522
805
  * Where the box falls in the page flow. no: never split the box, and move it whole to the next
523
806
  * page when it does not fit. break-before: start it on a new page. break-after: start the next
524
807
  * sibling on a new page. keep-next: keep it on one page with the sibling that follows, moving
525
- * both to the next page if that sibling would not fit. break-before, break-after and keep-next
526
- * take effect on the children of layout; on a box inside another box they are not applied. no
527
- * applies at any depth.
808
+ * both to the next page if that sibling would not fit and cannot start on this page: a table
809
+ * splits after its header and a row, and a text after a few lines, and then it stays with that
810
+ * first part. break-before, break-after and keep-next take effect on the children of layout; on a
811
+ * box inside another box they are not applied. no applies at any depth.
528
812
  */
529
813
  paginate?: string;
530
814
  debug?: string;
@@ -575,11 +859,31 @@ export interface TrAttr {
575
859
  */
576
860
  export interface TableAttr {
577
861
  /**
578
- * Column widths, separated by spaces, in fr, pt or % units: for example 2fr 1fr 120pt 20%.
862
+ * Column widths, separated by spaces, in fr, pt or % units, or auto: for example 2fr 1fr 120pt
863
+ * 20%. An auto column takes the width its cells need on one line, and the auto columns share what
864
+ * the pt and % columns leave, in proportion to what they need. When they do not fit, each keeps
865
+ * at least its longest word, and when not even those fit, the longest are cut and a short column
866
+ * keeps its width. auto and fr cannot be in one table: use pt or % for the fixed columns. For
867
+ * example auto 90pt 60pt.
579
868
  */
580
869
  cols: string;
870
+ /**
871
+ * A grid: a line around every cell, as thickness and color, for example 1pt #cccccc.
872
+ */
581
873
  border?: string;
874
+ /** The background of every other row below the header, or none. */
582
875
  stripe?: string;
876
+ /**
877
+ * The line under the header row, across the table, as thickness and color like border, or none:
878
+ * for example xs line.
879
+ */
880
+ headBorder?: string;
881
+ /**
882
+ * The line under each row, across the table, as thickness and color like border, or none: for
883
+ * example xs line-muted. Under the header row, head-border takes its place when it is set. A line
884
+ * stops where a cell spans on into the next row.
885
+ */
886
+ rowBorder?: string;
583
887
  gap?: string;
584
888
  padding?: string;
585
889
  background?: string;
@@ -660,6 +964,295 @@ export interface RegionAttr {
660
964
  w?: string;
661
965
  debug?: string;
662
966
  }
967
+ /**
968
+ * Markdown as the content of a section, where a layout would go. It holds only Markdown: optional
969
+ * markdown-styles, which say how each part of it looks, and one markdown-content, which holds the
970
+ * text. The page, a header, a footer or a cover are not Markdown, so they stay in the XML: layers
971
+ * paint a header and a footer in the margin, and a cover or a table of contents is a section of its
972
+ * own. CommonMark with tables, strikethrough and footnotes, and a $ is text. Raw HTML is for an
973
+ * HTML output, which a PDF is not, so a tag is left out and the words in it are kept: a block such
974
+ * as a p or a div puts the words around it on lines of their own. Two tags are read: br breaks a
975
+ * line, and img shows an image, at its width and height in pixels when it has them, which
976
+ * Markdown's own image has no way to say. An image at a URL, in Markdown or in an img, is left out,
977
+ * since an image must be an asset. A heading is a bookmark, so the table of contents and the
978
+ * outline of the viewer fill themselves.
979
+ */
980
+ export interface MarkdownAttr {
981
+ /**
982
+ * The space between the page edges and the Markdown: one value for all four sides, or two to four
983
+ * in the order top, right, bottom, left. Defaults to 36pt. A layer draws a header or a footer in
984
+ * it.
985
+ */
986
+ margin?: string;
987
+ /** The font of the Markdown, which a rule can change. Defaults to the document's. */
988
+ font?: string;
989
+ /** The size of the text of the Markdown, which a rule can change. Defaults to 11pt. */
990
+ fontSize?: string;
991
+ /**
992
+ * The color of the text of the Markdown, which a rule can change. Defaults to the text token.
993
+ */
994
+ color?: string;
995
+ /**
996
+ * The space between the blocks: headings, paragraphs, lists, code, quotes, tables and images.
997
+ * Default none.
998
+ */
999
+ gap?: string;
1000
+ /**
1001
+ * How many levels of headings become bookmarks, for the outline of the viewer and the table of
1002
+ * contents: n keeps the levels 1 to n, 0 none. Default 6.
1003
+ */
1004
+ bookmarks?: string;
1005
+ debug?: string;
1006
+ }
1007
+ /**
1008
+ * How the parts of the Markdown look. A rule is named after the Markdown it styles and takes the
1009
+ * attributes of the element it becomes, so that h1 takes what a text takes. A rule here overrides
1010
+ * the same rule of the file that src names, which overrides the defaults: a style that is not set
1011
+ * stays what it was. Values are the tokens' (font-size="xxl", color="primary") or plain lengths and
1012
+ * colors, and fonts are names from assets. A built-in font needs no rule for italic and bold; an
1013
+ * embedded font names the faces: em font="body-italic", strong font="body-bold".
1014
+ */
1015
+ export interface MarkdownStylesAttr {
1016
+ /**
1017
+ * A file of rules, whose root is a markdown-styles. The rules written here override its rules.
1018
+ * The engine reads no files: the SDK, the command line or the extension reads it, as it reads the
1019
+ * src of a font or an image.
1020
+ */
1021
+ src?: string;
1022
+ }
1023
+ /**
1024
+ * A heading of level 1, written # in Markdown.
1025
+ */
1026
+ export interface MarkdownH1Attr {
1027
+ font?: string;
1028
+ fontSize?: string;
1029
+ bold?: string;
1030
+ color?: string;
1031
+ align?: string;
1032
+ lineHeight?: string;
1033
+ padding?: string;
1034
+ background?: string;
1035
+ border?: string;
1036
+ radius?: string;
1037
+ }
1038
+ /**
1039
+ * A heading of level 2, written ## in Markdown.
1040
+ */
1041
+ export interface MarkdownH2Attr {
1042
+ font?: string;
1043
+ fontSize?: string;
1044
+ bold?: string;
1045
+ color?: string;
1046
+ align?: string;
1047
+ lineHeight?: string;
1048
+ padding?: string;
1049
+ background?: string;
1050
+ border?: string;
1051
+ radius?: string;
1052
+ }
1053
+ /**
1054
+ * A heading of level 3, written ### in Markdown.
1055
+ */
1056
+ export interface MarkdownH3Attr {
1057
+ font?: string;
1058
+ fontSize?: string;
1059
+ bold?: string;
1060
+ color?: string;
1061
+ align?: string;
1062
+ lineHeight?: string;
1063
+ padding?: string;
1064
+ background?: string;
1065
+ border?: string;
1066
+ radius?: string;
1067
+ }
1068
+ /**
1069
+ * A heading of level 4, written #### in Markdown.
1070
+ */
1071
+ export interface MarkdownH4Attr {
1072
+ font?: string;
1073
+ fontSize?: string;
1074
+ bold?: string;
1075
+ color?: string;
1076
+ align?: string;
1077
+ lineHeight?: string;
1078
+ padding?: string;
1079
+ background?: string;
1080
+ border?: string;
1081
+ radius?: string;
1082
+ }
1083
+ /**
1084
+ * A heading of level 5, written ##### in Markdown.
1085
+ */
1086
+ export interface MarkdownH5Attr {
1087
+ font?: string;
1088
+ fontSize?: string;
1089
+ bold?: string;
1090
+ color?: string;
1091
+ align?: string;
1092
+ lineHeight?: string;
1093
+ padding?: string;
1094
+ background?: string;
1095
+ border?: string;
1096
+ radius?: string;
1097
+ }
1098
+ /**
1099
+ * A heading of level 6, written ###### in Markdown.
1100
+ */
1101
+ export interface MarkdownH6Attr {
1102
+ font?: string;
1103
+ fontSize?: string;
1104
+ bold?: string;
1105
+ color?: string;
1106
+ align?: string;
1107
+ lineHeight?: string;
1108
+ padding?: string;
1109
+ background?: string;
1110
+ border?: string;
1111
+ radius?: string;
1112
+ }
1113
+ /**
1114
+ * A paragraph, and the words of a list item, a quote and a footnote.
1115
+ */
1116
+ export interface MarkdownPAttr {
1117
+ font?: string;
1118
+ fontSize?: string;
1119
+ bold?: string;
1120
+ color?: string;
1121
+ align?: string;
1122
+ lineHeight?: string;
1123
+ padding?: string;
1124
+ background?: string;
1125
+ border?: string;
1126
+ radius?: string;
1127
+ }
1128
+ /**
1129
+ * Code: the box of a fenced or indented block, and the run of inline code, which takes the font,
1130
+ * the color and the background. The language of a fence is ignored, since there is no highlighting
1131
+ * by language.
1132
+ */
1133
+ export interface MarkdownCodeAttr {
1134
+ font?: string;
1135
+ fontSize?: string;
1136
+ color?: string;
1137
+ lineHeight?: string;
1138
+ padding?: string;
1139
+ background?: string;
1140
+ border?: string;
1141
+ radius?: string;
1142
+ tabSize?: string;
1143
+ }
1144
+ /**
1145
+ * A block quote, written > in Markdown: a bar beside its content. font, font-size, color,
1146
+ * line-height and align set the words; padding, background, border and radius the box around the
1147
+ * bar and the words; bar-color and bar-width the bar, a strip along the left of the box: bar-width
1148
+ * is a length or a name from the space row of the tokens.
1149
+ */
1150
+ export interface MarkdownQuoteAttr {
1151
+ font?: string;
1152
+ fontSize?: string;
1153
+ bold?: string;
1154
+ color?: string;
1155
+ align?: string;
1156
+ lineHeight?: string;
1157
+ padding?: string;
1158
+ background?: string;
1159
+ border?: string;
1160
+ radius?: string;
1161
+ barColor?: string;
1162
+ barWidth?: string;
1163
+ }
1164
+ /**
1165
+ * An item of a bullet or a numbered list. indent is the width of the marker's column and bullet the
1166
+ * shape of a bullet list's marker, as on a list; gap goes between the blocks of an item.
1167
+ */
1168
+ export interface MarkdownLiAttr {
1169
+ font?: string;
1170
+ fontSize?: string;
1171
+ color?: string;
1172
+ gap?: string;
1173
+ padding?: string;
1174
+ background?: string;
1175
+ border?: string;
1176
+ indent?: string;
1177
+ bullet?: string;
1178
+ }
1179
+ /**
1180
+ * A link, written [text](url) in Markdown.
1181
+ */
1182
+ export interface MarkdownAAttr {
1183
+ font?: string;
1184
+ color?: string;
1185
+ bold?: string;
1186
+ underline?: string;
1187
+ }
1188
+ /**
1189
+ * Strong text, written **text** in Markdown. Bold in a built-in font; an embedded font names its
1190
+ * bold face in font.
1191
+ */
1192
+ export interface MarkdownStrongAttr {
1193
+ font?: string;
1194
+ color?: string;
1195
+ bold?: string;
1196
+ }
1197
+ /**
1198
+ * Emphasis, written *text* in Markdown. Italic in a built-in font; an embedded font names its
1199
+ * italic face in font.
1200
+ */
1201
+ export interface MarkdownEmAttr {
1202
+ font?: string;
1203
+ color?: string;
1204
+ }
1205
+ /**
1206
+ * Struck-through text, written ~~text~~ in Markdown.
1207
+ */
1208
+ export interface MarkdownDelAttr {
1209
+ font?: string;
1210
+ color?: string;
1211
+ strike?: string;
1212
+ }
1213
+ /**
1214
+ * A table. Its columns are sized by their content: a column takes the width its cells need on one
1215
+ * line, the room that is left is shared in proportion, and a name that does not fit breaks at the
1216
+ * edge of its cell. stripe is the color of every other row, or none; head-border is the line under
1217
+ * the header row and row-border the line under each of the other rows, as thickness and color like
1218
+ * border, or none. The default styles draw a line in line-muted under the header and under each
1219
+ * row, with no stripe.
1220
+ */
1221
+ export interface MarkdownTableAttr {
1222
+ border?: string;
1223
+ stripe?: string;
1224
+ headBorder?: string;
1225
+ rowBorder?: string;
1226
+ gap?: string;
1227
+ padding?: string;
1228
+ background?: string;
1229
+ }
1230
+ /**
1231
+ * A cell of a table's header row.
1232
+ */
1233
+ export interface MarkdownThAttr {
1234
+ font?: string;
1235
+ fontSize?: string;
1236
+ bold?: string;
1237
+ color?: string;
1238
+ align?: string;
1239
+ padding?: string;
1240
+ background?: string;
1241
+ border?: string;
1242
+ }
1243
+ /**
1244
+ * A cell of a table's other rows.
1245
+ */
1246
+ export interface MarkdownTdAttr {
1247
+ font?: string;
1248
+ fontSize?: string;
1249
+ bold?: string;
1250
+ color?: string;
1251
+ align?: string;
1252
+ padding?: string;
1253
+ background?: string;
1254
+ border?: string;
1255
+ }
663
1256
  /**
664
1257
  * Draws shapes, text, images and barcodes at exact positions on the page, independent of the
665
1258
  * flowing layout: watermarks, stamps, page furniture. Coordinates start at the top left corner of