@segnavia/format 0.26.0 → 0.28.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/book.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { BookChapterEntry, BookContents, BookFrontMatterEntry, BookOpens, BookSection, BookSectionParents, BookTemplate, Chapter, DesignedPage, DesignedSection, REGION_NAME, TemplatedPage, TemplatedSection, isBookContents, isChapter, isDesignedSection, isTemplatedSection } from "./book-section.js";
1
2
  import { z } from "zod";
2
3
  //#region src/book.d.ts
3
4
  export declare const BookMode: z.ZodEnum<{
@@ -5,33 +6,6 @@ export declare const BookMode: z.ZodEnum<{
5
6
  paginated: "paginated";
6
7
  }>;
7
8
  export type BookMode = z.infer<typeof BookMode>;
8
- export declare const BookSection: z.ZodObject<{
9
- title: z.ZodOptional<z.ZodString>;
10
- html: z.ZodString;
11
- contents: z.ZodDefault<z.ZodBoolean>;
12
- }, z.core.$strip>;
13
- export type BookSection = z.infer<typeof BookSection>;
14
- export declare const BookContents: z.ZodObject<{
15
- kind: z.ZodLiteral<"contents">;
16
- title: z.ZodOptional<z.ZodString>;
17
- }, z.core.$strip>;
18
- export type BookContents = z.infer<typeof BookContents>;
19
- export declare const BookFrontMatterEntry: z.ZodUnion<readonly [z.ZodObject<{
20
- title: z.ZodOptional<z.ZodString>;
21
- html: z.ZodString;
22
- contents: z.ZodDefault<z.ZodBoolean>;
23
- }, z.core.$strip>, z.ZodObject<{
24
- kind: z.ZodLiteral<"contents">;
25
- title: z.ZodOptional<z.ZodString>;
26
- }, z.core.$strip>]>;
27
- export type BookFrontMatterEntry = z.infer<typeof BookFrontMatterEntry>;
28
- export declare function isBookContents(entry: BookFrontMatterEntry): entry is BookContents;
29
- export declare const Chapter: z.ZodObject<{
30
- title: z.ZodString;
31
- html: z.ZodString;
32
- runningHead: z.ZodOptional<z.ZodString>;
33
- }, z.core.$strip>;
34
- export type Chapter = z.infer<typeof Chapter>;
35
9
  export declare const BookPage: z.ZodObject<{
36
10
  paper: z.ZodUnion<readonly [z.ZodEnum<{
37
11
  letter: "letter";
@@ -80,8 +54,105 @@ export declare const BookPage: z.ZodObject<{
80
54
  inner: z.ZodNumber;
81
55
  outer: z.ZodNumber;
82
56
  }, z.core.$strip>;
57
+ columnGap: z.ZodDefault<z.ZodNumber>;
83
58
  }, z.core.$strip>;
84
59
  export type BookPage = z.infer<typeof BookPage>;
60
+ export declare const BookRunningHeadSource: z.ZodUnion<readonly [z.ZodLiteral<"title">, z.ZodObject<{
61
+ mark: z.ZodString;
62
+ which: z.ZodEnum<{
63
+ first: "first";
64
+ last: "last";
65
+ }>;
66
+ }, z.core.$strip>]>;
67
+ export type BookRunningHeadSource = z.infer<typeof BookRunningHeadSource>;
68
+ export declare const BookRunningHead: z.ZodObject<{
69
+ recto: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"title">, z.ZodObject<{
70
+ mark: z.ZodString;
71
+ which: z.ZodEnum<{
72
+ first: "first";
73
+ last: "last";
74
+ }>;
75
+ }, z.core.$strip>]>>;
76
+ verso: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"title">, z.ZodObject<{
77
+ mark: z.ZodString;
78
+ which: z.ZodEnum<{
79
+ first: "first";
80
+ last: "last";
81
+ }>;
82
+ }, z.core.$strip>]>>;
83
+ }, z.core.$strip>;
84
+ export type BookRunningHead = z.infer<typeof BookRunningHead>;
85
+ export declare const BookViewPagination: z.ZodObject<{
86
+ paper: z.ZodObject<{
87
+ width: z.ZodNumber;
88
+ height: z.ZodNumber;
89
+ }, z.core.$strip>;
90
+ margin: z.ZodObject<{
91
+ top: z.ZodNumber;
92
+ bottom: z.ZodNumber;
93
+ inner: z.ZodNumber;
94
+ outer: z.ZodNumber;
95
+ }, z.core.$strip>;
96
+ columnGap: z.ZodNumber;
97
+ direction: z.ZodEnum<{
98
+ ltr: "ltr";
99
+ rtl: "rtl";
100
+ }>;
101
+ numbering: z.ZodObject<{
102
+ frontMatter: z.ZodEnum<{
103
+ arabic: "arabic";
104
+ "roman-lower": "roman-lower";
105
+ "roman-upper": "roman-upper";
106
+ hebrew: "hebrew";
107
+ }>;
108
+ body: z.ZodEnum<{
109
+ arabic: "arabic";
110
+ "roman-lower": "roman-lower";
111
+ "roman-upper": "roman-upper";
112
+ hebrew: "hebrew";
113
+ }>;
114
+ }, z.core.$strip>;
115
+ rectoOpenings: z.ZodBoolean;
116
+ orphans: z.ZodNumber;
117
+ widows: z.ZodNumber;
118
+ parents: z.ZodArray<z.ZodObject<{
119
+ name: z.ZodString;
120
+ basedOn: z.ZodOptional<z.ZodString>;
121
+ margin: z.ZodOptional<z.ZodObject<{
122
+ top: z.ZodNumber;
123
+ bottom: z.ZodNumber;
124
+ inner: z.ZodNumber;
125
+ outer: z.ZodNumber;
126
+ }, z.core.$strip>>;
127
+ head: z.ZodOptional<z.ZodString>;
128
+ foot: z.ZodOptional<z.ZodString>;
129
+ }, z.core.$strip>>;
130
+ endnotePlacement: z.ZodEnum<{
131
+ chapter: "chapter";
132
+ book: "book";
133
+ }>;
134
+ contents: z.ZodObject<{
135
+ pageNumbers: z.ZodBoolean;
136
+ depth: z.ZodNumber;
137
+ }, z.core.$strip>;
138
+ runningHead: z.ZodObject<{
139
+ recto: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"title">, z.ZodObject<{
140
+ mark: z.ZodString;
141
+ which: z.ZodEnum<{
142
+ first: "first";
143
+ last: "last";
144
+ }>;
145
+ }, z.core.$strip>]>>;
146
+ verso: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"title">, z.ZodObject<{
147
+ mark: z.ZodString;
148
+ which: z.ZodEnum<{
149
+ first: "first";
150
+ last: "last";
151
+ }>;
152
+ }, z.core.$strip>]>>;
153
+ }, z.core.$strip>;
154
+ }, z.core.$strip>;
155
+ export type BookViewPagination = z.infer<typeof BookViewPagination>;
85
156
  export declare const BookView: z.ZodObject<{
86
157
  dir: z.ZodOptional<z.ZodEnum<{
87
158
  ltr: "ltr";
@@ -93,12 +164,88 @@ export declare const BookView: z.ZodObject<{
93
164
  sandboxed: "sandboxed";
94
165
  }>>;
95
166
  lang: z.ZodOptional<z.ZodString>;
167
+ fonts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
168
+ app: z.ZodString;
169
+ }, z.core.$strip>, z.ZodObject<{
170
+ local: z.ZodString;
171
+ fallback: z.ZodString;
172
+ }, z.core.$strip>]>>>;
173
+ css: z.ZodOptional<z.ZodString>;
96
174
  title: z.ZodOptional<z.ZodString>;
