reamkit 1.30.0 → 1.31.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.
Files changed (78) hide show
  1. package/README.md +60 -24
  2. package/dist/esm/core/converter/project.js +3 -1
  3. package/dist/esm/core/crypto/offcrypto.js +1 -1
  4. package/dist/esm/core/document-model/index.d.ts +1 -1
  5. package/dist/esm/core/document-model/types.d.ts +63 -0
  6. package/dist/esm/core/font/index.d.ts +2 -0
  7. package/dist/esm/core/font/ttf-build.d.ts +113 -0
  8. package/dist/esm/core/font/ttf-build.js +1224 -0
  9. package/dist/esm/core/font/ttf-subset.d.ts +19 -0
  10. package/dist/esm/core/font/ttf-subset.js +14 -1
  11. package/dist/esm/core/fonts/provider.d.ts +17 -0
  12. package/dist/esm/core/fonts/provider.js +27 -2
  13. package/dist/esm/core/fonts/remote-fonts.js +8 -1
  14. package/dist/esm/core/ir/flow.d.ts +71 -1
  15. package/dist/esm/core/numbering/index.d.ts +1 -1
  16. package/dist/esm/core/numbering/state.d.ts +11 -1
  17. package/dist/esm/core/numbering/state.js +10 -1
  18. package/dist/esm/core/style-cascade/resolver.js +35 -4
  19. package/dist/esm/core/style-cascade/types.d.ts +19 -1
  20. package/dist/esm/core/style-cascade/types.js +3 -0
  21. package/dist/esm/index.d.ts +2 -2
  22. package/dist/esm/layout/page-doc.d.ts +10 -3
  23. package/dist/esm/layout/styled-layout.d.ts +48 -7
  24. package/dist/esm/layout/styled-layout.js +881 -119
  25. package/dist/esm/layout/turned-section.d.ts +38 -0
  26. package/dist/esm/layout/turned-section.js +193 -0
  27. package/dist/esm/pdf/styled-page-emitter.js +78 -2
  28. package/dist/esm/pdf-reader/cff-outline.d.ts +27 -0
  29. package/dist/esm/pdf-reader/cff-outline.js +169 -21
  30. package/dist/esm/pdf-reader/content.d.ts +53 -0
  31. package/dist/esm/pdf-reader/content.js +9 -1
  32. package/dist/esm/pdf-reader/display.d.ts +36 -0
  33. package/dist/esm/pdf-reader/display.js +66 -1
  34. package/dist/esm/pdf-reader/document.js +5 -1
  35. package/dist/esm/pdf-reader/embedded-fonts.d.ts +2 -1
  36. package/dist/esm/pdf-reader/embedded-fonts.js +32 -2
  37. package/dist/esm/pdf-reader/encodings.d.ts +8 -0
  38. package/dist/esm/pdf-reader/encodings.js +25 -3
  39. package/dist/esm/pdf-reader/face-outlines.d.ts +78 -0
  40. package/dist/esm/pdf-reader/face-outlines.js +362 -0
  41. package/dist/esm/pdf-reader/figures.d.ts +52 -0
  42. package/dist/esm/pdf-reader/figures.js +433 -0
  43. package/dist/esm/pdf-reader/flow-build.d.ts +131 -5
  44. package/dist/esm/pdf-reader/flow-build.js +345 -26
  45. package/dist/esm/pdf-reader/font.js +321 -36
  46. package/dist/esm/pdf-reader/glyf-outline.d.ts +33 -0
  47. package/dist/esm/pdf-reader/glyf-outline.js +135 -1
  48. package/dist/esm/pdf-reader/glyph-names.js +154 -1
  49. package/dist/esm/pdf-reader/layout.d.ts +93 -0
  50. package/dist/esm/pdf-reader/layout.js +1703 -214
  51. package/dist/esm/pdf-reader/page-numbers.d.ts +53 -0
  52. package/dist/esm/pdf-reader/page-numbers.js +167 -0
  53. package/dist/esm/pdf-reader/tagged.js +182 -23
  54. package/dist/esm/pdf-reader/text.d.ts +6 -3
  55. package/dist/esm/pdf-reader/text.js +98 -9
  56. package/dist/esm/pdf-reader/type1-outline.d.ts +11 -0
  57. package/dist/esm/pdf-reader/type1-outline.js +63 -8
  58. package/dist/esm/pdf-reader/vector.js +71 -1
  59. package/dist/esm/word/doc/doc-reader.js +6 -2
  60. package/dist/esm/word/doc/doc-text.d.ts +6 -0
  61. package/dist/esm/word/doc/doc-text.js +19 -1
  62. package/dist/esm/word/document-parser.d.ts +2 -2
  63. package/dist/esm/word/document-parser.js +11 -1
  64. package/dist/esm/word/docx-reader.js +5 -3
  65. package/dist/esm/word/docx-writer.js +207 -21
  66. package/dist/esm/word/drawing-parser.d.ts +5 -3
  67. package/dist/esm/word/drawing-parser.js +49 -8
  68. package/dist/esm/word/font-embed.d.ts +30 -0
  69. package/dist/esm/word/font-embed.js +173 -0
  70. package/dist/esm/word/font-table.d.ts +10 -0
  71. package/dist/esm/word/font-table.js +13 -1
  72. package/dist/esm/word/index.js +1 -1
  73. package/dist/esm/word/numbering-parser.d.ts +3 -1
  74. package/dist/esm/word/numbering-parser.js +2 -1
  75. package/dist/esm/word/paragraph-properties.d.ts +7 -6
  76. package/dist/esm/word/paragraph-properties.js +14 -2
  77. package/dist/esm/word/run-properties.js +26 -0
  78. package/package.json +8 -3
