@lpdfio/lpdf 0.28.1 → 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/L.d.ts +9 -2
- package/dist/L.js +8 -0
- package/dist/attrs.d.ts +702 -45
- package/dist/browser.js +44 -3
- package/dist/canvas.d.ts +3 -3
- package/dist/constants.d.ts +7 -0
- package/dist/constants.js +7 -1
- package/dist/engine.d.ts +25 -4
- package/dist/engine.js +70 -6
- package/dist/index.d.ts +6 -4
- package/dist/index.js +5 -1
- package/dist/kit.d.ts +14 -3
- package/dist/layout.d.ts +65 -3
- package/dist/layout.js +40 -0
- package/dist/markdown.d.ts +75 -0
- package/dist/markdown.js +63 -0
- package/dist/wasm/lpdf-web.js +157 -3
- package/dist/wasm/lpdf.js +163 -3
- package/dist/wasm/lpdf_bg.wasm +0 -0
- package/package.json +4 -1
package/dist/attrs.d.ts
CHANGED
|
@@ -15,13 +15,15 @@ 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
|
/**
|
|
22
|
-
* Height of the box. Leave it out to size to the content. A length
|
|
23
|
-
* left after its siblings (shared equally if several
|
|
24
|
-
* available. Any of these stops the box splitting across
|
|
23
|
+
* Height of the box. Leave it out to size to the content. A length, or a name from the height row
|
|
24
|
+
* of the tokens, fixes it; fill takes what is left after its siblings (shared equally if several
|
|
25
|
+
* use fill); full takes all the height available. Any of these stops the box splitting across
|
|
26
|
+
* pages.
|
|
25
27
|
*/
|
|
26
28
|
height?: string;
|
|
27
29
|
background?: string;
|
|
@@ -46,9 +48,10 @@ export interface ColumnAttr {
|
|
|
46
48
|
* Where the box falls in the page flow. no: never split the box, and move it whole to the next
|
|
47
49
|
* page when it does not fit. break-before: start it on a new page. break-after: start the next
|
|
48
50
|
* sibling on a new page. keep-next: keep it on one page with the sibling that follows, moving
|
|
49
|
-
* both to the next page if that sibling would not fit
|
|
50
|
-
*
|
|
51
|
-
*
|
|
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.
|
|
52
55
|
*/
|
|
53
56
|
paginate?: string;
|
|
54
57
|
debug?: string;
|
|
@@ -80,13 +83,15 @@ export interface RowAttr {
|
|
|
80
83
|
/**
|
|
81
84
|
* Space between the edge of the box and its content, written like CSS: one value for all sides,
|
|
82
85
|
* two for top-bottom and left-right, three for top, left-right and bottom, four for top, right,
|
|
83
|
-
* 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.
|
|
84
88
|
*/
|
|
85
89
|
padding?: string;
|
|
86
90
|
/**
|
|
87
|
-
* Height of the box. Leave it out to size to the content. A length
|
|
88
|
-
* left after its siblings (shared equally if several
|
|
89
|
-
* available. Any of these stops the box splitting across
|
|
91
|
+
* Height of the box. Leave it out to size to the content. A length, or a name from the height row
|
|
92
|
+
* of the tokens, fixes it; fill takes what is left after its siblings (shared equally if several
|
|
93
|
+
* use fill); full takes all the height available. Any of these stops the box splitting across
|
|
94
|
+
* pages.
|
|
90
95
|
*/
|
|
91
96
|
height?: string;
|
|
92
97
|
background?: string;
|
|
@@ -111,9 +116,10 @@ export interface RowAttr {
|
|
|
111
116
|
* Where the box falls in the page flow. no: never split the box, and move it whole to the next
|
|
112
117
|
* page when it does not fit. break-before: start it on a new page. break-after: start the next
|
|
113
118
|
* sibling on a new page. keep-next: keep it on one page with the sibling that follows, moving
|
|
114
|
-
* both to the next page if that sibling would not fit
|
|
115
|
-
*
|
|
116
|
-
*
|
|
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.
|
|
117
123
|
*/
|
|
118
124
|
paginate?: string;
|
|
119
125
|
debug?: string;
|
|
@@ -143,13 +149,15 @@ export interface GridAttr {
|
|
|
143
149
|
/**
|
|
144
150
|
* Space between the edge of the box and its content, written like CSS: one value for all sides,
|
|
145
151
|
* two for top-bottom and left-right, three for top, left-right and bottom, four for top, right,
|
|
146
|
-
* 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.
|
|
147
154
|
*/
|
|
148
155
|
padding?: string;
|
|
149
156
|
/**
|
|
150
|
-
* Height of the box. Leave it out to size to the content. A length
|
|
151
|
-
* left after its siblings (shared equally if several
|
|
152
|
-
* available. Any of these stops the box splitting across
|
|
157
|
+
* Height of the box. Leave it out to size to the content. A length, or a name from the height row
|
|
158
|
+
* of the tokens, fixes it; fill takes what is left after its siblings (shared equally if several
|
|
159
|
+
* use fill); full takes all the height available. Any of these stops the box splitting across
|
|
160
|
+
* pages.
|
|
153
161
|
*/
|
|
154
162
|
height?: string;
|
|
155
163
|
background?: string;
|
|
@@ -174,9 +182,10 @@ export interface GridAttr {
|
|
|
174
182
|
* Where the box falls in the page flow. no: never split the box, and move it whole to the next
|
|
175
183
|
* page when it does not fit. break-before: start it on a new page. break-after: start the next
|
|
176
184
|
* sibling on a new page. keep-next: keep it on one page with the sibling that follows, moving
|
|
177
|
-
* both to the next page if that sibling would not fit
|
|
178
|
-
*
|
|
179
|
-
*
|
|
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.
|
|
180
189
|
*/
|
|
181
190
|
paginate?: string;
|
|
182
191
|
debug?: string;
|
|
@@ -189,6 +198,176 @@ export interface GridAttr {
|
|
|
189
198
|
colWidth?: string;
|
|
190
199
|
cols?: string;
|
|
191
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
|
+
}
|
|
192
371
|
/**
|
|
193
372
|
* A box around a single child, which it centres. Never splits across pages: if it does not fit, the
|
|
194
373
|
* whole box moves to the next page.
|
|
@@ -205,13 +384,15 @@ export interface FrameAttr {
|
|
|
205
384
|
/**
|
|
206
385
|
* Space between the edge of the box and its content, written like CSS: one value for all sides,
|
|
207
386
|
* two for top-bottom and left-right, three for top, left-right and bottom, four for top, right,
|
|
208
|
-
* 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.
|
|
209
389
|
*/
|
|
210
390
|
padding?: string;
|
|
211
391
|
/**
|
|
212
|
-
* Height of the box. Leave it out to size to the content. A length
|
|
213
|
-
* left after its siblings (shared equally if several
|
|
214
|
-
* available. Any of these stops the box splitting across
|
|
392
|
+
* Height of the box. Leave it out to size to the content. A length, or a name from the height row
|
|
393
|
+
* of the tokens, fixes it; fill takes what is left after its siblings (shared equally if several
|
|
394
|
+
* use fill); full takes all the height available. Any of these stops the box splitting across
|
|
395
|
+
* pages.
|
|
215
396
|
*/
|
|
216
397
|
height?: string;
|
|
217
398
|
background?: string;
|
|
@@ -236,9 +417,10 @@ export interface FrameAttr {
|
|
|
236
417
|
* Where the box falls in the page flow. no: never split the box, and move it whole to the next
|
|
237
418
|
* page when it does not fit. break-before: start it on a new page. break-after: start the next
|
|
238
419
|
* sibling on a new page. keep-next: keep it on one page with the sibling that follows, moving
|
|
239
|
-
* both to the next page if that sibling would not fit
|
|
240
|
-
*
|
|
241
|
-
*
|
|
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.
|
|
242
424
|
*/
|
|
243
425
|
paginate?: string;
|
|
244
426
|
debug?: string;
|
|
@@ -298,6 +480,18 @@ export interface SpanAttr {
|
|
|
298
480
|
underline?: string;
|
|
299
481
|
strike?: string;
|
|
300
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
|
+
}
|
|
301
495
|
/**
|
|
302
496
|
* An image. It is never stretched. With only a width or a height, the other follows the image's
|
|
303
497
|
* proportions. With both, they are a maximum: the image takes the largest size that fits in them,
|
|
@@ -324,6 +518,38 @@ export interface ImgAttr {
|
|
|
324
518
|
paginate?: string;
|
|
325
519
|
debug?: string;
|
|
326
520
|
}
|
|
521
|
+
/**
|
|
522
|
+
* A rectangle, a circle or an ellipse in the layout, for a status dot, a color swatch or a progress
|
|
523
|
+
* bar. It takes its box in the flow as an image does, with no children, and is drawn centered in
|
|
524
|
+
* that box, which the parent's align places. A rect and an ellipse need a width and a height, and a
|
|
525
|
+
* circle an r. A shape with no fill and no stroke draws nothing, but keeps its box. A stroke is
|
|
526
|
+
* centered on the edge of the box, so half of it lies outside. To put a shape at a place on the
|
|
527
|
+
* page, use a rect, circle or ellipse in a layer.
|
|
528
|
+
*/
|
|
529
|
+
export interface ShapeAttr {
|
|
530
|
+
type: string;
|
|
531
|
+
/**
|
|
532
|
+
* Width of a rect or an ellipse, a length or a name from the width row of the tokens. A circle
|
|
533
|
+
* takes r instead.
|
|
534
|
+
*/
|
|
535
|
+
width?: string;
|
|
536
|
+
/**
|
|
537
|
+
* Height of a rect or an ellipse, a length or a name from the height row of the tokens. A circle
|
|
538
|
+
* takes r instead.
|
|
539
|
+
*/
|
|
540
|
+
height?: string;
|
|
541
|
+
/** Radius of a circle. Its box is the square of side 2r. */
|
|
542
|
+
r?: string;
|
|
543
|
+
/** Rounding of the corners of a rect. A circle and an ellipse are round already. */
|
|
544
|
+
radius?: string;
|
|
545
|
+
fill?: string;
|
|
546
|
+
stroke?: string;
|
|
547
|
+
strokeWidth?: string;
|
|
548
|
+
strokeDash?: string;
|
|
549
|
+
/** How opaque the shape is, from 0 to 1. Default 1. */
|
|
550
|
+
opacity?: string;
|
|
551
|
+
debug?: string;
|
|
552
|
+
}
|
|
327
553
|
/**
|
|
328
554
|
* A QR code, a Code 128 or an EAN-13. It is never stretched. With only a width or a height, the
|
|
329
555
|
* other follows the barcode's proportions. With both, they are a maximum: the barcode takes the
|
|
@@ -334,13 +560,14 @@ export interface BarcodeAttr {
|
|
|
334
560
|
type: string;
|
|
335
561
|
data: string;
|
|
336
562
|
/**
|
|
337
|
-
* Height of the whole barcode,
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
* its bars are 40pt high, and an ean13 is
|
|
343
|
-
* high. The digits of hrt add 12pt to
|
|
563
|
+
* Height of the whole barcode, a length or a name from the height row of the tokens, with the
|
|
564
|
+
* digits of hrt inside it: they take the bottom 12pt and the bars the rest. A barcode is never
|
|
565
|
+
* stretched. With only a height, the width follows the barcode's proportions. With both width and
|
|
566
|
+
* height, they are a maximum: the barcode takes the largest size that fits in them, and its box
|
|
567
|
+
* becomes that size. A QR code is square, so it takes the smaller of the two. Without a size, a
|
|
568
|
+
* code128 is as wide as its bars at 1pt per module and its bars are 40pt high, and an ean13 is
|
|
569
|
+
* the standard symbol, 0.33mm per module and bars 22.85mm high. The digits of hrt add 12pt to
|
|
570
|
+
* either.
|
|
344
571
|
*/
|
|
345
572
|
height?: string;
|
|
346
573
|
ec?: string;
|
|
@@ -357,8 +584,8 @@ export interface BarcodeAttr {
|
|
|
357
584
|
debug?: string;
|
|
358
585
|
}
|
|
359
586
|
/**
|
|
360
|
-
* A block of wrapping text. Use span children to style parts of it
|
|
361
|
-
* lines.
|
|
587
|
+
* A block of wrapping text. Use span children to style parts of it, and fn children for footnotes.
|
|
588
|
+
* Splits across pages between lines.
|
|
362
589
|
*/
|
|
363
590
|
export interface TextAttr {
|
|
364
591
|
fontSize?: string;
|
|
@@ -437,6 +664,98 @@ export interface TextAttr {
|
|
|
437
664
|
paginate?: string;
|
|
438
665
|
debug?: string;
|
|
439
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
|
+
}
|
|
440
759
|
/**
|
|
441
760
|
* Attributes of the `td` element.
|
|
442
761
|
*/
|
|
@@ -453,13 +772,15 @@ export interface TdAttr {
|
|
|
453
772
|
/**
|
|
454
773
|
* Space between the edge of the box and its content, written like CSS: one value for all sides,
|
|
455
774
|
* two for top-bottom and left-right, three for top, left-right and bottom, four for top, right,
|
|
456
|
-
* 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.
|
|
457
777
|
*/
|
|
458
778
|
padding?: string;
|
|
459
779
|
/**
|
|
460
|
-
* Height of the box. Leave it out to size to the content. A length
|
|
461
|
-
* left after its siblings (shared equally if several
|
|
462
|
-
* available. Any of these stops the box splitting across
|
|
780
|
+
* Height of the box. Leave it out to size to the content. A length, or a name from the height row
|
|
781
|
+
* of the tokens, fixes it; fill takes what is left after its siblings (shared equally if several
|
|
782
|
+
* use fill); full takes all the height available. Any of these stops the box splitting across
|
|
783
|
+
* pages.
|
|
463
784
|
*/
|
|
464
785
|
height?: string;
|
|
465
786
|
background?: string;
|
|
@@ -484,12 +805,31 @@ export interface TdAttr {
|
|
|
484
805
|
* Where the box falls in the page flow. no: never split the box, and move it whole to the next
|
|
485
806
|
* page when it does not fit. break-before: start it on a new page. break-after: start the next
|
|
486
807
|
* sibling on a new page. keep-next: keep it on one page with the sibling that follows, moving
|
|
487
|
-
* both to the next page if that sibling would not fit
|
|
488
|
-
*
|
|
489
|
-
*
|
|
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.
|
|
490
812
|
*/
|
|
491
813
|
paginate?: string;
|
|
492
814
|
debug?: string;
|
|
815
|
+
/**
|
|
816
|
+
* How many of the table's columns the cell spans. It is as wide as those columns and the gaps
|
|
817
|
+
* between them, and the cells after it in the row start at the column after its last. A row whose
|
|
818
|
+
* cells span more columns than the table's cols names is an error; a row with fewer leaves its
|
|
819
|
+
* last columns empty. It changes widths only: row heights and page breaks work as before. Default
|
|
820
|
+
* 1.
|
|
821
|
+
*/
|
|
822
|
+
colspan?: string;
|
|
823
|
+
/**
|
|
824
|
+
* How many rows the cell spans, its own included. It is as tall as those rows and the gaps
|
|
825
|
+
* between them, and the rows under it leave its columns out: their cells start at the first free
|
|
826
|
+
* columns. If the cell's content is taller than the rows are together, the last of them grows by
|
|
827
|
+
* the difference. A row with a cell too many for the free columns, and a span that runs past the
|
|
828
|
+
* last row of the table, are errors; a thead is one row and takes no rowspan. The rows a cell
|
|
829
|
+
* spans stay on one page: the group moves to the next page whole when it does not fit, and one
|
|
830
|
+
* taller than a page is clipped at the page's end. Default 1.
|
|
831
|
+
*/
|
|
832
|
+
rowspan?: string;
|
|
493
833
|
align?: string;
|
|
494
834
|
valign?: string;
|
|
495
835
|
}
|
|
@@ -503,6 +843,14 @@ export interface TheadAttr {
|
|
|
503
843
|
* Attributes of the `tr` element.
|
|
504
844
|
*/
|
|
505
845
|
export interface TrAttr {
|
|
846
|
+
/**
|
|
847
|
+
* with-next keeps the row on the same page as the row after it. A run of rows that each say
|
|
848
|
+
* with-next, and the row that ends it, move to the next page together when a page break would
|
|
849
|
+
* fall inside them. A run taller than a page breaks where its rows fit, as if it had no keep.
|
|
850
|
+
* Rows are never split, and a header is never left alone at the bottom of a page, with or without
|
|
851
|
+
* this.
|
|
852
|
+
*/
|
|
853
|
+
keep?: string;
|
|
506
854
|
background?: string;
|
|
507
855
|
}
|
|
508
856
|
/**
|
|
@@ -511,11 +859,31 @@ export interface TrAttr {
|
|
|
511
859
|
*/
|
|
512
860
|
export interface TableAttr {
|
|
513
861
|
/**
|
|
514
|
-
* Column widths, separated by spaces, in fr, pt or % units: for example 2fr 1fr 120pt
|
|
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.
|
|
515
868
|
*/
|
|
516
869
|
cols: string;
|
|
870
|
+
/**
|
|
871
|
+
* A grid: a line around every cell, as thickness and color, for example 1pt #cccccc.
|
|
872
|
+
*/
|
|
517
873
|
border?: string;
|
|
874
|
+
/** The background of every other row below the header, or none. */
|
|
518
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;
|
|
519
887
|
gap?: string;
|
|
520
888
|
padding?: string;
|
|
521
889
|
background?: string;
|
|
@@ -596,6 +964,295 @@ export interface RegionAttr {
|
|
|
596
964
|
w?: string;
|
|
597
965
|
debug?: string;
|
|
598
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
|
+
}
|
|
599
1256
|
/**
|
|
600
1257
|
* Draws shapes, text, images and barcodes at exact positions on the page, independent of the
|
|
601
1258
|
* flowing layout: watermarks, stamps, page furniture. Coordinates start at the top left corner of
|