97
175
  html: z.ZodString;
176
+ pagination: z.ZodOptional<z.ZodObject<{
177
+ paper: z.ZodObject<{
178
+ width: z.ZodNumber;
179
+ height: z.ZodNumber;
180
+ }, z.core.$strip>;
181
+ margin: z.ZodObject<{
182
+ top: z.ZodNumber;
183
+ bottom: z.ZodNumber;
184
+ inner: z.ZodNumber;
185
+ outer: z.ZodNumber;
186
+ }, z.core.$strip>;
187
+ columnGap: z.ZodNumber;
188
+ direction: z.ZodEnum<{
189
+ ltr: "ltr";
190
+ rtl: "rtl";
191
+ }>;
192
+ numbering: z.ZodObject<{
193
+ frontMatter: z.ZodEnum<{
194
+ arabic: "arabic";
195
+ "roman-lower": "roman-lower";
196
+ "roman-upper": "roman-upper";
197
+ hebrew: "hebrew";
198
+ }>;
199
+ body: z.ZodEnum<{
200
+ arabic: "arabic";
201
+ "roman-lower": "roman-lower";
202
+ "roman-upper": "roman-upper";
203
+ hebrew: "hebrew";
204
+ }>;
205
+ }, z.core.$strip>;
206
+ rectoOpenings: z.ZodBoolean;
207
+ orphans: z.ZodNumber;
208
+ widows: z.ZodNumber;
209
+ parents: z.ZodArray<z.ZodObject<{
210
+ name: z.ZodString;
211
+ basedOn: z.ZodOptional<z.ZodString>;
212
+ margin: z.ZodOptional<z.ZodObject<{
213
+ top: z.ZodNumber;
214
+ bottom: z.ZodNumber;
215
+ inner: z.ZodNumber;
216
+ outer: z.ZodNumber;
217
+ }, z.core.$strip>>;
218
+ head: z.ZodOptional<z.ZodString>;
219
+ foot: z.ZodOptional<z.ZodString>;
220
+ }, z.core.$strip>>;
221
+ endnotePlacement: z.ZodEnum<{
222
+ chapter: "chapter";
223
+ book: "book";
224
+ }>;
225
+ contents: z.ZodObject<{
226
+ pageNumbers: z.ZodBoolean;
227
+ depth: z.ZodNumber;
228
+ }, z.core.$strip>;
229
+ runningHead: z.ZodObject<{
230
+ recto: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"title">, z.ZodObject<{
231
+ mark: z.ZodString;
232
+ which: z.ZodEnum<{
233
+ first: "first";
234
+ last: "last";
235
+ }>;
236
+ }, z.core.$strip>]>>;
237
+ verso: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"title">, z.ZodObject<{
238
+ mark: z.ZodString;
239
+ which: z.ZodEnum<{
240
+ first: "first";
241
+ last: "last";
242
+ }>;
243
+ }, z.core.$strip>]>>;
244
+ }, z.core.$strip>;
245
+ }, z.core.$strip>>;
98
246
  }, z.core.$strip>;
