@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.
@@ -0,0 +1,157 @@
1
+ import { z } from "zod";
2
+ //#region src/motif.d.ts
3
+ export declare const MOTIF_ATTRIBUTE = "data-motif";
4
+ export declare const PRINTED_PAGE_CONTEXT = "printedPage";
5
+ export declare const PRINTED_PAGE_NUMBER_PATH = "printedPage.number";
6
+ export declare const PRINTED_PAGE_TOTAL_PATH = "printedPage.total";
7
+ export declare const PRINTED_PAGE_FOLIO_PATH = "printedPage.folio";
8
+ export declare const PRINTED_PAGE_RUNNING_HEAD_PATH = "printedPage.runningHead";
9
+ export declare const LIBRARY_MOTIF_PREFIX = "segnavia:";
10
+ export declare const BOOK_FURNITURE: readonly [{
11
+ readonly key: "segnavia:folio";
12
+ readonly path: "printedPage.folio";
13
+ readonly value: "folio";
14
+ readonly className: "segnavia-folio";
15
+ readonly region: "foot";
16
+ readonly fields: readonly [];
17
+ }, {
18
+ readonly key: "segnavia:running-head";
19
+ readonly path: "printedPage.runningHead";
20
+ readonly value: "runningHead";
21
+ readonly className: "segnavia-running-head";
22
+ readonly region: "head";
23
+ readonly fields: readonly [];
24
+ }, {
25
+ readonly key: "segnavia:mark";
26
+ readonly className: "segnavia-mark";
27
+ readonly region: "head";
28
+ readonly fields: readonly [{
29
+ readonly key: "name";
30
+ readonly required: true;
31
+ }, {
32
+ readonly key: "which";
33
+ readonly choices: readonly ["first", "last"];
34
+ readonly default: "first";
35
+ }];
36
+ }];
37
+ export type BookFurniture = (typeof BOOK_FURNITURE)[number];
38
+ export declare const motifFieldAttribute: (key: string) => string;
39
+ export declare const MotifField: z.ZodObject<{
40
+ key: z.ZodString;
41
+ label: z.ZodString;
42
+ choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
43
+ default: z.ZodOptional<z.ZodString>;
44
+ required: z.ZodDefault<z.ZodBoolean>;
45
+ }, z.core.$strip>;
46
+ export type MotifField = z.infer<typeof MotifField>;
47
+ export declare const MotifFieldInput: z.ZodObject<{
48
+ key: z.ZodString;
49
+ label: z.ZodString;
50
+ choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
51
+ default: z.ZodOptional<z.ZodString>;
52
+ required: z.ZodDefault<z.ZodBoolean>;
53
+ }, z.core.$strict>;
54
+ export type MotifFieldInput = z.input<typeof MotifFieldInput>;
55
+ export declare const MotifVersion: z.ZodObject<{
56
+ lang: z.ZodString;
57
+ dir: z.ZodOptional<z.ZodEnum<{
58
+ ltr: "ltr";
59
+ rtl: "rtl";
60
+ }>>;
61
+ when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
62
+ html: z.ZodString;
63
+ }, z.core.$strip>;
64
+ export type MotifVersion = z.infer<typeof MotifVersion>;
65
+ export declare const MotifVersionInput: z.ZodObject<{
66
+ lang: z.ZodString;
67
+ dir: z.ZodOptional<z.ZodEnum<{
68
+ ltr: "ltr";
69
+ rtl: "rtl";
70
+ }>>;
71
+ when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
72
+ html: z.ZodString;
73
+ }, z.core.$strict>;
74
+ export type MotifVersionInput = z.input<typeof MotifVersionInput>;
75
+ export declare const Motif: z.ZodObject<{
76
+ key: z.ZodString;
77
+ revision: z.ZodString;
78
+ label: z.ZodString;
79
+ fields: z.ZodArray<z.ZodObject<{
80
+ key: z.ZodString;
81
+ label: z.ZodString;
82
+ choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
83
+ default: z.ZodOptional<z.ZodString>;
84
+ required: z.ZodDefault<z.ZodBoolean>;
85
+ }, z.core.$strip>>;
86
+ versions: z.ZodArray<z.ZodObject<{
87
+ lang: z.ZodString;
88
+ dir: z.ZodOptional<z.ZodEnum<{
89
+ ltr: "ltr";
90
+ rtl: "rtl";
91
+ }>>;
92
+ when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
93
+ html: z.ZodString;
94
+ }, z.core.$strip>>;
95
+ fonts: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
96
+ app: z.ZodString;
97
+ }, z.core.$strip>, z.ZodObject<{
98
+ local: z.ZodString;
99
+ fallback: z.ZodString;
100
+ }, z.core.$strip>]>>>;
101
+ }, z.core.$strip>;
102
+ export type Motif = z.infer<typeof Motif>;
103
+ export declare const MotifInput: z.ZodObject<{
104
+ fields: z.ZodArray<z.ZodObject<{
105
+ key: z.ZodString;
106
+ label: z.ZodString;
107
+ choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
108
+ default: z.ZodOptional<z.ZodString>;
109
+ required: z.ZodDefault<z.ZodBoolean>;
110
+ }, z.core.$strict>>;
111
+ versions: z.ZodArray<z.ZodObject<{
112
+ lang: z.ZodString;
113
+ dir: z.ZodOptional<z.ZodEnum<{
114
+ ltr: "ltr";
115
+ rtl: "rtl";
116
+ }>>;
117
+ when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
118
+ html: z.ZodString;
119
+ }, z.core.$strict>>;
120
+ fonts: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
121
+ app: z.ZodString;
122
+ }, z.core.$strict>, z.ZodObject<{
123
+ local: z.ZodString;
124
+ fallback: z.ZodString;
125
+ }, z.core.$strict>]>>>;
126
+ key: z.ZodString;
127
+ revision: z.ZodString;
128
+ label: z.ZodString;
129
+ }, z.core.$strict>;
130
+ export type MotifInput = z.input<typeof MotifInput>;
131
+ export interface MotifPlacement {
132
+ key: string;
133
+ revision: string;
134
+ lang: string;
135
+ fields: Record<string, string>;
136
+ }
137
+ export interface MotifSource {
138
+ motif(key: string, options: {
139
+ revision?: string;
140
+ signal: AbortSignal;
141
+ }): Promise<Motif | undefined>;
142
+ data?(placement: MotifPlacement, options: {
143
+ signal: AbortSignal;
144
+ }): Promise<Record<string, unknown>>;
145
+ }
146
+ export type MotifVersionChoice = {
147
+ ok: true;
148
+ version: MotifVersion;
149
+ index: number;
150
+ } | {
151
+ ok: false;
152
+ reason: string;
153
+ };
154
+ export declare function chooseMotifVersion(motif: Motif, values: {
155
+ lang?: string;
156
+ } & Record<string, string | undefined>): MotifVersionChoice;
157
+ //#endregion
package/dist/motif.js ADDED
@@ -0,0 +1,193 @@
1
+ import { SlotKey } from "./slots.js";
2
+ import { FontReference, FontReferenceInput } from "./fonts.js";
3
+ import { z } from "zod";
4
+ //#region src/motif.ts
5
+ const MOTIF_ATTRIBUTE = "data-motif";
6
+ const PRINTED_PAGE_CONTEXT = "printedPage";
7
+ const PRINTED_PAGE_NUMBER_PATH = `${PRINTED_PAGE_CONTEXT}.number`;
8
+ const PRINTED_PAGE_TOTAL_PATH = `${PRINTED_PAGE_CONTEXT}.total`;
9
+ const PRINTED_PAGE_FOLIO_PATH = `${PRINTED_PAGE_CONTEXT}.folio`;
10
+ const PRINTED_PAGE_RUNNING_HEAD_PATH = `${PRINTED_PAGE_CONTEXT}.runningHead`;
11
+ const LIBRARY_MOTIF_PREFIX = "segnavia:";
12
+ const BOOK_FURNITURE = [
13
+ {
14
+ key: "segnavia:folio",
15
+ path: PRINTED_PAGE_FOLIO_PATH,
16
+ value: "folio",
17
+ className: "segnavia-folio",
18
+ region: "foot",
19
+ fields: []
20
+ },
21
+ {
22
+ key: "segnavia:running-head",
23
+ path: PRINTED_PAGE_RUNNING_HEAD_PATH,
24
+ value: "runningHead",
25
+ className: "segnavia-running-head",
26
+ region: "head",
27
+ fields: []
28
+ },
29
+ {
30
+ key: "segnavia:mark",
31
+ className: "segnavia-mark",
32
+ region: "head",
33
+ fields: [{
34
+ key: "name",
35
+ required: true
36
+ }, {
37
+ key: "which",
38
+ choices: ["first", "last"],
39
+ default: "first"
40
+ }]
41
+ }
42
+ ];
43
+ const motifFieldAttribute = (key) => `${MOTIF_ATTRIBUTE}-${key}`;
44
+ const uniqueChoices = (field, ctx) => {
45
+ if (field.choices && new Set(field.choices).size !== field.choices.length) ctx.addIssue({
46
+ code: "custom",
47
+ path: ["choices"],
48
+ message: "choices must be unique"
49
+ });
50
+ if (field.choices && field.default !== void 0 && !field.choices.includes(field.default)) ctx.addIssue({
51
+ code: "custom",
52
+ path: ["default"],
53
+ message: "default must be one of the field choices"
54
+ });
55
+ };
56
+ const MotifFieldShape = {
57
+ key: SlotKey,
58
+ label: z.string().min(1),
59
+ choices: z.array(z.string()).min(1).optional(),
60
+ default: z.string().optional(),
61
+ required: z.boolean().default(false)
62
+ };
63
+ const MotifField = z.object(MotifFieldShape).superRefine(uniqueChoices);
64
+ const MotifFieldInput = z.strictObject(MotifFieldShape).superRefine(uniqueChoices);
65
+ const MotifVersionShape = {
66
+ lang: z.string().min(1),
67
+ dir: z.enum(["ltr", "rtl"]).optional(),
68
+ when: z.record(SlotKey, z.string()).optional(),
69
+ html: z.string()
70
+ };
71
+ const MotifVersion = z.object(MotifVersionShape);
72
+ const MotifVersionInput = z.strictObject(MotifVersionShape);
73
+ const validateMotif = (motif, ctx) => {
74
+ const fields = new Map(motif.fields.map((field) => [field.key, field]));
75
+ const fieldCases = /* @__PURE__ */ new Map();
76
+ motif.fields.forEach((field, index) => {
77
+ const normalized = field.key.toLowerCase();
78
+ if (field.key.toLowerCase() === "lang") ctx.addIssue({
79
+ code: "custom",
80
+ path: [
81
+ "fields",
82
+ index,
83
+ "key"
84
+ ],
85
+ message: "lang is always present and must not be declared"
86
+ });
87
+ const previous = fieldCases.get(normalized);
88
+ if (previous !== void 0) ctx.addIssue({
89
+ code: "custom",
90
+ path: [
91
+ "fields",
92
+ index,
93
+ "key"
94
+ ],
95
+ message: `field key differs only by case from field ${previous + 1}`
96
+ });
97
+ else fieldCases.set(normalized, index);
98
+ });
99
+ const seen = /* @__PURE__ */ new Map();
100
+ motif.versions.forEach((version, index) => {
101
+ for (const [key, value] of Object.entries(version.when ?? {})) {
102
+ const field = fields.get(key);
103
+ if (!field?.choices) ctx.addIssue({
104
+ code: "custom",
105
+ path: [
106
+ "versions",
107
+ index,
108
+ "when",
109
+ key
110
+ ],
111
+ message: `when key "${key}" must name a choice field`
112
+ });
113
+ else if (!field.choices.includes(value)) ctx.addIssue({
114
+ code: "custom",
115
+ path: [
116
+ "versions",
117
+ index,
118
+ "when",
119
+ key
120
+ ],
121
+ message: `when value "${value}" must be one of the choices for "${key}"`
122
+ });
123
+ }
124
+ const conditions = Object.entries(version.when ?? {}).sort(([left], [right]) => left.localeCompare(right));
125
+ const signature = JSON.stringify([version.lang.toLowerCase(), conditions]);
126
+ const previous = seen.get(signature);
127
+ if (previous !== void 0) ctx.addIssue({
128
+ code: "custom",
129
+ path: ["versions", index],
130
+ message: `version duplicates version ${previous + 1} for the same lang and when values`
131
+ });
132
+ else seen.set(signature, index);
133
+ });
134
+ };
135
+ const MotifShape = {
136
+ key: SlotKey,
137
+ revision: z.string().min(1),
138
+ label: z.string().min(1),
139
+ fields: z.array(MotifField),
140
+ versions: z.array(MotifVersion).min(1),
141
+ fonts: z.array(FontReference).default([])
142
+ };
143
+ const MotifInputShape = {
144
+ ...MotifShape,
145
+ fields: z.array(MotifFieldInput),
146
+ versions: z.array(MotifVersionInput).min(1),
147
+ fonts: z.array(FontReferenceInput).default([])
148
+ };
149
+ const Motif = z.object(MotifShape).superRefine(validateMotif);
150
+ const MotifInput = z.strictObject(MotifInputShape).superRefine(validateMotif);
151
+ function chooseMotifVersion(motif, values) {
152
+ const suppliedLang = values.lang;
153
+ const langs = new Map(motif.versions.map((version) => [version.lang.toLowerCase(), version.lang]));
154
+ const lang = suppliedLang ?? (langs.size === 1 ? langs.values().next().value : void 0);
155
+ if (!lang) return {
156
+ ok: false,
157
+ reason: "no language was supplied and the motif has more than one language"
158
+ };
159
+ const resolved = Object.fromEntries(motif.fields.map((field) => [field.key, values[field.key] ?? field.default]));
160
+ const normalized = lang.toLowerCase();
161
+ const primary = normalized.split("-")[0];
162
+ const matches = motif.versions.map((version, index) => ({
163
+ version,
164
+ index
165
+ })).filter(({ version }) => {
166
+ const versionLang = version.lang.toLowerCase();
167
+ const versionPrimary = versionLang.split("-")[0];
168
+ if (versionLang !== normalized && versionPrimary !== primary) return false;
169
+ return Object.entries(version.when ?? {}).every(([key, value]) => resolved[key] === value);
170
+ }).map((match) => ({
171
+ ...match,
172
+ exact: match.version.lang.toLowerCase() === normalized,
173
+ specificity: Object.keys(match.version.when ?? {}).length
174
+ }));
175
+ if (matches.length === 0) return {
176
+ ok: false,
177
+ reason: `no version matches language "${lang}" and the supplied field values`
178
+ };
179
+ matches.sort((left, right) => Number(right.exact) - Number(left.exact) || right.specificity - left.specificity);
180
+ const best = matches[0];
181
+ const tied = matches.filter((match) => match.exact === best.exact && match.specificity === best.specificity);
182
+ if (tied.length > 1) return {
183
+ ok: false,
184
+ reason: `versions ${tied.map((match) => match.index + 1).join(", ")} match equally specifically`
185
+ };
186
+ return {
187
+ ok: true,
188
+ version: best.version,
189
+ index: best.index
190
+ };
191
+ }
192
+ //#endregion
193
+ export { BOOK_FURNITURE, LIBRARY_MOTIF_PREFIX, MOTIF_ATTRIBUTE, Motif, MotifField, MotifFieldInput, MotifInput, MotifVersion, MotifVersionInput, PRINTED_PAGE_CONTEXT, PRINTED_PAGE_FOLIO_PATH, PRINTED_PAGE_NUMBER_PATH, PRINTED_PAGE_RUNNING_HEAD_PATH, PRINTED_PAGE_TOTAL_PATH, chooseMotifVersion, motifFieldAttribute };
@@ -7,6 +7,8 @@ export declare const NumberSystem: z.ZodEnum<{
7
7
  hebrew: "hebrew";
8
8
  }>;
9
9
  export type NumberSystem = z.infer<typeof NumberSystem>;
10
+ export declare function isHebrew(lang: string | undefined): boolean;
11
+ export declare function defaultPageNumbering(lang: string | undefined): NumberSystem;
10
12
  export declare const NoteMarker: z.ZodUnion<readonly [z.ZodEnum<{
11
13
  arabic: "arabic";
12
14
  "roman-lower": "roman-lower";
package/dist/numbering.js CHANGED
@@ -6,6 +6,13 @@ const NumberSystem = z.enum([
6
6
  "roman-upper",
7
7
  "hebrew"
8
8
  ]);
9
+ function isHebrew(lang) {
10
+ const primary = lang?.split("-")[0]?.toLowerCase();
11
+ return primary === "he" || primary === "iw";
12
+ }
13
+ function defaultPageNumbering(lang) {
14
+ return isHebrew(lang) ? "hebrew" : "arabic";
15
+ }
9
16
  const NoteMarker = z.union([NumberSystem, z.literal("symbols")]);
10
17
  const ROMAN_DIGITS = [
11
18
  [1e3, "M"],
@@ -103,4 +110,4 @@ function noteMarker(index, marker) {
103
110
  return NOTE_SYMBOLS[(index - 1) % NOTE_SYMBOLS.length].repeat(Math.ceil(index / NOTE_SYMBOLS.length));
104
111
  }
105
112
  //#endregion
106
- export { NoteMarker, NumberSystem, formatNumber, noteMarker };
113
+ export { NoteMarker, NumberSystem, defaultPageNumbering, formatNumber, isHebrew, noteMarker };
@@ -0,0 +1,5 @@
1
+ import { Imposition, Print } from "./index.js";
2
+ //#region src/printed-page-imposition.d.ts
3
+ /** True when an imposition leaves one printed page unchanged on one paper. */
4
+ export declare function isPrintedPageIdentityImposition(print: Print, imposition: Imposition): boolean;
5
+ //#endregion
@@ -0,0 +1,12 @@
1
+ import { sheetMm, toMillimeters } from "./paper.js";
2
+ //#region src/printed-page-imposition.ts
3
+ const close = (left, right) => Math.abs(left - right) <= .01;
4
+ /** True when an imposition leaves one printed page unchanged on one paper. */
5
+ function isPrintedPageIdentityImposition(print, imposition) {
6
+ const pagePaper = sheetMm(print);
7
+ const imposedPaper = sheetMm(imposition);
8
+ const mm = (value) => toMillimeters(value, imposition.unit);
9
+ return print.orientation === imposition.orientation && close(pagePaper.width, imposedPaper.width) && close(pagePaper.height, imposedPaper.height) && imposition.columns === 1 && imposition.rows === 1 && close(mm(imposition.cell.width ?? 0), pagePaper.width) && close(mm(imposition.cell.height), pagePaper.height) && Object.values(imposition.margin).every((value) => value === 0) && imposition.gap.column === 0 && imposition.gap.row === 0 && imposition.bleed === 0 && imposition.marks === false && imposition.cornerMarks === false && imposition.fill === "sequence" && imposition.sides !== "two" && imposition.skip === 0 && imposition.fold === void 0;
10
+ }
11
+ //#endregion
12
+ export { isPrintedPageIdentityImposition };
@@ -0,0 +1,125 @@
1
+ import { z } from "zod";
2
+ //#region src/printed-pages.d.ts
3
+ export declare const PRINTED_PAGE_LIMIT = 500;
4
+ export declare const PRINTED_PAGE_ROLES: readonly ["every", "first", "recto", "verso", "last"];
5
+ export type PrintedPageRole = (typeof PRINTED_PAGE_ROLES)[number];
6
+ export declare const ParentPageMargin: z.ZodObject<{
7
+ top: z.ZodNumber;
8
+ bottom: z.ZodNumber;
9
+ inner: z.ZodNumber;
10
+ outer: z.ZodNumber;
11
+ }, z.core.$strip>;
12
+ export declare const ParentPage: z.ZodObject<{
13
+ name: z.ZodString;
14
+ basedOn: z.ZodOptional<z.ZodString>;
15
+ margin: z.ZodOptional<z.ZodObject<{
16
+ top: z.ZodNumber;
17
+ bottom: z.ZodNumber;
18
+ inner: z.ZodNumber;
19
+ outer: z.ZodNumber;
20
+ }, z.core.$strip>>;
21
+ head: z.ZodOptional<z.ZodString>;
22
+ foot: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>;
24
+ export declare const PrintedPageRules: z.ZodPipe<z.ZodObject<{
25
+ every: z.ZodString;
26
+ first: z.ZodOptional<z.ZodString>;
27
+ recto: z.ZodOptional<z.ZodString>;
28
+ verso: z.ZodOptional<z.ZodString>;
29
+ last: z.ZodOptional<z.ZodString>;
30
+ }, z.core.$loose>, z.ZodTransform<{
31
+ last?: string | undefined;
32
+ verso?: string | undefined;
33
+ recto?: string | undefined;
34
+ first?: string | undefined;
35
+ every: string;
36
+ }, {
37
+ [x: string]: unknown;
38
+ every: string;
39
+ first?: string | undefined;
40
+ recto?: string | undefined;
41
+ verso?: string | undefined;
42
+ last?: string | undefined;
43
+ }>>;
44
+ export declare const PrintedPages: z.ZodObject<{
45
+ parents: z.ZodArray<z.ZodObject<{
46
+ name: z.ZodString;
47
+ basedOn: z.ZodOptional<z.ZodString>;
48
+ margin: z.ZodOptional<z.ZodObject<{
49
+ top: z.ZodNumber;
50
+ bottom: z.ZodNumber;
51
+ inner: z.ZodNumber;
52
+ outer: z.ZodNumber;
53
+ }, z.core.$strip>>;
54
+ head: z.ZodOptional<z.ZodString>;
55
+ foot: z.ZodOptional<z.ZodString>;
56
+ }, z.core.$strip>>;
57
+ rules: z.ZodPipe<z.ZodObject<{
58
+ every: z.ZodString;
59
+ first: z.ZodOptional<z.ZodString>;
60
+ recto: z.ZodOptional<z.ZodString>;
61
+ verso: z.ZodOptional<z.ZodString>;
62
+ last: z.ZodOptional<z.ZodString>;
63
+ }, z.core.$loose>, z.ZodTransform<{
64
+ last?: string | undefined;
65
+ verso?: string | undefined;
66
+ recto?: string | undefined;
67
+ first?: string | undefined;
68
+ every: string;
69
+ }, {
70
+ [x: string]: unknown;
71
+ every: string;
72
+ first?: string | undefined;
73
+ recto?: string | undefined;
74
+ verso?: string | undefined;
75
+ last?: string | undefined;
76
+ }>>;
77
+ numbering: z.ZodOptional<z.ZodEnum<{
78
+ arabic: "arabic";
79
+ "roman-lower": "roman-lower";
80
+ "roman-upper": "roman-upper";
81
+ hebrew: "hebrew";
82
+ }>>;
83
+ }, z.core.$strip>;
84
+ export type ParentPageMargin = z.infer<typeof ParentPageMargin>;
85
+ export type ParentPage = z.infer<typeof ParentPage>;
86
+ export type PrintedPageRules = z.infer<typeof PrintedPageRules>;
87
+ export type PrintedPages = z.infer<typeof PrintedPages>;
88
+ export declare const BOOK_PARENT_NAMES: {
89
+ readonly recto: "segnavia:recto";
90
+ readonly verso: "segnavia:verso";
91
+ readonly opener: "segnavia:opener";
92
+ readonly blank: "segnavia:blank";
93
+ };
94
+ export declare function bookParentPages(margin: ParentPageMargin): ParentPage[];
95
+ export interface ResolvedParentPage {
96
+ name: string;
97
+ margin: ParentPageMargin;
98
+ head: string;
99
+ foot: string;
100
+ }
101
+ export declare function resolveParentPages(parents: ParentPage[]): ResolvedParentPage[];
102
+ export declare function parentListIssues(parents: ParentPage[], options?: {
103
+ path?: (string | number)[];
104
+ known?: Iterable<string>;
105
+ }): Array<{
106
+ path: (string | number)[];
107
+ message: string;
108
+ }>;
109
+ export declare function printedPagesIssues(value: PrintedPages): Array<{
110
+ path: (string | number)[];
111
+ message: string;
112
+ }>;
113
+ export declare function pagePrintedPagesIssues(page: {
114
+ scripts: 'refuse' | 'sandboxed';
115
+ print?: {
116
+ margin?: unknown;
117
+ bleed: number;
118
+ marks: boolean;
119
+ };
120
+ printedPages?: PrintedPages;
121
+ }): Array<{
122
+ path: (string | number)[];
123
+ message: string;
124
+ }>;
125
+ //#endregion