@@ -10,16 +10,19 @@ var GLYPHS = {
10
10
  Adieresis: "Ä",
11
11
  Adotaccent: "Ȧ",
12
12
  Agrave: "À",
13
+ Alpha: "Α",
13
14
  Amacron: "Ā",
14
15
  Aogonek: "Ą",
15
16
  Aring: "Å",
16
17
  Atilde: "Ã",
17
18
  Bdotaccent: "Ḃ",
19
+ Beta: "Β",
18
20
  Cacute: "Ć",
19
21
  Ccaron: "Č",
20
22
  Ccedilla: "Ç",
21
23
  Ccircumflex: "Ĉ",
22
24
  Cdotaccent: "Ċ",
25
+ Chi: "Χ",
23
26
  Dcaron: "Ď",
24
27
  Dcedilla: "Ḑ",
25
28
  Ddotaccent: "Ḋ",
@@ -34,11 +37,14 @@ var GLYPHS = {
34
37
  Egrave: "È",
35
38
  Emacron: "Ē",
36
39
  Eogonek: "Ę",
40
+ Epsilon: "Ε",
41
+ Eta: "Η",
37
42
  Eth: "Ð",
38
43
  Etilde: "Ẽ",
39
44
  Euro: "€",
40
45
  Fdotaccent: "Ḟ",
41
46
  Gacute: "Ǵ",
47
+ Gamma: "Γ",
42
48
  Gbreve: "Ğ",
43
49
  Gcaron: "Ǧ",
44
50
  Gcedilla: "Ģ",
@@ -56,26 +62,32 @@ var GLYPHS = {
56
62
  Icircumflex: "Î",
57
63
  Idieresis: "Ï",
58
64
  Idotaccent: "İ",
65
+ Ifractur: "ℑ",
59
66
  Igrave: "Ì",
60
67
  Imacron: "Ī",
61
68
  Iogonek: "Į",
69
+ Iota: "Ι",
62
70
  Itilde: "Ĩ",
63
71
  Jcircumflex: "Ĵ",
64
72
  Kacute: "Ḱ",
73
+ Kappa: "Κ",
65
74
  Kcaron: "Ǩ",
66
75
  Kcedilla: "Ķ",
67
76
  Lacute: "Ĺ",
77
+ Lambda: "Λ",
68
78
  Lcaron: "Ľ",
69
79
  Lcedilla: "Ļ",
70
80
  Lslash: "Ł",
71
81
  Macute: "Ḿ",
72
82
  Mdotaccent: "Ṁ",
83
+ Mu: "Μ",
73
84
  Nacute: "Ń",
74
85
  Ncaron: "Ň",
75
86
  Ncedilla: "Ņ",
76
87
  Ndotaccent: "Ṅ",
77
88
  Ngrave: "Ǹ",
78
89
  Ntilde: "Ñ",
90
+ Nu: "Ν",
79
91
  OE: "Œ",
80
92
  Oacute: "Ó",
81
93
  Obreve: "Ŏ",
@@ -87,23 +99,32 @@ var GLYPHS = {
87
99
  Ohungarumlaut: "Ő",
88
100
  Omacron: "Ō",
89
101
  Omega: "Ω",
102
+ Omicron: "Ο",
90
103
  Oogonek: "Ǫ",
91
104
  Oslash: "Ø",
92
105
  Otilde: "Õ",
93
106
  Pacute: "Ṕ",
94
107
  Pdotaccent: "Ṗ",
108
+ Phi: "Φ",
109
+ Pi: "Π",
110
+ Psi: "Ψ",
95
111
  Racute: "Ŕ",
96
112
  Rcaron: "Ř",
97
113
  Rcedilla: "Ŗ",
98
114
  Rdotaccent: "Ṙ",
115
+ Rfractur: "ℜ",
116
+ Rho: "Ρ",
99
117
  Sacute: "Ś",
100
118
  Scaron: "Š",
101
119
  Scedilla: "Ş",
102
120
  Scircumflex: "Ŝ",
103
121
  Sdotaccent: "Ṡ",
122
+ Sigma: "Σ",
123
+ Tau: "Τ",
104
124
  Tcaron: "Ť",
105
125
  Tcedilla: "Ţ",
106
126
  Tdotaccent: "Ṫ",
127
+ Theta: "Θ",
107
128
  Thorn: "Þ",
108
129
  Uacute: "Ú",
109
130
  Ubreve: "Ŭ",
@@ -114,6 +135,8 @@ var GLYPHS = {
114
135
  Uhungarumlaut: "Ű",
115
136
  Umacron: "Ū",
116
137
  Uogonek: "Ų",
138
+ Upsilon: "Υ",
139
+ Upsilon1: "ϒ",
117
140
  Uring: "Ů",
118
141
  Utilde: "Ũ",
119
142
  Vtilde: "Ṽ",
@@ -124,6 +147,7 @@ var GLYPHS = {
124
147
  Wgrave: "Ẁ",
125
148
  Xdieresis: "Ẍ",
126
149
  Xdotaccent: "Ẋ",
150
+ Xi: "Ξ",
127
151
  Yacute: "Ý",
128
152
  Ycircumflex: "Ŷ",
129
153
  Ydieresis: "Ÿ",
@@ -135,6 +159,7 @@ var GLYPHS = {
135
159
  Zcaron: "Ž",
136
160
  Zcircumflex: "Ẑ",
137
161
  Zdotaccent: "Ż",
162
+ Zeta: "Ζ",
138
163
  aacute: "á",
139
164
  abreve: "ă",
140
165
  acaron: "ǎ",
@@ -144,19 +169,46 @@ var GLYPHS = {
144
169
  adotaccent: "ȧ",
145
170
  ae: "æ",
146
171
  agrave: "à",
172
+ aleph: "ℵ",
173
+ alpha: "α",
147
174
  amacron: "ā",
148
175
  ampersand: "&",
176
+ angbracketleft: "⟨",
177
+ angbracketright: "⟩",
178
+ angle: "∠",
179
+ angleleft: "〈",
180
+ angleright: "〉",
149
181
  aogonek: "ą",
150
182
  approxequal: "≈",
151
183
  aring: "å",
184
+ arrowboth: "↔",
185
+ arrowbothv: "↕",
186
+ arrowdblboth: "⇔",
187
+ arrowdblbothv: "⇕",
188
+ arrowdbldown: "⇓",
189
+ arrowdblleft: "⇐",
190
+ arrowdblright: "⇒",
191
+ arrowdblup: "⇑",
192
+ arrowdown: "↓",
193
+ arrowleft: "←",
194
+ arrownortheast: "↗",
195
+ arrownorthwest: "↖",
196
+ arrowright: "→",
197
+ arrowsoutheast: "↘",
198
+ arrowsouthwest: "↙",
199
+ arrowup: "↑",
200
+ arrowupdn: "↕",
152
201
  asciicircum: "^",
153
202
  asciitilde: "~",
154
203
  asterisk: "*",
204
+ asteriskmath: "∗",
155
205
  at: "@",
156
206
  atilde: "ã",
157
207
  backslash: "\\",
158
208
  bar: "|",
209
+ bardbl: "‖",
159
210
  bdotaccent: "ḃ",
211
+ beta: "β",
160
212
  braceleft: "{",
161
213
  braceright: "}",
162
214
  bracketleft: "[",
@@ -171,10 +223,22 @@ var GLYPHS = {
171
223
  ccircumflex: "ĉ",
172
224
  cdotaccent: "ċ",
173
225
  cedilla: "¸",
226
+ ceilingleft: "⌈",
227
+ ceilingright: "⌉",
174
228
  cent: "¢",
229
+ chi: "χ",
230
+ circlecopyrt: "◯",
231
+ circledivide: "⊘",
232
+ circledot: "⊙",
233
+ circleminus: "⊖",
234
+ circlemultiply: "⊗",
235
+ circleplus: "⊕",
175
236
  circumflex: "ˆ",
237
+ club: "♣",
176
238
  colon: ":",
177
239
  comma: ",",
240
+ congruent: "≅",
241
+ coproduct: "⨿",
178
242
  copyright: "©",
179
243
  currency: "¤",
180
244
  dagger: "†",
@@ -183,11 +247,16 @@ var GLYPHS = {
183
247
  dcedilla: "ḑ",
184
248
  ddotaccent: "ḋ",
185
249
  degree: "°",
250
+ delta: "δ",
251
+ diamond: "♢",
252
+ diamondmath: "⋄",
186
253
  dieresis: "¨",
187
254
  divide: "÷",
188
255
  dollar: "$",
189
256
  dotaccent: "˙",
190
257
  dotlessi: "ı",
258
+ dotlessj: "ȷ",
259
+ dotmath: "⋅",
191
260
  eacute: "é",
192
261
  ebreve: "ĕ",
193
262
  ecaron: "ě",
@@ -197,17 +266,25 @@ var GLYPHS = {
197
266
  edotaccent: "ė",
198
267
  egrave: "è",
199
268
  eight: "8",
269
+ element: "∈",
200
270
  ellipsis: "…",
201
271
  emacron: "ē",
202
272
  emdash: "—",
273
+ emptyset: "∅",
203
274
  endash: "–",
204
275
  eogonek: "ę",
276
+ epsilon: "ε",
277
+ epsilon1: "ϵ",
205
278
  equal: "=",
279
+ equivalence: "≡",
280
+ equivasymptotic: "≍",
281
+ eta: "η",
206
282
  eth: "ð",
207
283
  etilde: "ẽ",
208
284
  euro: "€",
209
285
  exclam: "!",
210
286
  exclamdown: "¡",
287
+ existential: "∃",
211
288
  fdotaccent: "ḟ",
212
289
  ff: "ff",
213
290
  ffi: "ffi",
@@ -215,10 +292,16 @@ var GLYPHS = {
215
292
  fi: "fi",
216
293
  five: "5",
217
294
  fl: "fl",
295
+ flat: "♭",
296
+ floorleft: "⌊",
297
+ floorright: "⌋",
218
298
  florin: "ƒ",
299
+ follows: "≻",
300
+ followsequal: "⪰",
219
301
  four: "4",
220
302
  fraction: "⁄",
221
303
  gacute: "ǵ",
304
+ gamma: "γ",
222
305
  gbreve: "ğ",
223
306
  gcaron: "ǧ",
224
307
  gcedilla: "ģ",
@@ -226,9 +309,11 @@ var GLYPHS = {
226
309
  gdotaccent: "ġ",
227
310
  germandbls: "ß",
228
311
  gmacron: "ḡ",
312
+ gradient: "∇",
229
313
  grave: "`",
230
314
  greater: ">",
231
315
  greaterequal: "≥",
316
+ greatermuch: "≫",
232
317
  guillemotleft: "«",
233
318
  guillemotright: "»",
234
319
  guilsinglleft: "‹",
@@ -238,6 +323,7 @@ var GLYPHS = {
238
323
  hcircumflex: "ĥ",
239
324
  hdieresis: "ḧ",
240
325
  hdotaccent: "ḣ",
326
+ heart: "♡",
241
327
  hungarumlaut: "˝",
242
328
  hyphen: "-",
243
329
  iacute: "í",
@@ -249,36 +335,54 @@ var GLYPHS = {
249
335
  infinity: "∞",
250
336
  integral: "∫",
251
337
  imacron: "ī",
338
+ intersection: "∩",
339
+ intersectionsq: "⊓",
252
340
  iogonek: "į",
341
+ iota: "ι",
253
342
  itilde: "ĩ",
254
343
  jcaron: "ǰ",
255
344
  jcircumflex: "ĵ",
256
345
  kacute: "ḱ",
346
+ kappa: "κ",
257
347
  kcaron: "ǩ",
258
348
  kcedilla: "ķ",
259
349
  lacute: "ĺ",
350
+ lambda: "λ",
351
+ latticetop: "⊤",
260
352
  lcaron: "ľ",
261
353
  lcedilla: "ļ",
262
354
  less: "<",
263
355
  lessequal: "≤",
356
+ lessmuch: "≪",
357
+ logicaland: "∧",
264
358
  logicalnot: "¬",
359
+ logicalor: "∨",
265
360
  lozenge: "◊",
361
+ lscript: "ℓ",
266
362
  lslash: "ł",
267
363
  macron: "¯",
268
364
  macute: "ḿ",
365
+ mapsto: "↦",
269
366
  mdotaccent: "ṁ",
270
367
  minus: "−",
368
+ minusplus: "∓",
271
369
  mu: "µ",
272
370
  multiply: "×",
371
+ nabla: "∇",
273
372
  nacute: "ń",
373
+ natural: "♮",
274
374
  nbspace: "\xA0",
275
375
  ncaron: "ň",
276
376
  ncedilla: "ņ",
277
377
  ndotaccent: "ṅ",
378
+ negationslash: "̸",
278
379
  ngrave: "ǹ",
279
380
  nine: "9",
381
+ notelement: "∉",
280
382
  notequal: "≠",
383
+ notsubset: "⊄",
281
384
  ntilde: "ñ",
385
+ nu: "ν",
282
386
  numbersign: "#",
283
387
  oacute: "ó",
284
388
  obreve: "ŏ",
@@ -291,15 +395,20 @@ var GLYPHS = {
291
395
  ograve: "ò",
292
396
  ohungarumlaut: "ő",
293
397
  omacron: "ō",
398
+ omega: "ω",
399
+ omega1: "ϖ",
400
+ omicron: "ο",
294
401
  one: "1",
295
402
  onehalf: "½",
296
403
  onequarter: "¼",
297
404
  onesuperior: "¹",
298
405
  oogonek: "ǫ",
406
+ openbullet: "◦",
299
407
  ordfeminine: "ª",
300
408
  ordmasculine: "º",
301
409
  oslash: "ø",
302
410
  otilde: "õ",
411
+ owner: "∋",
303
412
  pacute: "ṕ",
304
413
  paragraph: "¶",
305
414
  parenleft: "(",
@@ -309,11 +418,22 @@ var GLYPHS = {
309
418
  percent: "%",
310
419
  period: ".",
311
420
  periodcentered: "·",
421
+ perpendicular: "⊥",
312
422
  perthousand: "‰",
423
+ phi: "φ",
424
+ phi1: "ϕ",
313
425
  pi: "π",
426
+ pi1: "ϖ",
314
427
  plus: "+",
315
428
  plusminus: "±",
429
+ precedes: "≺",
430
+ precedesequal: "⪯",
431
+ prime: "′",
316
432
  product: "∏",
433
+ propersubset: "⊂",
434
+ propersuperset: "⊃",
435
+ proportional: "∝",
436
+ psi: "ψ",
317
437
  question: "?",
318
438
  questiondown: "¿",
319
439
  quotedbl: "\"",
@@ -329,7 +449,11 @@ var GLYPHS = {
329
449
  rcaron: "ř",
330
450
  rcedilla: "ŗ",
331
451
  rdotaccent: "ṙ",
452
+ reflexsubset: "⊆",
453
+ reflexsuperset: "⊇",
332
454
  registered: "®",
455
+ rho: "ρ",
456
+ rho1: "ϱ",
333
457
  ring: "˚",
334
458
  sacute: "ś",
335
459
  scaron: "š",
@@ -340,22 +464,42 @@ var GLYPHS = {
340
464
  semicolon: ";",
341
465
  seven: "7",
342
466
  sfthyphen: "­",
467
+ sharp: "♯",
468
+ sigma: "σ",
469
+ sigma1: "ς",
470
+ similar: "∼",
471
+ similarequal: "≃",
343
472
  six: "6",
344
473
  slash: "/",
345
474
  softhyphen: "­",
346
475
  space: " ",
476
+ spade: "♠",
477
+ star: "⋆",
347
478
  sterling: "£",
479
+ subsetsqequal: "⊑",
480
+ suchthat: "∋",
348
481
  summation: "∑",
482
+ supersetsqequal: "⊒",
483
+ tau: "τ",
349
484
  tcaron: "ť",
350
485
  tcedilla: "ţ",
351
486
  tdieresis: "ẗ",
352
487
  tdotaccent: "ṫ",
488
+ therefore: "∴",
489
+ theta: "θ",
490
+ theta1: "ϑ",
353
491
  thorn: "þ",
354
492
  three: "3",
355
493
  threequarters: "¾",
356
494
  threesuperior: "³",
357
495
  tilde: "˜",
358
496
  trademark: "™",
497
+ triangle: "△",
498
+ triangleinv: "▽",
499
+ triangleleft: "◁",
500
+ triangleright: "▷",
501
+ turnstileleft: "⊢",
502
+ turnstileright: "⊣",
359
503
  two: "2",
360
504
  twosuperior: "²",
361
505
  uacute: "ú",
@@ -367,7 +511,12 @@ var GLYPHS = {
367
511
  uhungarumlaut: "ű",
368
512
  umacron: "ū",
369
513
  underscore: "_",
514
+ union: "∪",
515
+ unionmulti: "⊎",
516
+ unionsq: "⊔",
517
+ universal: "∀",
370
518
  uogonek: "ų",
519
+ upsilon: "υ",
371
520
  uring: "ů",
372
521
  utilde: "ũ",
373
522
  vtilde: "ṽ",
@@ -375,10 +524,13 @@ var GLYPHS = {
375
524
  wcircumflex: "ŵ",
376
525
  wdieresis: "ẅ",
377
526
  wdotaccent: "ẇ",
527
+ weierstrass: "℘",
378
528
  wgrave: "ẁ",
529
+ wreathproduct: "≀",
379
530
  wring: "ẘ",
380
531
  xdieresis: "ẍ",
381
532
  xdotaccent: "ẋ",
533
+ xi: "ξ",
382
534
  yacute: "ý",
383
535
  ycircumflex: "ŷ",
384
536
  ydieresis: "ÿ",
@@ -392,7 +544,8 @@ var GLYPHS = {
392
544
  zcaron: "ž",
393
545
  zcircumflex: "ẑ",
394
546
  zdotaccent: "ż",
395
- zero: "0"
547
+ zero: "0",
548
+ zeta: "ζ"
396
549
  };
397
550
  /**
398
551
  * The text a glyph name stands for, or `undefined` when the name says nothing.
@@ -1,6 +1,14 @@
1
+ import { PageNumbering } from './page-numbers.js';
1
2
  import { PdfVector } from './vector.js';
3
+ import { BodyElement, SectionProperties } from '../core/document-model/index.js';
4
+ import { TextRun } from './content.js';
2
5
  import { PdfFile } from './document.js';
3
6
  import { Reconstruction } from './flow-build.js';
7
+ /** The relationships the reconstruction files its running head and foot under. */
8
+ export declare const FOOTER_PART = "pdf-running-foot";
9
+ /** The part the running foot of a book's even pages is written to (see `sidesOf`). */
10
+ export declare const EVEN_FOOTER_PART = "pdf-running-foot-even";
11
+ export declare const HEADER_PART = "pdf-running-head";
4
12
  /** §9.10.2 — a glyph the face maps to no character (see `./font`). */
5
13
  export declare const UNMAPPED = "\uFFFD";
6
14
  /**
@@ -19,6 +27,20 @@ export declare const UNMAPPED = "\uFFFD";
19
27
  * @returns The reconstructed {@link FlowDoc} plus any read-time losses.
20
28
  */
21
29
  export declare function reconstructByLayout(file: PdfFile, mode?: 'flow' | 'positional'): Reconstruction;
30
+ /** Where the page's text starts and ends, ignoring what is only a space. */
31
+ export declare function pageTextEdges(runs: ReadonlyArray<TextRun>): {
32
+ left: number;
33
+ right: number;
34
+ } | undefined;
35
+ /**
36
+ * Whether this page STEPS between its words rather than writing spaces.
37
+ *
38
+ * Counted rather than guessed: bigboundingbox.pdf writes a space in one run in
39
+ * a hundred, TAMReview.pdf in a third of them, and no page does a little of
40
+ * both. A page with almost no text says nothing either way and keeps the
41
+ * cautious reading.
42
+ */
43
+ export declare function stepsBetweenWords(runs: ReadonlyArray<TextRun>): boolean;
22
44
  /**
23
45
  * Whether a line ENDED a paragraph, rather than wrapping into the next.
24
46
  *
@@ -57,6 +79,77 @@ export declare function endedParagraph(prev: {
57
79
  left: number;
58
80
  right: number;
59
81
  } | undefined): boolean;
82
+ /**
83
+ * §17.6.13 — the running foot a document repeats at the bottom of its pages.
84
+ *
85
+ * A page number, a title, a URL: it stands below the text block, in the margin,
86
+ * and it is not part of what the page SAYS. Read as body it goes wherever the
87
+ * reflow puts it — bug1997343.pdf's "1" came out on a sheet of its own between
88
+ * the two the paper has, and TAMReview.pdf's "Sprouts — http://…" landed in the
89
+ * middle of the abstract.
90
+ *
91
+ * What makes it a running foot is that it RUNS: the same place, page after
92
+ * page, cut off from the text above it by more than a line of white. One page
93
+ * proves nothing, so two are asked for.
94
+ *
95
+ * @param pageRuns Each page's runs, placed.
96
+ * @param shown Each page's shown geometry.
97
+ * @returns The runs to lift off each page and the band to put them in, or
98
+ * `undefined` where the document repeats nothing.
99
+ */
100
+ export declare function runningFoot(pageRuns: ReadonlyArray<ReadonlyArray<TextRun>>, shown: ReadonlyArray<{
101
+ height: number;
102
+ }>, where: 'head' | 'foot'): {
103
+ lift: ReadonlyArray<ReadonlySet<TextRun>>;
104
+ band: ReadonlyArray<TextRun>;
105
+ /** Whether a number in it is the PAGE's number rather than part of the text. */
106
+ numbered: boolean;
107
+ } | undefined;
108
+ /** How many of a document's pages must carry the foot before it is running. */
109
+ /**
110
+ * §17.6.12 — how a document's pages are numbered, read off the band that
111
+ * prints their numbers (see ./page-numbers).
112
+ *
113
+ * @param band The running head or foot whose numbers change from page to page.
114
+ * @returns The numbering, or undefined where no band numbers the pages.
115
+ */
116
+ export declare function numberingOf(band: {
117
+ readonly lift: ReadonlyArray<ReadonlySet<TextRun>>;
118
+ } | undefined): PageNumbering | undefined;
119
+ /**
120
+ * The numbering a section opening at `page` states: the numerals of the
121
+ * sequence the page is counted in, and the number the sequence starts at where
122
+ * it starts there.
123
+ *
124
+ * @param numbering The document's numbering.
125
+ * @param page The section's first page.
126
+ * @returns The section's `pageNumberFormat` and `pageNumberStart`, as needed.
127
+ */
128
+ export declare function numberedFrom(numbering: PageNumbering | undefined, page: number): Pick<SectionProperties, 'pageNumberFormat' | 'pageNumberStart'>;
129
+ /**
130
+ * The band itself: the foot's own line, with the number in it made a field.
131
+ *
132
+ * §17.16.5.35 — a page number is not the text "1"; it is the number of the page
133
+ * it is drawn on, which is why the same band serves every page.
134
+ *
135
+ * A foot is written in REGIONS, the way a spreadsheet's is: something at the
136
+ * left of the sheet, something at the middle, something against the far edge.
137
+ * ZapfDingbats.pdf signs each page "© RenderX 2000" at the left and "XSL
138
+ * Formatting Objects Test Suite" at the right, and the two hundred points
139
+ * between them came back as one word space, the two texts crowding each other
140
+ * at the left. They stand on TAB STOPS instead (§17.3.1.38), which is what the
141
+ * two hundred points are.
142
+ *
143
+ * @param runs The foot's runs.
144
+ * @param stepped Whether the page steps between its words.
145
+ * @param measure The measure it was set across, for its alignment.
146
+ * @param numbered Whether a number in it is the page's own.
147
+ * @param numeral That number as this band prints it, where it is known.
148
+ */
149
+ export declare function footerBand(runs: ReadonlyArray<TextRun>, stepped: boolean, measure: {
150
+ left: number;
151
+ right: number;
152
+ } | undefined, numbered: boolean, numeral?: string): Array<BodyElement>;
60
153
  /**
61
154
  * §9.6.6 — the glyphs a page draws for want of characters, gathered into the
62
155
  * WORDS they stand in: a traced glyph that stands against the one before it,