99
247
  export type BookView = z.infer<typeof BookView>;
100
248
  export type BookViewInput = z.input<typeof BookView>;
101
- export declare function isHebrew(lang: string | undefined): boolean;
102
249
  export declare const Book: z.ZodPipe<z.ZodObject<{
103
250
  title: z.ZodString;
104
251
  mode: z.ZodEnum<{
@@ -153,6 +300,7 @@ export declare const Book: z.ZodPipe<z.ZodObject<{
153
300
  inner: z.ZodNumber;
154
301
  outer: z.ZodNumber;
155
302
  }, z.core.$strip>;
303
+ columnGap: z.ZodDefault<z.ZodNumber>;
156
304
  }, z.core.$strip>>;
157
305
  scripts: z.ZodDefault<z.ZodEnum<{
158
306
  refuse: "refuse";
@@ -164,19 +312,204 @@ export declare const Book: z.ZodPipe<z.ZodObject<{
164
312
  auto: "auto";
165
313
  }>>;
166
314
  lang: z.ZodOptional<z.ZodString>;
167
- frontMatter: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
315
+ frontMatter: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
316
+ pages: z.ZodArray<z.ZodObject<{
317
+ html: z.ZodString;
318
+ }, z.core.$strip>>;
168
319
  title: z.ZodOptional<z.ZodString>;
169
- html: z.ZodString;
170
320
  contents: z.ZodDefault<z.ZodBoolean>;
321
+ opens: z.ZodOptional<z.ZodEnum<{
322
+ any: "any";
323
+ recto: "recto";
324
+ verso: "verso";
325
+ }>>;
326
+ parents: z.ZodOptional<z.ZodObject<{
327
+ opener: z.ZodOptional<z.ZodString>;
328
+ recto: z.ZodOptional<z.ZodString>;
329
+ verso: z.ZodOptional<z.ZodString>;
330
+ blank: z.ZodOptional<z.ZodString>;
331
+ fixed: z.ZodOptional<z.ZodString>;
332
+ }, z.core.$strip>>;
333
+ kind: z.ZodLiteral<"designed">;
334
+ }, z.core.$strip>, z.ZodObject<{
335
+ template: z.ZodString;
336
+ pages: z.ZodArray<z.ZodObject<{
337
+ template: z.ZodOptional<z.ZodString>;
338
+ regions: z.ZodRecord<z.ZodString, z.ZodString>;
339
+ }, z.core.$strip>>;
340
+ title: z.ZodOptional<z.ZodString>;
341
+ contents: z.ZodDefault<z.ZodBoolean>;
342
+ opens: z.ZodOptional<z.ZodEnum<{
343
+ any: "any";
344
+ recto: "recto";
345
+ verso: "verso";
346
+ }>>;
347
+ parents: z.ZodOptional<z.ZodObject<{
348
+ opener: z.ZodOptional<z.ZodString>;
349
+ recto: z.ZodOptional<z.ZodString>;
350
+ verso: z.ZodOptional<z.ZodString>;
351
+ blank: z.ZodOptional<z.ZodString>;
352
+ fixed: z.ZodOptional<z.ZodString>;
353
+ }, z.core.$strip>>;
354
+ kind: z.ZodLiteral<"templated">;
171
355
  }, z.core.$strip>, z.ZodObject<{
172
356
  kind: z.ZodLiteral<"contents">;
173
357
  title: z.ZodOptional<z.ZodString>;
174
- }, z.core.$strip>]>>>;
175
- chapters: z.ZodArray<z.ZodObject<{
358
+ opens: z.ZodOptional<z.ZodEnum<{
359
+ any: "any";
360
+ recto: "recto";
361
+ verso: "verso";
362
+ }>>;
363
+ parents: z.ZodOptional<z.ZodObject<{
364
+ opener: z.ZodOptional<z.ZodString>;
365
+ recto: z.ZodOptional<z.ZodString>;
366
+ verso: z.ZodOptional<z.ZodString>;
367
+ blank: z.ZodOptional<z.ZodString>;
368
+ fixed: z.ZodOptional<z.ZodString>;
369
+ }, z.core.$strip>>;
370
+ }, z.core.$strip>, z.ZodObject<{
371
+ title: z.ZodOptional<z.ZodString>;
372
+ contents: z.ZodDefault<z.ZodBoolean>;
373
+ opens: z.ZodOptional<z.ZodEnum<{
374
+ any: "any";
375
+ recto: "recto";
376
+ verso: "verso";
377
+ }>>;
378
+ parents: z.ZodOptional<z.ZodObject<{
379
+ opener: z.ZodOptional<z.ZodString>;
380
+ recto: z.ZodOptional<z.ZodString>;
381
+ verso: z.ZodOptional<z.ZodString>;
382
+ blank: z.ZodOptional<z.ZodString>;
383
+ fixed: z.ZodOptional<z.ZodString>;
384
+ }, z.core.$strip>>;
385
+ html: z.ZodString;
386
+ kind: z.ZodOptional<z.ZodLiteral<"front">>;
387
+ }, z.core.$strip>], "kind">>>;
388
+ chapters: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
389
+ pages: z.ZodArray<z.ZodObject<{
390
+ html: z.ZodString;
391
+ }, z.core.$strip>>;
392
+ title: z.ZodOptional<z.ZodString>;
393
+ contents: z.ZodDefault<z.ZodBoolean>;
394
+ opens: z.ZodOptional<z.ZodEnum<{
395
+ any: "any";
396
+ recto: "recto";
397
+ verso: "verso";
398
+ }>>;
399
+ parents: z.ZodOptional<z.ZodObject<{
400
+ opener: z.ZodOptional<z.ZodString>;
401
+ recto: z.ZodOptional<z.ZodString>;
402
+ verso: z.ZodOptional<z.ZodString>;
403
+ blank: z.ZodOptional<z.ZodString>;
404
+ fixed: z.ZodOptional<z.ZodString>;
405
+ }, z.core.$strip>>;
406
+ kind: z.ZodLiteral<"designed">;
407
+ }, z.core.$strip>, z.ZodObject<{
408
+ template: z.ZodString;
409
+ pages: z.ZodArray<z.ZodObject<{
410
+ template: z.ZodOptional<z.ZodString>;
411
+ regions: z.ZodRecord<z.ZodString, z.ZodString>;
412
+ }, z.core.$strip>>;
413
+ title: z.ZodOptional<z.ZodString>;
414
+ contents: z.ZodDefault<z.ZodBoolean>;
415
+ opens: z.ZodOptional<z.ZodEnum<{
416
+ any: "any";
417
+ recto: "recto";
418
+ verso: "verso";
419
+ }>>;
420
+ parents: z.ZodOptional<z.ZodObject<{
421
+ opener: z.ZodOptional<z.ZodString>;
422
+ recto: z.ZodOptional<z.ZodString>;
423
+ verso: z.ZodOptional<z.ZodString>;
424
+ blank: z.ZodOptional<z.ZodString>;
425
+ fixed: z.ZodOptional<z.ZodString>;
426
+ }, z.core.$strip>>;
427
+ kind: z.ZodLiteral<"templated">;
428
+ }, z.core.$strip>, z.ZodObject<{
176
429
  title: z.ZodString;
177
430
  html: z.ZodString;
178
431
  runningHead: z.ZodOptional<z.ZodString>;
179
- }, z.core.$strip>>;
432
+ opens: z.ZodOptional<z.ZodEnum<{
433
+ any: "any";
434
+ recto: "recto";
435
+ verso: "verso";
436
+ }>>;
437
+ parents: z.ZodOptional<z.ZodObject<{
438
+ opener: z.ZodOptional<z.ZodString>;
439
+ recto: z.ZodOptional<z.ZodString>;
440
+ verso: z.ZodOptional<z.ZodString>;
441
+ blank: z.ZodOptional<z.ZodString>;
442
+ fixed: z.ZodOptional<z.ZodString>;
443
+ }, z.core.$strip>>;
444
+ kind: z.ZodOptional<z.ZodLiteral<"chapter">>;
445
+ }, z.core.$strip>], "kind">>;
446
+ parentPages: z.ZodDefault<z.ZodArray<z.ZodObject<{
447
+ name: z.ZodString;
448
+ basedOn: z.ZodOptional<z.ZodString>;
449
+ margin: z.ZodOptional<z.ZodObject<{
450
+ top: z.ZodNumber;
451
+ bottom: z.ZodNumber;
452
+ inner: z.ZodNumber;
453
+ outer: z.ZodNumber;
454
+ }, z.core.$strip>>;
455
+ head: z.ZodOptional<z.ZodString>;
456
+ foot: z.ZodOptional<z.ZodString>;
457
+ }, z.core.$strip>>>;
458
+ templates: z.ZodDefault<z.ZodArray<z.ZodObject<{
459
+ name: z.ZodString;
460
+ html: z.ZodString;
461
+ parents: z.ZodOptional<z.ZodObject<{
462
+ opener: z.ZodOptional<z.ZodString>;
463
+ recto: z.ZodOptional<z.ZodString>;
464
+ verso: z.ZodOptional<z.ZodString>;
465
+ blank: z.ZodOptional<z.ZodString>;
466
+ fixed: z.ZodOptional<z.ZodString>;
467
+ }, z.core.$strip>>;
468
+ }, z.core.$strip>>>;
469
+ slots: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
470
+ key: z.ZodString;
471
+ label: z.ZodString;
472
+ type: z.ZodEnum<{
473
+ text: "text";
474
+ phone: "phone";
475
+ email: "email";
476
+ link: "link";
477
+ qr: "qr";
478
+ image: "image";
479
+ }>;
480
+ required: z.ZodDefault<z.ZodBoolean>;
481
+ placeholder: z.ZodOptional<z.ZodString>;
482
+ overflow: z.ZodDefault<z.ZodEnum<{
483
+ refuse: "refuse";
484
+ shrink: "shrink";
485
+ truncate: "truncate";
486
+ wrap: "wrap";
487
+ }>>;
488
+ minSize: z.ZodOptional<z.ZodNumber>;
489
+ }, z.core.$strip>, z.ZodTransform<{
490
+ key: string;
491
+ label: string;
492
+ type: "text" | "phone" | "email" | "link" | "qr" | "image";
493
+ required: boolean;
494
+ overflow: "refuse" | "shrink" | "truncate" | "wrap";
495
+ placeholder?: string | undefined;
496
+ minSize?: number | undefined;
497
+ }, {
498
+ key: string;
499
+ label: string;
500
+ type: "text" | "phone" | "email" | "link" | "qr" | "image";
501
+ required: boolean;
502
+ overflow: "refuse" | "shrink" | "truncate" | "wrap";
503
+ placeholder?: string | undefined;
504
+ minSize?: number | undefined;
505
+ }>>>>;
506
+ fonts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
507
+ app: z.ZodString;
508
+ }, z.core.$strip>, z.ZodObject<{
509
+ local: z.ZodString;
510
+ fallback: z.ZodString;
511
+ }, z.core.$strip>]>>>;
512
+ css: z.ZodOptional<z.ZodString>;
180
513
  numbering: z.ZodDefault<z.ZodObject<{
181
514
  frontMatter: z.ZodOptional<z.ZodEnum<{
182
515
  arabic: "arabic";
@@ -217,6 +550,24 @@ export declare const Book: z.ZodPipe<z.ZodObject<{
217
550
  title: z.ZodOptional<z.ZodString>;
218
551
  }, z.core.$strip>>;
219
552
  rectoOpenings: z.ZodDefault<z.ZodBoolean>;
553
+ orphans: z.ZodDefault<z.ZodNumber>;
554
+ widows: z.ZodDefault<z.ZodNumber>;
555
+ runningHead: z.ZodDefault<z.ZodObject<{
556
+ recto: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"title">, z.ZodObject<{
557
+ mark: z.ZodString;
558
+ which: z.ZodEnum<{
559
+ first: "first";
560
+ last: "last";
561
+ }>;
562
+ }, z.core.$strip>]>>;
563
+ verso: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"title">, z.ZodObject<{
564
+ mark: z.ZodString;
565
+ which: z.ZodEnum<{
566
+ first: "first";
567
+ last: "last";
568
+ }>;
569
+ }, z.core.$strip>]>>;
570
+ }, z.core.$strip>>;
220
571
  contents: z.ZodDefault<z.ZodObject<{
221
572
  pageNumbers: z.ZodDefault<z.ZodBoolean>;
222
573
  depth: z.ZodDefault<z.ZodNumber>;
@@ -239,19 +590,144 @@ export declare const Book: z.ZodPipe<z.ZodObject<{
239
590
  mode: "continuous" | "paginated";
240
591
  scripts: "refuse" | "sandboxed";
241
592
  frontMatter: ({
242
- html: string;
593
+ pages: {
594
+ html: string;
595
+ }[];
243
596
  contents: boolean;
597
+ kind: "designed";
244
598
  title?: string | undefined;
599
+ opens?: "any" | "recto" | "verso" | undefined;
600
+ parents?: {
601
+ opener?: string | undefined;
602
+ recto?: string | undefined;
603
+ verso?: string | undefined;
604
+ blank?: string | undefined;
605
+ fixed?: string | undefined;
606
+ } | undefined;
607
+ } | {
608
+ template: string;
609
+ pages: {
610
+ regions: Record<string, string>;
611
+ template?: string | undefined;
612
+ }[];
613
+ contents: boolean;
614
+ kind: "templated";
615
+ title?: string | undefined;
616
+ opens?: "any" | "recto" | "verso" | undefined;
617
+ parents?: {
618
+ opener?: string | undefined;
619
+ recto?: string | undefined;
620
+ verso?: string | undefined;
621
+ blank?: string | undefined;
622
+ fixed?: string | undefined;
623
+ } | undefined;
245
624
  } | {
246
625
  kind: "contents";
247
626
  title?: string | undefined;
627
+ opens?: "any" | "recto" | "verso" | undefined;
628
+ parents?: {
629
+ opener?: string | undefined;
630
+ recto?: string | undefined;
631
+ verso?: string | undefined;
632
+ blank?: string | undefined;
633
+ fixed?: string | undefined;
634
+ } | undefined;
635
+ } | {
636
+ contents: boolean;
637
+ html: string;
638
+ title?: string | undefined;
639
+ opens?: "any" | "recto" | "verso" | undefined;
640
+ parents?: {
641
+ opener?: string | undefined;
642
+ recto?: string | undefined;
643
+ verso?: string | undefined;
644
+ blank?: string | undefined;
645
+ fixed?: string | undefined;
646
+ } | undefined;
647
+ kind?: "front" | undefined;
248
648
  })[];
249
- chapters: {
649
+ chapters: ({
650
+ pages: {
651
+ html: string;
652
+ }[];
653
+ contents: boolean;
654
+ kind: "designed";
655
+ title?: string | undefined;
656
+ opens?: "any" | "recto" | "verso" | undefined;
657
+ parents?: {
658
+ opener?: string | undefined;
659
+ recto?: string | undefined;
660
+ verso?: string | undefined;
661
+ blank?: string | undefined;
662
+ fixed?: string | undefined;
663
+ } | undefined;
664
+ } | {
665
+ template: string;
666
+ pages: {
667
+ regions: Record<string, string>;
668
+ template?: string | undefined;
669
+ }[];
670
+ contents: boolean;
671
+ kind: "templated";
672
+ title?: string | undefined;
673
+ opens?: "any" | "recto" | "verso" | undefined;
674
+ parents?: {
675
+ opener?: string | undefined;
676
+ recto?: string | undefined;
677
+ verso?: string | undefined;
678
+ blank?: string | undefined;
679
+ fixed?: string | undefined;
680
+ } | undefined;
681
+ } | {
250
682
  title: string;
251
683
  html: string;
252
684
  runningHead?: string | undefined;
685
+ opens?: "any" | "recto" | "verso" | undefined;
686
+ parents?: {
687
+ opener?: string | undefined;
688
+ recto?: string | undefined;
689
+ verso?: string | undefined;
690
+ blank?: string | undefined;
691
+ fixed?: string | undefined;
692
+ } | undefined;
693
+ kind?: "chapter" | undefined;
694
+ })[];
695
+ parentPages: {
696
+ name: string;
697
+ basedOn?: string | undefined;
698
+ margin?: {
699
+ top: number;
700
+ bottom: number;
701
+ inner: number;
702
+ outer: number;
703
+ } | undefined;
704
+ head?: string | undefined;
705
+ foot?: string | undefined;
706
+ }[];
707
+ templates: {
708
+ name: string;
709
+ html: string;
710
+ parents?: {
711
+ opener?: string | undefined;
712
+ recto?: string | undefined;
713
+ verso?: string | undefined;
714
+ blank?: string | undefined;
715
+ fixed?: string | undefined;
716
+ } | undefined;
253
717
  }[];
254
718
  rectoOpenings: boolean;
719
+ orphans: number;
720
+ widows: number;
721
+ runningHead: {
722
+ recto: "title" | {
723
+ mark: string;
724
+ which: "first" | "last";
725
+ };
726
+ verso: "title" | {
727
+ mark: string;
728
+ which: "first" | "last";
729
+ };
730
+ };
255
731
  contents: {
256
732
  pageNumbers: boolean;
257
733
  depth: number;
@@ -269,25 +745,155 @@ export declare const Book: z.ZodPipe<z.ZodObject<{
269
745
  inner: number;
270
746
  outer: number;
271
747
  };
748
+ columnGap: number;
272
749
  } | undefined;
273
750
  dir?: "ltr" | "rtl" | "auto" | undefined;
274
751
  lang?: string | undefined;
752
+ slots?: {
753
+ key: string;
754
+ label: string;
755
+ type: "text" | "phone" | "email" | "link" | "qr" | "image";
756
+ required: boolean;
757
+ overflow: "refuse" | "shrink" | "truncate" | "wrap";
758
+ placeholder?: string | undefined;
759
+ minSize?: number | undefined;
760
+ }[] | undefined;
761
+ fonts?: ({
762
+ app: string;
763
+ } | {
764
+ local: string;
765
+ fallback: string;
766
+ })[] | undefined;
767
+ css?: string | undefined;
275
768
  }, {
276
769
  title: string;
277
770
  mode: "continuous" | "paginated";
278
771
  scripts: "refuse" | "sandboxed";
279
772
  frontMatter: ({
280
- html: string;
773
+ pages: {
774
+ html: string;
775
+ }[];
281
776
  contents: boolean;
777
+ kind: "designed";
282
778
  title?: string | undefined;
779
+ opens?: "any" | "recto" | "verso" | undefined;
780
+ parents?: {
781
+ opener?: string | undefined;
782
+ recto?: string | undefined;
783
+ verso?: string | undefined;
784
+ blank?: string | undefined;
785
+ fixed?: string | undefined;
786
+ } | undefined;
787
+ } | {
788
+ template: string;
789
+ pages: {
790
+ regions: Record<string, string>;
791
+ template?: string | undefined;
792
+ }[];
793
+ contents: boolean;
794
+ kind: "templated";
795
+ title?: string | undefined;
796
+ opens?: "any" | "recto" | "verso" | undefined;
797
+ parents?: {
798
+ opener?: string | undefined;
799
+ recto?: string | undefined;
800
+ verso?: string | undefined;
801
+ blank?: string | undefined;
802
+ fixed?: string | undefined;
803
+ } | undefined;
283
804
  } | {
284
805
  kind: "contents";
285
806
  title?: string | undefined;
807
+ opens?: "any" | "recto" | "verso" | undefined;
808
+ parents?: {
809
+ opener?: string | undefined;
810
+ recto?: string | undefined;
811
+ verso?: string | undefined;
812
+ blank?: string | undefined;
813
+ fixed?: string | undefined;
814
+ } | undefined;
815
+ } | {
816
+ contents: boolean;
817
+ html: string;
818
+ title?: string | undefined;
819
+ opens?: "any" | "recto" | "verso" | undefined;
820
+ parents?: {
821
+ opener?: string | undefined;
822
+ recto?: string | undefined;
823
+ verso?: string | undefined;
824
+ blank?: string | undefined;
825
+ fixed?: string | undefined;
826
+ } | undefined;
827
+ kind?: "front" | undefined;
286
828
  })[];
287
- chapters: {
829
+ chapters: ({
830
+ pages: {
831
+ html: string;
832
+ }[];
833
+ contents: boolean;
834
+ kind: "designed";
835
+ title?: string | undefined;
836
+ opens?: "any" | "recto" | "verso" | undefined;
837
+ parents?: {
838
+ opener?: string | undefined;
839
+ recto?: string | undefined;
840
+ verso?: string | undefined;
841
+ blank?: string | undefined;
842
+ fixed?: string | undefined;
843
+ } | undefined;
844
+ } | {
845
+ template: string;
846
+ pages: {
847
+ regions: Record<string, string>;
848
+ template?: string | undefined;
849
+ }[];
850
+ contents: boolean;
851
+ kind: "templated";
852
+ title?: string | undefined;
853
+ opens?: "any" | "recto" | "verso" | undefined;
854
+ parents?: {
855
+ opener?: string | undefined;
856
+ recto?: string | undefined;
857
+ verso?: string | undefined;
858
+ blank?: string | undefined;
859
+ fixed?: string | undefined;
860
+ } | undefined;
861
+ } | {
288
862
  title: string;
289
863
  html: string;
290
864
  runningHead?: string | undefined;
865
+ opens?: "any" | "recto" | "verso" | undefined;
866
+ parents?: {
867
+ opener?: string | undefined;
868
+ recto?: string | undefined;
869
+ verso?: string | undefined;
870
+ blank?: string | undefined;
871
+ fixed?: string | undefined;
872
+ } | undefined;
873
+ kind?: "chapter" | undefined;
874
+ })[];
875
+ parentPages: {
876
+ name: string;
877
+ basedOn?: string | undefined;
878
+ margin?: {
879
+ top: number;
880
+ bottom: number;
881
+ inner: number;
882
+ outer: number;
883
+ } | undefined;
884
+ head?: string | undefined;
885
+ foot?: string | undefined;
886
+ }[];
887
+ templates: {
888
+ name: string;
889
+ html: string;
890
+ parents?: {
891
+ opener?: string | undefined;
892
+ recto?: string | undefined;
893
+ verso?: string | undefined;
894
+ blank?: string | undefined;
895
+ fixed?: string | undefined;
896
+ } | undefined;
291
897
  }[];
292
898
  numbering: {
293
899
  frontMatter?: "arabic" | "roman-lower" | "roman-upper" | "hebrew" | undefined;
@@ -303,6 +909,18 @@ export declare const Book: z.ZodPipe<z.ZodObject<{
303
909
  title?: string | undefined;
304
910
  };
305
911
  rectoOpenings: boolean;
912
+ orphans: number;
913
+ widows: number;
914
+ runningHead: {
915
+ recto: "title" | {
916
+ mark: string;
917
+ which: "first" | "last";
918
+ };
919
+ verso: "title" | {
920
+ mark: string;
921
+ which: "first" | "last";
922
+ };
923
+ };
306
924
  contents: {
307
925
  pageNumbers: boolean;
308
926
  depth: number;
@@ -320,14 +938,33 @@ export declare const Book: z.ZodPipe<z.ZodObject<{
320
938
  inner: number;
321
939
  outer: number;
322
940
  };
941
+ columnGap: number;
323
942
  } | undefined;
324
943
  dir?: "ltr" | "rtl" | "auto" | undefined;
325
944
  lang?: string | undefined;
945
+ slots?: {
946
+ key: string;
947
+ label: string;
948
+ type: "text" | "phone" | "email" | "link" | "qr" | "image";
949
+ required: boolean;
950
+ overflow: "refuse" | "shrink" | "truncate" | "wrap";
951
+ placeholder?: string | undefined;
952
+ minSize?: number | undefined;
953
+ }[] | undefined;
954
+ fonts?: ({
955
+ app: string;
956
+ } | {
957
+ local: string;
958
+ fallback: string;
959
+ })[] | undefined;
960
+ css?: string | undefined;
326
961
  }>>;
327
962
  export type Book = z.infer<typeof Book>;
328
963
  export type BookInput = z.input<typeof Book>;
964
+ export declare function resolveBookPagination(book: Book): BookViewPagination | undefined;
329
965
  export declare function noteMarkerIssues(book: Book, used: {
330
966
  footnotes: boolean;
331
967
  endnotes: boolean;
332
968
  }): string[];
333
- //#endregion
969
+ //#endregion
970
+ export { BookChapterEntry, BookContents, BookFrontMatterEntry, BookOpens, BookSection, BookSectionParents, BookTemplate, Chapter, DesignedPage, DesignedSection, REGION_NAME, TemplatedPage, TemplatedSection, isBookContents, isChapter, isDesignedSection, isTemplatedSection };