document-model.js 1.9.0 → 1.10.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 (45) hide show
  1. package/README.md +36 -0
  2. package/dist/color-AELCDH_b.d.cts +13 -0
  3. package/dist/color-AELCDH_b.d.ts +13 -0
  4. package/dist/color.cjs +40 -0
  5. package/dist/color.d.cts +2 -0
  6. package/dist/color.d.ts +2 -0
  7. package/dist/color.js +36 -0
  8. package/dist/content.cjs +341 -0
  9. package/dist/content.d.cts +1188 -0
  10. package/dist/content.d.ts +1188 -0
  11. package/dist/content.js +309 -0
  12. package/dist/geometry-CokwQGtJ.d.cts +27 -0
  13. package/dist/geometry-CokwQGtJ.d.ts +27 -0
  14. package/dist/geometry.cjs +43 -0
  15. package/dist/geometry.d.cts +2 -0
  16. package/dist/geometry.d.ts +2 -0
  17. package/dist/geometry.js +36 -0
  18. package/dist/index.cjs +79 -684
  19. package/dist/index.d.cts +8 -2448
  20. package/dist/index.d.ts +8 -2448
  21. package/dist/index.js +8 -613
  22. package/dist/layout.cjs +147 -0
  23. package/dist/layout.d.cts +636 -0
  24. package/dist/layout.d.ts +636 -0
  25. package/dist/layout.js +133 -0
  26. package/dist/metadata.cjs +15 -0
  27. package/dist/metadata.d.cts +15 -0
  28. package/dist/metadata.d.ts +15 -0
  29. package/dist/metadata.js +14 -0
  30. package/dist/package.cjs +14 -0
  31. package/dist/package.d.cts +528 -0
  32. package/dist/package.d.ts +528 -0
  33. package/dist/package.js +12 -0
  34. package/dist/schema-io.cjs +87 -0
  35. package/dist/schema-io.d.cts +37 -0
  36. package/dist/schema-io.d.ts +37 -0
  37. package/dist/schema-io.js +79 -0
  38. package/dist/style.cjs +23 -0
  39. package/dist/style.d.cts +24 -0
  40. package/dist/style.d.ts +24 -0
  41. package/dist/style.js +20 -0
  42. package/package.json +10 -4
  43. package/schemas/content-document.schema.json +3 -3
  44. package/schemas/document-package.schema.json +3 -3
  45. package/schemas/layout-document.schema.json +1 -1
@@ -0,0 +1,636 @@
1
+ import { z } from "zod";
2
+ //#region src/layout.d.ts
3
+ declare const LAYOUT_FORMAT_VERSION = 1;
4
+ declare const LayoutTextSchema: z.ZodObject<{
5
+ kind: z.ZodLiteral<"text">;
6
+ text: z.ZodString;
7
+ xPt: z.ZodNumber;
8
+ yPt: z.ZodNumber;
9
+ font: z.ZodObject<{
10
+ family: z.ZodString;
11
+ weight: z.ZodEnum<{
12
+ normal: "normal";
13
+ bold: "bold";
14
+ }>;
15
+ style: z.ZodEnum<{
16
+ normal: "normal";
17
+ italic: "italic";
18
+ }>;
19
+ }, z.core.$strip>;
20
+ sizePt: z.ZodNumber;
21
+ color: z.ZodObject<{
22
+ r: z.ZodNumber;
23
+ g: z.ZodNumber;
24
+ b: z.ZodNumber;
25
+ }, z.core.$strip>;
26
+ widthPt: z.ZodOptional<z.ZodNumber>;
27
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
28
+ underline: z.ZodOptional<z.ZodBoolean>;
29
+ sourcePath: z.ZodOptional<z.ZodString>;
30
+ }, z.core.$strip>;
31
+ type LayoutText = z.infer<typeof LayoutTextSchema>;
32
+ declare const LayoutImageSchema: z.ZodObject<{
33
+ kind: z.ZodLiteral<"image">;
34
+ imageId: z.ZodString;
35
+ xPt: z.ZodNumber;
36
+ yPt: z.ZodNumber;
37
+ widthPt: z.ZodNumber;
38
+ heightPt: z.ZodNumber;
39
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
40
+ sourcePath: z.ZodOptional<z.ZodString>;
41
+ }, z.core.$strip>;
42
+ type LayoutImage = z.infer<typeof LayoutImageSchema>;
43
+ declare const LayoutRectSchema: z.ZodObject<{
44
+ kind: z.ZodLiteral<"rect">;
45
+ xPt: z.ZodNumber;
46
+ yPt: z.ZodNumber;
47
+ widthPt: z.ZodNumber;
48
+ heightPt: z.ZodNumber;
49
+ fill: z.ZodOptional<z.ZodObject<{
50
+ r: z.ZodNumber;
51
+ g: z.ZodNumber;
52
+ b: z.ZodNumber;
53
+ }, z.core.$strip>>;
54
+ stroke: z.ZodOptional<z.ZodObject<{
55
+ color: z.ZodObject<{
56
+ r: z.ZodNumber;
57
+ g: z.ZodNumber;
58
+ b: z.ZodNumber;
59
+ }, z.core.$strip>;
60
+ widthPt: z.ZodNumber;
61
+ }, z.core.$strip>>;
62
+ sourcePath: z.ZodOptional<z.ZodString>;
63
+ }, z.core.$strip>;
64
+ type LayoutRect = z.infer<typeof LayoutRectSchema>;
65
+ declare const LayoutLineSchema: z.ZodObject<{
66
+ kind: z.ZodLiteral<"line">;
67
+ x1Pt: z.ZodNumber;
68
+ y1Pt: z.ZodNumber;
69
+ x2Pt: z.ZodNumber;
70
+ y2Pt: z.ZodNumber;
71
+ color: z.ZodObject<{
72
+ r: z.ZodNumber;
73
+ g: z.ZodNumber;
74
+ b: z.ZodNumber;
75
+ }, z.core.$strip>;
76
+ widthPt: z.ZodNumber;
77
+ sourcePath: z.ZodOptional<z.ZodString>;
78
+ }, z.core.$strip>;
79
+ type LayoutLine = z.infer<typeof LayoutLineSchema>;
80
+ declare const LayoutEllipseSchema: z.ZodObject<{
81
+ kind: z.ZodLiteral<"ellipse">;
82
+ xPt: z.ZodNumber;
83
+ yPt: z.ZodNumber;
84
+ widthPt: z.ZodNumber;
85
+ heightPt: z.ZodNumber;
86
+ fill: z.ZodOptional<z.ZodObject<{
87
+ r: z.ZodNumber;
88
+ g: z.ZodNumber;
89
+ b: z.ZodNumber;
90
+ }, z.core.$strip>>;
91
+ stroke: z.ZodOptional<z.ZodObject<{
92
+ color: z.ZodObject<{
93
+ r: z.ZodNumber;
94
+ g: z.ZodNumber;
95
+ b: z.ZodNumber;
96
+ }, z.core.$strip>;
97
+ widthPt: z.ZodNumber;
98
+ }, z.core.$strip>>;
99
+ sourcePath: z.ZodOptional<z.ZodString>;
100
+ }, z.core.$strip>;
101
+ type LayoutEllipse = z.infer<typeof LayoutEllipseSchema>;
102
+ declare const LayoutPathSegmentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
103
+ kind: z.ZodLiteral<"line">;
104
+ xPt: z.ZodNumber;
105
+ yPt: z.ZodNumber;
106
+ }, z.core.$strip>, z.ZodObject<{
107
+ kind: z.ZodLiteral<"cubic">;
108
+ c1xPt: z.ZodNumber;
109
+ c1yPt: z.ZodNumber;
110
+ c2xPt: z.ZodNumber;
111
+ c2yPt: z.ZodNumber;
112
+ xPt: z.ZodNumber;
113
+ yPt: z.ZodNumber;
114
+ }, z.core.$strip>], "kind">;
115
+ type LayoutPathSegment = z.infer<typeof LayoutPathSegmentSchema>;
116
+ declare const LayoutSubpathSchema: z.ZodObject<{
117
+ startXPt: z.ZodNumber;
118
+ startYPt: z.ZodNumber;
119
+ segments: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
120
+ kind: z.ZodLiteral<"line">;
121
+ xPt: z.ZodNumber;
122
+ yPt: z.ZodNumber;
123
+ }, z.core.$strip>, z.ZodObject<{
124
+ kind: z.ZodLiteral<"cubic">;
125
+ c1xPt: z.ZodNumber;
126
+ c1yPt: z.ZodNumber;
127
+ c2xPt: z.ZodNumber;
128
+ c2yPt: z.ZodNumber;
129
+ xPt: z.ZodNumber;
130
+ yPt: z.ZodNumber;
131
+ }, z.core.$strip>], "kind">>;
132
+ closed: z.ZodBoolean;
133
+ }, z.core.$strip>;
134
+ type LayoutSubpath = z.infer<typeof LayoutSubpathSchema>;
135
+ declare const LayoutPathSchema: z.ZodObject<{
136
+ kind: z.ZodLiteral<"path">;
137
+ subpaths: z.ZodArray<z.ZodObject<{
138
+ startXPt: z.ZodNumber;
139
+ startYPt: z.ZodNumber;
140
+ segments: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
141
+ kind: z.ZodLiteral<"line">;
142
+ xPt: z.ZodNumber;
143
+ yPt: z.ZodNumber;
144
+ }, z.core.$strip>, z.ZodObject<{
145
+ kind: z.ZodLiteral<"cubic">;
146
+ c1xPt: z.ZodNumber;
147
+ c1yPt: z.ZodNumber;
148
+ c2xPt: z.ZodNumber;
149
+ c2yPt: z.ZodNumber;
150
+ xPt: z.ZodNumber;
151
+ yPt: z.ZodNumber;
152
+ }, z.core.$strip>], "kind">>;
153
+ closed: z.ZodBoolean;
154
+ }, z.core.$strip>>;
155
+ fill: z.ZodOptional<z.ZodObject<{
156
+ r: z.ZodNumber;
157
+ g: z.ZodNumber;
158
+ b: z.ZodNumber;
159
+ }, z.core.$strip>>;
160
+ fillRule: z.ZodOptional<z.ZodEnum<{
161
+ nonzero: "nonzero";
162
+ evenodd: "evenodd";
163
+ }>>;
164
+ stroke: z.ZodOptional<z.ZodObject<{
165
+ color: z.ZodObject<{
166
+ r: z.ZodNumber;
167
+ g: z.ZodNumber;
168
+ b: z.ZodNumber;
169
+ }, z.core.$strip>;
170
+ widthPt: z.ZodNumber;
171
+ }, z.core.$strip>>;
172
+ sourcePath: z.ZodOptional<z.ZodString>;
173
+ }, z.core.$strip>;
174
+ type LayoutPath = z.infer<typeof LayoutPathSchema>;
175
+ declare const LayoutLinkSchema: z.ZodObject<{
176
+ kind: z.ZodLiteral<"link">;
177
+ uri: z.ZodString;
178
+ xPt: z.ZodNumber;
179
+ yPt: z.ZodNumber;
180
+ widthPt: z.ZodNumber;
181
+ heightPt: z.ZodNumber;
182
+ sourcePath: z.ZodOptional<z.ZodString>;
183
+ }, z.core.$strip>;
184
+ type LayoutLink = z.infer<typeof LayoutLinkSchema>;
185
+ declare const LayoutItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
186
+ kind: z.ZodLiteral<"text">;
187
+ text: z.ZodString;
188
+ xPt: z.ZodNumber;
189
+ yPt: z.ZodNumber;
190
+ font: z.ZodObject<{
191
+ family: z.ZodString;
192
+ weight: z.ZodEnum<{
193
+ normal: "normal";
194
+ bold: "bold";
195
+ }>;
196
+ style: z.ZodEnum<{
197
+ normal: "normal";
198
+ italic: "italic";
199
+ }>;
200
+ }, z.core.$strip>;
201
+ sizePt: z.ZodNumber;
202
+ color: z.ZodObject<{
203
+ r: z.ZodNumber;
204
+ g: z.ZodNumber;
205
+ b: z.ZodNumber;
206
+ }, z.core.$strip>;
207
+ widthPt: z.ZodOptional<z.ZodNumber>;
208
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
209
+ underline: z.ZodOptional<z.ZodBoolean>;
210
+ sourcePath: z.ZodOptional<z.ZodString>;
211
+ }, z.core.$strip>, z.ZodObject<{
212
+ kind: z.ZodLiteral<"image">;
213
+ imageId: z.ZodString;
214
+ xPt: z.ZodNumber;
215
+ yPt: z.ZodNumber;
216
+ widthPt: z.ZodNumber;
217
+ heightPt: z.ZodNumber;
218
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
219
+ sourcePath: z.ZodOptional<z.ZodString>;
220
+ }, z.core.$strip>, z.ZodObject<{
221
+ kind: z.ZodLiteral<"rect">;
222
+ xPt: z.ZodNumber;
223
+ yPt: z.ZodNumber;
224
+ widthPt: z.ZodNumber;
225
+ heightPt: z.ZodNumber;
226
+ fill: z.ZodOptional<z.ZodObject<{
227
+ r: z.ZodNumber;
228
+ g: z.ZodNumber;
229
+ b: z.ZodNumber;
230
+ }, z.core.$strip>>;
231
+ stroke: z.ZodOptional<z.ZodObject<{
232
+ color: z.ZodObject<{
233
+ r: z.ZodNumber;
234
+ g: z.ZodNumber;
235
+ b: z.ZodNumber;
236
+ }, z.core.$strip>;
237
+ widthPt: z.ZodNumber;
238
+ }, z.core.$strip>>;
239
+ sourcePath: z.ZodOptional<z.ZodString>;
240
+ }, z.core.$strip>, z.ZodObject<{
241
+ kind: z.ZodLiteral<"line">;
242
+ x1Pt: z.ZodNumber;
243
+ y1Pt: z.ZodNumber;
244
+ x2Pt: z.ZodNumber;
245
+ y2Pt: z.ZodNumber;
246
+ color: z.ZodObject<{
247
+ r: z.ZodNumber;
248
+ g: z.ZodNumber;
249
+ b: z.ZodNumber;
250
+ }, z.core.$strip>;
251
+ widthPt: z.ZodNumber;
252
+ sourcePath: z.ZodOptional<z.ZodString>;
253
+ }, z.core.$strip>, z.ZodObject<{
254
+ kind: z.ZodLiteral<"ellipse">;
255
+ xPt: z.ZodNumber;
256
+ yPt: z.ZodNumber;
257
+ widthPt: z.ZodNumber;
258
+ heightPt: z.ZodNumber;
259
+ fill: z.ZodOptional<z.ZodObject<{
260
+ r: z.ZodNumber;
261
+ g: z.ZodNumber;
262
+ b: z.ZodNumber;
263
+ }, z.core.$strip>>;
264
+ stroke: z.ZodOptional<z.ZodObject<{
265
+ color: z.ZodObject<{
266
+ r: z.ZodNumber;
267
+ g: z.ZodNumber;
268
+ b: z.ZodNumber;
269
+ }, z.core.$strip>;
270
+ widthPt: z.ZodNumber;
271
+ }, z.core.$strip>>;
272
+ sourcePath: z.ZodOptional<z.ZodString>;
273
+ }, z.core.$strip>, z.ZodObject<{
274
+ kind: z.ZodLiteral<"path">;
275
+ subpaths: z.ZodArray<z.ZodObject<{
276
+ startXPt: z.ZodNumber;
277
+ startYPt: z.ZodNumber;
278
+ segments: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
279
+ kind: z.ZodLiteral<"line">;
280
+ xPt: z.ZodNumber;
281
+ yPt: z.ZodNumber;
282
+ }, z.core.$strip>, z.ZodObject<{
283
+ kind: z.ZodLiteral<"cubic">;
284
+ c1xPt: z.ZodNumber;
285
+ c1yPt: z.ZodNumber;
286
+ c2xPt: z.ZodNumber;
287
+ c2yPt: z.ZodNumber;
288
+ xPt: z.ZodNumber;
289
+ yPt: z.ZodNumber;
290
+ }, z.core.$strip>], "kind">>;
291
+ closed: z.ZodBoolean;
292
+ }, z.core.$strip>>;
293
+ fill: z.ZodOptional<z.ZodObject<{
294
+ r: z.ZodNumber;
295
+ g: z.ZodNumber;
296
+ b: z.ZodNumber;
297
+ }, z.core.$strip>>;
298
+ fillRule: z.ZodOptional<z.ZodEnum<{
299
+ nonzero: "nonzero";
300
+ evenodd: "evenodd";
301
+ }>>;
302
+ stroke: z.ZodOptional<z.ZodObject<{
303
+ color: z.ZodObject<{
304
+ r: z.ZodNumber;
305
+ g: z.ZodNumber;
306
+ b: z.ZodNumber;
307
+ }, z.core.$strip>;
308
+ widthPt: z.ZodNumber;
309
+ }, z.core.$strip>>;
310
+ sourcePath: z.ZodOptional<z.ZodString>;
311
+ }, z.core.$strip>, z.ZodObject<{
312
+ kind: z.ZodLiteral<"link">;
313
+ uri: z.ZodString;
314
+ xPt: z.ZodNumber;
315
+ yPt: z.ZodNumber;
316
+ widthPt: z.ZodNumber;
317
+ heightPt: z.ZodNumber;
318
+ sourcePath: z.ZodOptional<z.ZodString>;
319
+ }, z.core.$strip>], "kind">;
320
+ type LayoutItem = z.infer<typeof LayoutItemSchema>;
321
+ declare const LayoutPageSchema: z.ZodObject<{
322
+ widthPt: z.ZodNumber;
323
+ heightPt: z.ZodNumber;
324
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
325
+ kind: z.ZodLiteral<"text">;
326
+ text: z.ZodString;
327
+ xPt: z.ZodNumber;
328
+ yPt: z.ZodNumber;
329
+ font: z.ZodObject<{
330
+ family: z.ZodString;
331
+ weight: z.ZodEnum<{
332
+ normal: "normal";
333
+ bold: "bold";
334
+ }>;
335
+ style: z.ZodEnum<{
336
+ normal: "normal";
337
+ italic: "italic";
338
+ }>;
339
+ }, z.core.$strip>;
340
+ sizePt: z.ZodNumber;
341
+ color: z.ZodObject<{
342
+ r: z.ZodNumber;
343
+ g: z.ZodNumber;
344
+ b: z.ZodNumber;
345
+ }, z.core.$strip>;
346
+ widthPt: z.ZodOptional<z.ZodNumber>;
347
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
348
+ underline: z.ZodOptional<z.ZodBoolean>;
349
+ sourcePath: z.ZodOptional<z.ZodString>;
350
+ }, z.core.$strip>, z.ZodObject<{
351
+ kind: z.ZodLiteral<"image">;
352
+ imageId: z.ZodString;
353
+ xPt: z.ZodNumber;
354
+ yPt: z.ZodNumber;
355
+ widthPt: z.ZodNumber;
356
+ heightPt: z.ZodNumber;
357
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
358
+ sourcePath: z.ZodOptional<z.ZodString>;
359
+ }, z.core.$strip>, z.ZodObject<{
360
+ kind: z.ZodLiteral<"rect">;
361
+ xPt: z.ZodNumber;
362
+ yPt: z.ZodNumber;
363
+ widthPt: z.ZodNumber;
364
+ heightPt: z.ZodNumber;
365
+ fill: z.ZodOptional<z.ZodObject<{
366
+ r: z.ZodNumber;
367
+ g: z.ZodNumber;
368
+ b: z.ZodNumber;
369
+ }, z.core.$strip>>;
370
+ stroke: z.ZodOptional<z.ZodObject<{
371
+ color: z.ZodObject<{
372
+ r: z.ZodNumber;
373
+ g: z.ZodNumber;
374
+ b: z.ZodNumber;
375
+ }, z.core.$strip>;
376
+ widthPt: z.ZodNumber;
377
+ }, z.core.$strip>>;
378
+ sourcePath: z.ZodOptional<z.ZodString>;
379
+ }, z.core.$strip>, z.ZodObject<{
380
+ kind: z.ZodLiteral<"line">;
381
+ x1Pt: z.ZodNumber;
382
+ y1Pt: z.ZodNumber;
383
+ x2Pt: z.ZodNumber;
384
+ y2Pt: z.ZodNumber;
385
+ color: z.ZodObject<{
386
+ r: z.ZodNumber;
387
+ g: z.ZodNumber;
388
+ b: z.ZodNumber;
389
+ }, z.core.$strip>;
390
+ widthPt: z.ZodNumber;
391
+ sourcePath: z.ZodOptional<z.ZodString>;
392
+ }, z.core.$strip>, z.ZodObject<{
393
+ kind: z.ZodLiteral<"ellipse">;
394
+ xPt: z.ZodNumber;
395
+ yPt: z.ZodNumber;
396
+ widthPt: z.ZodNumber;
397
+ heightPt: z.ZodNumber;
398
+ fill: z.ZodOptional<z.ZodObject<{
399
+ r: z.ZodNumber;
400
+ g: z.ZodNumber;
401
+ b: z.ZodNumber;
402
+ }, z.core.$strip>>;
403
+ stroke: z.ZodOptional<z.ZodObject<{
404
+ color: z.ZodObject<{
405
+ r: z.ZodNumber;
406
+ g: z.ZodNumber;
407
+ b: z.ZodNumber;
408
+ }, z.core.$strip>;
409
+ widthPt: z.ZodNumber;
410
+ }, z.core.$strip>>;
411
+ sourcePath: z.ZodOptional<z.ZodString>;
412
+ }, z.core.$strip>, z.ZodObject<{
413
+ kind: z.ZodLiteral<"path">;
414
+ subpaths: z.ZodArray<z.ZodObject<{
415
+ startXPt: z.ZodNumber;
416
+ startYPt: z.ZodNumber;
417
+ segments: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
418
+ kind: z.ZodLiteral<"line">;
419
+ xPt: z.ZodNumber;
420
+ yPt: z.ZodNumber;
421
+ }, z.core.$strip>, z.ZodObject<{
422
+ kind: z.ZodLiteral<"cubic">;
423
+ c1xPt: z.ZodNumber;
424
+ c1yPt: z.ZodNumber;
425
+ c2xPt: z.ZodNumber;
426
+ c2yPt: z.ZodNumber;
427
+ xPt: z.ZodNumber;
428
+ yPt: z.ZodNumber;
429
+ }, z.core.$strip>], "kind">>;
430
+ closed: z.ZodBoolean;
431
+ }, z.core.$strip>>;
432
+ fill: z.ZodOptional<z.ZodObject<{
433
+ r: z.ZodNumber;
434
+ g: z.ZodNumber;
435
+ b: z.ZodNumber;
436
+ }, z.core.$strip>>;
437
+ fillRule: z.ZodOptional<z.ZodEnum<{
438
+ nonzero: "nonzero";
439
+ evenodd: "evenodd";
440
+ }>>;
441
+ stroke: z.ZodOptional<z.ZodObject<{
442
+ color: z.ZodObject<{
443
+ r: z.ZodNumber;
444
+ g: z.ZodNumber;
445
+ b: z.ZodNumber;
446
+ }, z.core.$strip>;
447
+ widthPt: z.ZodNumber;
448
+ }, z.core.$strip>>;
449
+ sourcePath: z.ZodOptional<z.ZodString>;
450
+ }, z.core.$strip>, z.ZodObject<{
451
+ kind: z.ZodLiteral<"link">;
452
+ uri: z.ZodString;
453
+ xPt: z.ZodNumber;
454
+ yPt: z.ZodNumber;
455
+ widthPt: z.ZodNumber;
456
+ heightPt: z.ZodNumber;
457
+ sourcePath: z.ZodOptional<z.ZodString>;
458
+ }, z.core.$strip>], "kind">>;
459
+ notes: z.ZodOptional<z.ZodString>;
460
+ }, z.core.$strip>;
461
+ type LayoutPage = z.infer<typeof LayoutPageSchema>;
462
+ declare const LayoutImageAssetSchema: z.ZodObject<{
463
+ format: z.ZodEnum<{
464
+ png: "png";
465
+ jpeg: "jpeg";
466
+ }>;
467
+ base64: z.ZodString;
468
+ widthPx: z.ZodNumber;
469
+ heightPx: z.ZodNumber;
470
+ }, z.core.$strip>;
471
+ type LayoutImageAsset = z.infer<typeof LayoutImageAssetSchema>;
472
+ declare const LayoutDocumentSchema: z.ZodObject<{
473
+ formatVersion: z.ZodLiteral<1>;
474
+ metadata: z.ZodObject<{
475
+ title: z.ZodOptional<z.ZodString>;
476
+ author: z.ZodOptional<z.ZodString>;
477
+ subject: z.ZodOptional<z.ZodString>;
478
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
479
+ creator: z.ZodOptional<z.ZodString>;
480
+ producer: z.ZodOptional<z.ZodString>;
481
+ createdIso: z.ZodOptional<z.ZodString>;
482
+ modifiedIso: z.ZodOptional<z.ZodString>;
483
+ }, z.core.$strip>;
484
+ pages: z.ZodArray<z.ZodObject<{
485
+ widthPt: z.ZodNumber;
486
+ heightPt: z.ZodNumber;
487
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
488
+ kind: z.ZodLiteral<"text">;
489
+ text: z.ZodString;
490
+ xPt: z.ZodNumber;
491
+ yPt: z.ZodNumber;
492
+ font: z.ZodObject<{
493
+ family: z.ZodString;
494
+ weight: z.ZodEnum<{
495
+ normal: "normal";
496
+ bold: "bold";
497
+ }>;
498
+ style: z.ZodEnum<{
499
+ normal: "normal";
500
+ italic: "italic";
501
+ }>;
502
+ }, z.core.$strip>;
503
+ sizePt: z.ZodNumber;
504
+ color: z.ZodObject<{
505
+ r: z.ZodNumber;
506
+ g: z.ZodNumber;
507
+ b: z.ZodNumber;
508
+ }, z.core.$strip>;
509
+ widthPt: z.ZodOptional<z.ZodNumber>;
510
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
511
+ underline: z.ZodOptional<z.ZodBoolean>;
512
+ sourcePath: z.ZodOptional<z.ZodString>;
513
+ }, z.core.$strip>, z.ZodObject<{
514
+ kind: z.ZodLiteral<"image">;
515
+ imageId: z.ZodString;
516
+ xPt: z.ZodNumber;
517
+ yPt: z.ZodNumber;
518
+ widthPt: z.ZodNumber;
519
+ heightPt: z.ZodNumber;
520
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
521
+ sourcePath: z.ZodOptional<z.ZodString>;
522
+ }, z.core.$strip>, z.ZodObject<{
523
+ kind: z.ZodLiteral<"rect">;
524
+ xPt: z.ZodNumber;
525
+ yPt: z.ZodNumber;
526
+ widthPt: z.ZodNumber;
527
+ heightPt: z.ZodNumber;
528
+ fill: z.ZodOptional<z.ZodObject<{
529
+ r: z.ZodNumber;
530
+ g: z.ZodNumber;
531
+ b: z.ZodNumber;
532
+ }, z.core.$strip>>;
533
+ stroke: z.ZodOptional<z.ZodObject<{
534
+ color: z.ZodObject<{
535
+ r: z.ZodNumber;
536
+ g: z.ZodNumber;
537
+ b: z.ZodNumber;
538
+ }, z.core.$strip>;
539
+ widthPt: z.ZodNumber;
540
+ }, z.core.$strip>>;
541
+ sourcePath: z.ZodOptional<z.ZodString>;
542
+ }, z.core.$strip>, z.ZodObject<{
543
+ kind: z.ZodLiteral<"line">;
544
+ x1Pt: z.ZodNumber;
545
+ y1Pt: z.ZodNumber;
546
+ x2Pt: z.ZodNumber;
547
+ y2Pt: z.ZodNumber;
548
+ color: z.ZodObject<{
549
+ r: z.ZodNumber;
550
+ g: z.ZodNumber;
551
+ b: z.ZodNumber;
552
+ }, z.core.$strip>;
553
+ widthPt: z.ZodNumber;
554
+ sourcePath: z.ZodOptional<z.ZodString>;
555
+ }, z.core.$strip>, z.ZodObject<{
556
+ kind: z.ZodLiteral<"ellipse">;
557
+ xPt: z.ZodNumber;
558
+ yPt: z.ZodNumber;
559
+ widthPt: z.ZodNumber;
560
+ heightPt: z.ZodNumber;
561
+ fill: z.ZodOptional<z.ZodObject<{
562
+ r: z.ZodNumber;
563
+ g: z.ZodNumber;
564
+ b: z.ZodNumber;
565
+ }, z.core.$strip>>;
566
+ stroke: z.ZodOptional<z.ZodObject<{
567
+ color: z.ZodObject<{
568
+ r: z.ZodNumber;
569
+ g: z.ZodNumber;
570
+ b: z.ZodNumber;
571
+ }, z.core.$strip>;
572
+ widthPt: z.ZodNumber;
573
+ }, z.core.$strip>>;
574
+ sourcePath: z.ZodOptional<z.ZodString>;
575
+ }, z.core.$strip>, z.ZodObject<{
576
+ kind: z.ZodLiteral<"path">;
577
+ subpaths: z.ZodArray<z.ZodObject<{
578
+ startXPt: z.ZodNumber;
579
+ startYPt: z.ZodNumber;
580
+ segments: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
581
+ kind: z.ZodLiteral<"line">;
582
+ xPt: z.ZodNumber;
583
+ yPt: z.ZodNumber;
584
+ }, z.core.$strip>, z.ZodObject<{
585
+ kind: z.ZodLiteral<"cubic">;
586
+ c1xPt: z.ZodNumber;
587
+ c1yPt: z.ZodNumber;
588
+ c2xPt: z.ZodNumber;
589
+ c2yPt: z.ZodNumber;
590
+ xPt: z.ZodNumber;
591
+ yPt: z.ZodNumber;
592
+ }, z.core.$strip>], "kind">>;
593
+ closed: z.ZodBoolean;
594
+ }, z.core.$strip>>;
595
+ fill: z.ZodOptional<z.ZodObject<{
596
+ r: z.ZodNumber;
597
+ g: z.ZodNumber;
598
+ b: z.ZodNumber;
599
+ }, z.core.$strip>>;
600
+ fillRule: z.ZodOptional<z.ZodEnum<{
601
+ nonzero: "nonzero";
602
+ evenodd: "evenodd";
603
+ }>>;
604
+ stroke: z.ZodOptional<z.ZodObject<{
605
+ color: z.ZodObject<{
606
+ r: z.ZodNumber;
607
+ g: z.ZodNumber;
608
+ b: z.ZodNumber;
609
+ }, z.core.$strip>;
610
+ widthPt: z.ZodNumber;
611
+ }, z.core.$strip>>;
612
+ sourcePath: z.ZodOptional<z.ZodString>;
613
+ }, z.core.$strip>, z.ZodObject<{
614
+ kind: z.ZodLiteral<"link">;
615
+ uri: z.ZodString;
616
+ xPt: z.ZodNumber;
617
+ yPt: z.ZodNumber;
618
+ widthPt: z.ZodNumber;
619
+ heightPt: z.ZodNumber;
620
+ sourcePath: z.ZodOptional<z.ZodString>;
621
+ }, z.core.$strip>], "kind">>;
622
+ notes: z.ZodOptional<z.ZodString>;
623
+ }, z.core.$strip>>;
624
+ images: z.ZodRecord<z.ZodString, z.ZodObject<{
625
+ format: z.ZodEnum<{
626
+ png: "png";
627
+ jpeg: "jpeg";
628
+ }>;
629
+ base64: z.ZodString;
630
+ widthPx: z.ZodNumber;
631
+ heightPx: z.ZodNumber;
632
+ }, z.core.$strip>>;
633
+ }, z.core.$strip>;
634
+ type LayoutDocument = z.infer<typeof LayoutDocumentSchema>;
635
+ //#endregion
636
+ export { LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutItem, LayoutItemSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema };