paperlab 0.3.1 → 0.4.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/{chunk-XE4E43MD.js → chunk-4ZU5DZEF.js} +1933 -2035
- package/dist/chunk-4ZU5DZEF.js.map +1 -0
- package/dist/index.cjs +490 -745
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +387 -1842
- package/dist/index.d.ts +387 -1842
- package/dist/index.js +183 -431
- package/dist/index.js.map +1 -1
- package/dist/{slots-DUMR64HB.d.cts → slots-BYoLxVZ4.d.cts} +1 -654
- package/dist/{slots-DUMR64HB.d.ts → slots-BYoLxVZ4.d.ts} +1 -654
- package/dist/stage.cjs +0 -14
- package/dist/stage.cjs.map +1 -1
- package/dist/stage.d.cts +2 -178
- package/dist/stage.d.ts +2 -178
- package/dist/stage.js +1 -8
- package/package.json +1 -1
- package/dist/chunk-XE4E43MD.js.map +0 -1
|
@@ -235,644 +235,6 @@ declare const backContentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
235
235
|
footer?: string | undefined;
|
|
236
236
|
}>]>;
|
|
237
237
|
type BackContentConfig = z.infer<typeof backContentSchema>;
|
|
238
|
-
declare const cardContentSchema: z.ZodObject<{
|
|
239
|
-
type: z.ZodLiteral<"card">;
|
|
240
|
-
/** Small, tracked, uppercase by convention — the label at the top. */
|
|
241
|
-
title: z.ZodDefault<z.ZodString>;
|
|
242
|
-
/** The card's reason for existing. */
|
|
243
|
-
body: z.ZodDefault<z.ZodString>;
|
|
244
|
-
/** Attribution, catalogue number, date — the line in small print at the foot. */
|
|
245
|
-
note: z.ZodDefault<z.ZodString>;
|
|
246
|
-
/** A hairline under the title. What separates a label from a paragraph. */
|
|
247
|
-
rule: z.ZodDefault<z.ZodBoolean>;
|
|
248
|
-
/**
|
|
249
|
-
* Ruled writing lines behind the body, as on an index card.
|
|
250
|
-
*
|
|
251
|
-
* Drawn UNDER the type and in the stock's own ink at low alpha, so they
|
|
252
|
-
* read as printed on the card rather than as underlines on the words.
|
|
253
|
-
*/
|
|
254
|
-
ruled: z.ZodDefault<z.ZodBoolean>;
|
|
255
|
-
font: z.ZodDefault<z.ZodString>;
|
|
256
|
-
/**
|
|
257
|
-
* Body size, px at texture resolution. Title and note derive from it.
|
|
258
|
-
*
|
|
259
|
-
* Set larger than the `text` default on purpose. A card is a small object
|
|
260
|
-
* read close up, so its type is LARGE relative to the sheet; at the text
|
|
261
|
-
* block's 42 the composition floated in the middle of the card with a
|
|
262
|
-
* third of the stock empty above and below it, which reads as a page that
|
|
263
|
-
* was cropped rather than as a card that was set.
|
|
264
|
-
*/
|
|
265
|
-
size: z.ZodDefault<z.ZodNumber>;
|
|
266
|
-
color: z.ZodDefault<z.ZodString>;
|
|
267
|
-
align: z.ZodDefault<z.ZodEnum<["left", "center"]>>;
|
|
268
|
-
padding: z.ZodDefault<z.ZodNumber>;
|
|
269
|
-
} & {
|
|
270
|
-
back: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
271
|
-
type: z.ZodLiteral<"blank">;
|
|
272
|
-
}, "strip", z.ZodTypeAny, {
|
|
273
|
-
type: "blank";
|
|
274
|
-
}, {
|
|
275
|
-
type: "blank";
|
|
276
|
-
}>, z.ZodObject<{
|
|
277
|
-
type: z.ZodLiteral<"image">;
|
|
278
|
-
/**
|
|
279
|
-
* Empty means "no picture yet", and renders as bare stock rather than as
|
|
280
|
-
* a failure. That is what lets a built-in preset be an image preset
|
|
281
|
-
* without shipping — or fetching — a photograph: `photo-print` and
|
|
282
|
-
* `postage-stamp` are containers for the caller's own art, handed over via
|
|
283
|
-
* `<PaperField images={...} />` or `content.src`.
|
|
284
|
-
*/
|
|
285
|
-
src: z.ZodDefault<z.ZodString>;
|
|
286
|
-
fit: z.ZodDefault<z.ZodEnum<["cover", "contain"]>>;
|
|
287
|
-
/** Read by the hidden DOM mirror and the no-WebGL fallback. */
|
|
288
|
-
alt: z.ZodOptional<z.ZodString>;
|
|
289
|
-
}, "strip", z.ZodTypeAny, {
|
|
290
|
-
type: "image";
|
|
291
|
-
src: string;
|
|
292
|
-
fit: "cover" | "contain";
|
|
293
|
-
alt?: string | undefined;
|
|
294
|
-
}, {
|
|
295
|
-
type: "image";
|
|
296
|
-
src?: string | undefined;
|
|
297
|
-
fit?: "cover" | "contain" | undefined;
|
|
298
|
-
alt?: string | undefined;
|
|
299
|
-
}>, z.ZodObject<{
|
|
300
|
-
type: z.ZodLiteral<"text">;
|
|
301
|
-
text: z.ZodDefault<z.ZodString>;
|
|
302
|
-
font: z.ZodDefault<z.ZodString>;
|
|
303
|
-
/** px at texture resolution (long edge = 1024 logical px before DPR). */
|
|
304
|
-
size: z.ZodDefault<z.ZodNumber>;
|
|
305
|
-
weight: z.ZodDefault<z.ZodNumber>;
|
|
306
|
-
color: z.ZodDefault<z.ZodString>;
|
|
307
|
-
align: z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>;
|
|
308
|
-
/** Fraction of the short edge. */
|
|
309
|
-
padding: z.ZodDefault<z.ZodNumber>;
|
|
310
|
-
lineHeight: z.ZodDefault<z.ZodNumber>;
|
|
311
|
-
/**
|
|
312
|
-
* Letter-spacing, in em. The one control display type cannot do without:
|
|
313
|
-
* a line set large enough to be read across a room needs its tracking
|
|
314
|
-
* pulled IN, and a small line of uppercase small-print needs it pushed
|
|
315
|
-
* out, and neither is achievable by changing the size.
|
|
316
|
-
*/
|
|
317
|
-
tracking: z.ZodDefault<z.ZodNumber>;
|
|
318
|
-
/**
|
|
319
|
-
* Where the block sits down the sheet.
|
|
320
|
-
*
|
|
321
|
-
* `top` is the old behaviour and stays the default, because a letter
|
|
322
|
-
* starts at the top of the page. `center` is what a card, a label or a
|
|
323
|
-
* poster wants — a block of type optically centred in the sheet rather
|
|
324
|
-
* than hung from its top edge.
|
|
325
|
-
*/
|
|
326
|
-
valign: z.ZodDefault<z.ZodEnum<["top", "center"]>>;
|
|
327
|
-
}, "strip", z.ZodTypeAny, {
|
|
328
|
-
type: "text";
|
|
329
|
-
text: string;
|
|
330
|
-
font: string;
|
|
331
|
-
size: number;
|
|
332
|
-
weight: number;
|
|
333
|
-
color: string;
|
|
334
|
-
align: "left" | "right" | "center";
|
|
335
|
-
padding: number;
|
|
336
|
-
lineHeight: number;
|
|
337
|
-
tracking: number;
|
|
338
|
-
valign: "top" | "center";
|
|
339
|
-
}, {
|
|
340
|
-
type: "text";
|
|
341
|
-
text?: string | undefined;
|
|
342
|
-
font?: string | undefined;
|
|
343
|
-
size?: number | undefined;
|
|
344
|
-
weight?: number | undefined;
|
|
345
|
-
color?: string | undefined;
|
|
346
|
-
align?: "left" | "right" | "center" | undefined;
|
|
347
|
-
padding?: number | undefined;
|
|
348
|
-
lineHeight?: number | undefined;
|
|
349
|
-
tracking?: number | undefined;
|
|
350
|
-
valign?: "top" | "center" | undefined;
|
|
351
|
-
}>, z.ZodObject<{
|
|
352
|
-
type: z.ZodLiteral<"card">;
|
|
353
|
-
/** Small, tracked, uppercase by convention — the label at the top. */
|
|
354
|
-
title: z.ZodDefault<z.ZodString>;
|
|
355
|
-
/** The card's reason for existing. */
|
|
356
|
-
body: z.ZodDefault<z.ZodString>;
|
|
357
|
-
/** Attribution, catalogue number, date — the line in small print at the foot. */
|
|
358
|
-
note: z.ZodDefault<z.ZodString>;
|
|
359
|
-
/** A hairline under the title. What separates a label from a paragraph. */
|
|
360
|
-
rule: z.ZodDefault<z.ZodBoolean>;
|
|
361
|
-
/**
|
|
362
|
-
* Ruled writing lines behind the body, as on an index card.
|
|
363
|
-
*
|
|
364
|
-
* Drawn UNDER the type and in the stock's own ink at low alpha, so they
|
|
365
|
-
* read as printed on the card rather than as underlines on the words.
|
|
366
|
-
*/
|
|
367
|
-
ruled: z.ZodDefault<z.ZodBoolean>;
|
|
368
|
-
font: z.ZodDefault<z.ZodString>;
|
|
369
|
-
/**
|
|
370
|
-
* Body size, px at texture resolution. Title and note derive from it.
|
|
371
|
-
*
|
|
372
|
-
* Set larger than the `text` default on purpose. A card is a small object
|
|
373
|
-
* read close up, so its type is LARGE relative to the sheet; at the text
|
|
374
|
-
* block's 42 the composition floated in the middle of the card with a
|
|
375
|
-
* third of the stock empty above and below it, which reads as a page that
|
|
376
|
-
* was cropped rather than as a card that was set.
|
|
377
|
-
*/
|
|
378
|
-
size: z.ZodDefault<z.ZodNumber>;
|
|
379
|
-
color: z.ZodDefault<z.ZodString>;
|
|
380
|
-
align: z.ZodDefault<z.ZodEnum<["left", "center"]>>;
|
|
381
|
-
padding: z.ZodDefault<z.ZodNumber>;
|
|
382
|
-
}, "strip", z.ZodTypeAny, {
|
|
383
|
-
type: "card";
|
|
384
|
-
font: string;
|
|
385
|
-
size: number;
|
|
386
|
-
color: string;
|
|
387
|
-
align: "left" | "center";
|
|
388
|
-
padding: number;
|
|
389
|
-
title: string;
|
|
390
|
-
body: string;
|
|
391
|
-
note: string;
|
|
392
|
-
rule: boolean;
|
|
393
|
-
ruled: boolean;
|
|
394
|
-
}, {
|
|
395
|
-
type: "card";
|
|
396
|
-
font?: string | undefined;
|
|
397
|
-
size?: number | undefined;
|
|
398
|
-
color?: string | undefined;
|
|
399
|
-
align?: "left" | "center" | undefined;
|
|
400
|
-
padding?: number | undefined;
|
|
401
|
-
title?: string | undefined;
|
|
402
|
-
body?: string | undefined;
|
|
403
|
-
note?: string | undefined;
|
|
404
|
-
rule?: boolean | undefined;
|
|
405
|
-
ruled?: boolean | undefined;
|
|
406
|
-
}>, z.ZodObject<{
|
|
407
|
-
type: z.ZodLiteral<"receipt">;
|
|
408
|
-
store: z.ZodDefault<z.ZodString>;
|
|
409
|
-
address: z.ZodDefault<z.ZodString>;
|
|
410
|
-
items: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
411
|
-
name: z.ZodString;
|
|
412
|
-
price: z.ZodNumber;
|
|
413
|
-
}, "strip", z.ZodTypeAny, {
|
|
414
|
-
name: string;
|
|
415
|
-
price: number;
|
|
416
|
-
}, {
|
|
417
|
-
name: string;
|
|
418
|
-
price: number;
|
|
419
|
-
}>, "many">>;
|
|
420
|
-
taxRate: z.ZodDefault<z.ZodNumber>;
|
|
421
|
-
barcode: z.ZodDefault<z.ZodBoolean>;
|
|
422
|
-
/** Fixed so presets render deterministically; omit for "now". */
|
|
423
|
-
timestamp: z.ZodOptional<z.ZodString>;
|
|
424
|
-
footer: z.ZodDefault<z.ZodString>;
|
|
425
|
-
}, "strip", z.ZodTypeAny, {
|
|
426
|
-
type: "receipt";
|
|
427
|
-
store: string;
|
|
428
|
-
address: string;
|
|
429
|
-
items: {
|
|
430
|
-
name: string;
|
|
431
|
-
price: number;
|
|
432
|
-
}[];
|
|
433
|
-
taxRate: number;
|
|
434
|
-
barcode: boolean;
|
|
435
|
-
footer: string;
|
|
436
|
-
timestamp?: string | undefined;
|
|
437
|
-
}, {
|
|
438
|
-
type: "receipt";
|
|
439
|
-
store?: string | undefined;
|
|
440
|
-
address?: string | undefined;
|
|
441
|
-
items?: {
|
|
442
|
-
name: string;
|
|
443
|
-
price: number;
|
|
444
|
-
}[] | undefined;
|
|
445
|
-
taxRate?: number | undefined;
|
|
446
|
-
barcode?: boolean | undefined;
|
|
447
|
-
timestamp?: string | undefined;
|
|
448
|
-
footer?: string | undefined;
|
|
449
|
-
}>]>>;
|
|
450
|
-
}, "strip", z.ZodTypeAny, {
|
|
451
|
-
type: "card";
|
|
452
|
-
font: string;
|
|
453
|
-
size: number;
|
|
454
|
-
color: string;
|
|
455
|
-
align: "left" | "center";
|
|
456
|
-
padding: number;
|
|
457
|
-
title: string;
|
|
458
|
-
body: string;
|
|
459
|
-
note: string;
|
|
460
|
-
rule: boolean;
|
|
461
|
-
ruled: boolean;
|
|
462
|
-
back?: {
|
|
463
|
-
type: "blank";
|
|
464
|
-
} | {
|
|
465
|
-
type: "image";
|
|
466
|
-
src: string;
|
|
467
|
-
fit: "cover" | "contain";
|
|
468
|
-
alt?: string | undefined;
|
|
469
|
-
} | {
|
|
470
|
-
type: "text";
|
|
471
|
-
text: string;
|
|
472
|
-
font: string;
|
|
473
|
-
size: number;
|
|
474
|
-
weight: number;
|
|
475
|
-
color: string;
|
|
476
|
-
align: "left" | "right" | "center";
|
|
477
|
-
padding: number;
|
|
478
|
-
lineHeight: number;
|
|
479
|
-
tracking: number;
|
|
480
|
-
valign: "top" | "center";
|
|
481
|
-
} | {
|
|
482
|
-
type: "card";
|
|
483
|
-
font: string;
|
|
484
|
-
size: number;
|
|
485
|
-
color: string;
|
|
486
|
-
align: "left" | "center";
|
|
487
|
-
padding: number;
|
|
488
|
-
title: string;
|
|
489
|
-
body: string;
|
|
490
|
-
note: string;
|
|
491
|
-
rule: boolean;
|
|
492
|
-
ruled: boolean;
|
|
493
|
-
} | {
|
|
494
|
-
type: "receipt";
|
|
495
|
-
store: string;
|
|
496
|
-
address: string;
|
|
497
|
-
items: {
|
|
498
|
-
name: string;
|
|
499
|
-
price: number;
|
|
500
|
-
}[];
|
|
501
|
-
taxRate: number;
|
|
502
|
-
barcode: boolean;
|
|
503
|
-
footer: string;
|
|
504
|
-
timestamp?: string | undefined;
|
|
505
|
-
} | undefined;
|
|
506
|
-
}, {
|
|
507
|
-
type: "card";
|
|
508
|
-
font?: string | undefined;
|
|
509
|
-
size?: number | undefined;
|
|
510
|
-
color?: string | undefined;
|
|
511
|
-
align?: "left" | "center" | undefined;
|
|
512
|
-
padding?: number | undefined;
|
|
513
|
-
title?: string | undefined;
|
|
514
|
-
body?: string | undefined;
|
|
515
|
-
note?: string | undefined;
|
|
516
|
-
rule?: boolean | undefined;
|
|
517
|
-
ruled?: boolean | undefined;
|
|
518
|
-
back?: {
|
|
519
|
-
type: "blank";
|
|
520
|
-
} | {
|
|
521
|
-
type: "image";
|
|
522
|
-
src?: string | undefined;
|
|
523
|
-
fit?: "cover" | "contain" | undefined;
|
|
524
|
-
alt?: string | undefined;
|
|
525
|
-
} | {
|
|
526
|
-
type: "text";
|
|
527
|
-
text?: string | undefined;
|
|
528
|
-
font?: string | undefined;
|
|
529
|
-
size?: number | undefined;
|
|
530
|
-
weight?: number | undefined;
|
|
531
|
-
color?: string | undefined;
|
|
532
|
-
align?: "left" | "right" | "center" | undefined;
|
|
533
|
-
padding?: number | undefined;
|
|
534
|
-
lineHeight?: number | undefined;
|
|
535
|
-
tracking?: number | undefined;
|
|
536
|
-
valign?: "top" | "center" | undefined;
|
|
537
|
-
} | {
|
|
538
|
-
type: "card";
|
|
539
|
-
font?: string | undefined;
|
|
540
|
-
size?: number | undefined;
|
|
541
|
-
color?: string | undefined;
|
|
542
|
-
align?: "left" | "center" | undefined;
|
|
543
|
-
padding?: number | undefined;
|
|
544
|
-
title?: string | undefined;
|
|
545
|
-
body?: string | undefined;
|
|
546
|
-
note?: string | undefined;
|
|
547
|
-
rule?: boolean | undefined;
|
|
548
|
-
ruled?: boolean | undefined;
|
|
549
|
-
} | {
|
|
550
|
-
type: "receipt";
|
|
551
|
-
store?: string | undefined;
|
|
552
|
-
address?: string | undefined;
|
|
553
|
-
items?: {
|
|
554
|
-
name: string;
|
|
555
|
-
price: number;
|
|
556
|
-
}[] | undefined;
|
|
557
|
-
taxRate?: number | undefined;
|
|
558
|
-
barcode?: boolean | undefined;
|
|
559
|
-
timestamp?: string | undefined;
|
|
560
|
-
footer?: string | undefined;
|
|
561
|
-
} | undefined;
|
|
562
|
-
}>;
|
|
563
|
-
declare const receiptContentSchema: z.ZodObject<{
|
|
564
|
-
type: z.ZodLiteral<"receipt">;
|
|
565
|
-
store: z.ZodDefault<z.ZodString>;
|
|
566
|
-
address: z.ZodDefault<z.ZodString>;
|
|
567
|
-
items: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
568
|
-
name: z.ZodString;
|
|
569
|
-
price: z.ZodNumber;
|
|
570
|
-
}, "strip", z.ZodTypeAny, {
|
|
571
|
-
name: string;
|
|
572
|
-
price: number;
|
|
573
|
-
}, {
|
|
574
|
-
name: string;
|
|
575
|
-
price: number;
|
|
576
|
-
}>, "many">>;
|
|
577
|
-
taxRate: z.ZodDefault<z.ZodNumber>;
|
|
578
|
-
barcode: z.ZodDefault<z.ZodBoolean>;
|
|
579
|
-
/** Fixed so presets render deterministically; omit for "now". */
|
|
580
|
-
timestamp: z.ZodOptional<z.ZodString>;
|
|
581
|
-
footer: z.ZodDefault<z.ZodString>;
|
|
582
|
-
} & {
|
|
583
|
-
back: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
584
|
-
type: z.ZodLiteral<"blank">;
|
|
585
|
-
}, "strip", z.ZodTypeAny, {
|
|
586
|
-
type: "blank";
|
|
587
|
-
}, {
|
|
588
|
-
type: "blank";
|
|
589
|
-
}>, z.ZodObject<{
|
|
590
|
-
type: z.ZodLiteral<"image">;
|
|
591
|
-
/**
|
|
592
|
-
* Empty means "no picture yet", and renders as bare stock rather than as
|
|
593
|
-
* a failure. That is what lets a built-in preset be an image preset
|
|
594
|
-
* without shipping — or fetching — a photograph: `photo-print` and
|
|
595
|
-
* `postage-stamp` are containers for the caller's own art, handed over via
|
|
596
|
-
* `<PaperField images={...} />` or `content.src`.
|
|
597
|
-
*/
|
|
598
|
-
src: z.ZodDefault<z.ZodString>;
|
|
599
|
-
fit: z.ZodDefault<z.ZodEnum<["cover", "contain"]>>;
|
|
600
|
-
/** Read by the hidden DOM mirror and the no-WebGL fallback. */
|
|
601
|
-
alt: z.ZodOptional<z.ZodString>;
|
|
602
|
-
}, "strip", z.ZodTypeAny, {
|
|
603
|
-
type: "image";
|
|
604
|
-
src: string;
|
|
605
|
-
fit: "cover" | "contain";
|
|
606
|
-
alt?: string | undefined;
|
|
607
|
-
}, {
|
|
608
|
-
type: "image";
|
|
609
|
-
src?: string | undefined;
|
|
610
|
-
fit?: "cover" | "contain" | undefined;
|
|
611
|
-
alt?: string | undefined;
|
|
612
|
-
}>, z.ZodObject<{
|
|
613
|
-
type: z.ZodLiteral<"text">;
|
|
614
|
-
text: z.ZodDefault<z.ZodString>;
|
|
615
|
-
font: z.ZodDefault<z.ZodString>;
|
|
616
|
-
/** px at texture resolution (long edge = 1024 logical px before DPR). */
|
|
617
|
-
size: z.ZodDefault<z.ZodNumber>;
|
|
618
|
-
weight: z.ZodDefault<z.ZodNumber>;
|
|
619
|
-
color: z.ZodDefault<z.ZodString>;
|
|
620
|
-
align: z.ZodDefault<z.ZodEnum<["left", "center", "right"]>>;
|
|
621
|
-
/** Fraction of the short edge. */
|
|
622
|
-
padding: z.ZodDefault<z.ZodNumber>;
|
|
623
|
-
lineHeight: z.ZodDefault<z.ZodNumber>;
|
|
624
|
-
/**
|
|
625
|
-
* Letter-spacing, in em. The one control display type cannot do without:
|
|
626
|
-
* a line set large enough to be read across a room needs its tracking
|
|
627
|
-
* pulled IN, and a small line of uppercase small-print needs it pushed
|
|
628
|
-
* out, and neither is achievable by changing the size.
|
|
629
|
-
*/
|
|
630
|
-
tracking: z.ZodDefault<z.ZodNumber>;
|
|
631
|
-
/**
|
|
632
|
-
* Where the block sits down the sheet.
|
|
633
|
-
*
|
|
634
|
-
* `top` is the old behaviour and stays the default, because a letter
|
|
635
|
-
* starts at the top of the page. `center` is what a card, a label or a
|
|
636
|
-
* poster wants — a block of type optically centred in the sheet rather
|
|
637
|
-
* than hung from its top edge.
|
|
638
|
-
*/
|
|
639
|
-
valign: z.ZodDefault<z.ZodEnum<["top", "center"]>>;
|
|
640
|
-
}, "strip", z.ZodTypeAny, {
|
|
641
|
-
type: "text";
|
|
642
|
-
text: string;
|
|
643
|
-
font: string;
|
|
644
|
-
size: number;
|
|
645
|
-
weight: number;
|
|
646
|
-
color: string;
|
|
647
|
-
align: "left" | "right" | "center";
|
|
648
|
-
padding: number;
|
|
649
|
-
lineHeight: number;
|
|
650
|
-
tracking: number;
|
|
651
|
-
valign: "top" | "center";
|
|
652
|
-
}, {
|
|
653
|
-
type: "text";
|
|
654
|
-
text?: string | undefined;
|
|
655
|
-
font?: string | undefined;
|
|
656
|
-
size?: number | undefined;
|
|
657
|
-
weight?: number | undefined;
|
|
658
|
-
color?: string | undefined;
|
|
659
|
-
align?: "left" | "right" | "center" | undefined;
|
|
660
|
-
padding?: number | undefined;
|
|
661
|
-
lineHeight?: number | undefined;
|
|
662
|
-
tracking?: number | undefined;
|
|
663
|
-
valign?: "top" | "center" | undefined;
|
|
664
|
-
}>, z.ZodObject<{
|
|
665
|
-
type: z.ZodLiteral<"card">;
|
|
666
|
-
/** Small, tracked, uppercase by convention — the label at the top. */
|
|
667
|
-
title: z.ZodDefault<z.ZodString>;
|
|
668
|
-
/** The card's reason for existing. */
|
|
669
|
-
body: z.ZodDefault<z.ZodString>;
|
|
670
|
-
/** Attribution, catalogue number, date — the line in small print at the foot. */
|
|
671
|
-
note: z.ZodDefault<z.ZodString>;
|
|
672
|
-
/** A hairline under the title. What separates a label from a paragraph. */
|
|
673
|
-
rule: z.ZodDefault<z.ZodBoolean>;
|
|
674
|
-
/**
|
|
675
|
-
* Ruled writing lines behind the body, as on an index card.
|
|
676
|
-
*
|
|
677
|
-
* Drawn UNDER the type and in the stock's own ink at low alpha, so they
|
|
678
|
-
* read as printed on the card rather than as underlines on the words.
|
|
679
|
-
*/
|
|
680
|
-
ruled: z.ZodDefault<z.ZodBoolean>;
|
|
681
|
-
font: z.ZodDefault<z.ZodString>;
|
|
682
|
-
/**
|
|
683
|
-
* Body size, px at texture resolution. Title and note derive from it.
|
|
684
|
-
*
|
|
685
|
-
* Set larger than the `text` default on purpose. A card is a small object
|
|
686
|
-
* read close up, so its type is LARGE relative to the sheet; at the text
|
|
687
|
-
* block's 42 the composition floated in the middle of the card with a
|
|
688
|
-
* third of the stock empty above and below it, which reads as a page that
|
|
689
|
-
* was cropped rather than as a card that was set.
|
|
690
|
-
*/
|
|
691
|
-
size: z.ZodDefault<z.ZodNumber>;
|
|
692
|
-
color: z.ZodDefault<z.ZodString>;
|
|
693
|
-
align: z.ZodDefault<z.ZodEnum<["left", "center"]>>;
|
|
694
|
-
padding: z.ZodDefault<z.ZodNumber>;
|
|
695
|
-
}, "strip", z.ZodTypeAny, {
|
|
696
|
-
type: "card";
|
|
697
|
-
font: string;
|
|
698
|
-
size: number;
|
|
699
|
-
color: string;
|
|
700
|
-
align: "left" | "center";
|
|
701
|
-
padding: number;
|
|
702
|
-
title: string;
|
|
703
|
-
body: string;
|
|
704
|
-
note: string;
|
|
705
|
-
rule: boolean;
|
|
706
|
-
ruled: boolean;
|
|
707
|
-
}, {
|
|
708
|
-
type: "card";
|
|
709
|
-
font?: string | undefined;
|
|
710
|
-
size?: number | undefined;
|
|
711
|
-
color?: string | undefined;
|
|
712
|
-
align?: "left" | "center" | undefined;
|
|
713
|
-
padding?: number | undefined;
|
|
714
|
-
title?: string | undefined;
|
|
715
|
-
body?: string | undefined;
|
|
716
|
-
note?: string | undefined;
|
|
717
|
-
rule?: boolean | undefined;
|
|
718
|
-
ruled?: boolean | undefined;
|
|
719
|
-
}>, z.ZodObject<{
|
|
720
|
-
type: z.ZodLiteral<"receipt">;
|
|
721
|
-
store: z.ZodDefault<z.ZodString>;
|
|
722
|
-
address: z.ZodDefault<z.ZodString>;
|
|
723
|
-
items: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
724
|
-
name: z.ZodString;
|
|
725
|
-
price: z.ZodNumber;
|
|
726
|
-
}, "strip", z.ZodTypeAny, {
|
|
727
|
-
name: string;
|
|
728
|
-
price: number;
|
|
729
|
-
}, {
|
|
730
|
-
name: string;
|
|
731
|
-
price: number;
|
|
732
|
-
}>, "many">>;
|
|
733
|
-
taxRate: z.ZodDefault<z.ZodNumber>;
|
|
734
|
-
barcode: z.ZodDefault<z.ZodBoolean>;
|
|
735
|
-
/** Fixed so presets render deterministically; omit for "now". */
|
|
736
|
-
timestamp: z.ZodOptional<z.ZodString>;
|
|
737
|
-
footer: z.ZodDefault<z.ZodString>;
|
|
738
|
-
}, "strip", z.ZodTypeAny, {
|
|
739
|
-
type: "receipt";
|
|
740
|
-
store: string;
|
|
741
|
-
address: string;
|
|
742
|
-
items: {
|
|
743
|
-
name: string;
|
|
744
|
-
price: number;
|
|
745
|
-
}[];
|
|
746
|
-
taxRate: number;
|
|
747
|
-
barcode: boolean;
|
|
748
|
-
footer: string;
|
|
749
|
-
timestamp?: string | undefined;
|
|
750
|
-
}, {
|
|
751
|
-
type: "receipt";
|
|
752
|
-
store?: string | undefined;
|
|
753
|
-
address?: string | undefined;
|
|
754
|
-
items?: {
|
|
755
|
-
name: string;
|
|
756
|
-
price: number;
|
|
757
|
-
}[] | undefined;
|
|
758
|
-
taxRate?: number | undefined;
|
|
759
|
-
barcode?: boolean | undefined;
|
|
760
|
-
timestamp?: string | undefined;
|
|
761
|
-
footer?: string | undefined;
|
|
762
|
-
}>]>>;
|
|
763
|
-
}, "strip", z.ZodTypeAny, {
|
|
764
|
-
type: "receipt";
|
|
765
|
-
store: string;
|
|
766
|
-
address: string;
|
|
767
|
-
items: {
|
|
768
|
-
name: string;
|
|
769
|
-
price: number;
|
|
770
|
-
}[];
|
|
771
|
-
taxRate: number;
|
|
772
|
-
barcode: boolean;
|
|
773
|
-
footer: string;
|
|
774
|
-
timestamp?: string | undefined;
|
|
775
|
-
back?: {
|
|
776
|
-
type: "blank";
|
|
777
|
-
} | {
|
|
778
|
-
type: "image";
|
|
779
|
-
src: string;
|
|
780
|
-
fit: "cover" | "contain";
|
|
781
|
-
alt?: string | undefined;
|
|
782
|
-
} | {
|
|
783
|
-
type: "text";
|
|
784
|
-
text: string;
|
|
785
|
-
font: string;
|
|
786
|
-
size: number;
|
|
787
|
-
weight: number;
|
|
788
|
-
color: string;
|
|
789
|
-
align: "left" | "right" | "center";
|
|
790
|
-
padding: number;
|
|
791
|
-
lineHeight: number;
|
|
792
|
-
tracking: number;
|
|
793
|
-
valign: "top" | "center";
|
|
794
|
-
} | {
|
|
795
|
-
type: "card";
|
|
796
|
-
font: string;
|
|
797
|
-
size: number;
|
|
798
|
-
color: string;
|
|
799
|
-
align: "left" | "center";
|
|
800
|
-
padding: number;
|
|
801
|
-
title: string;
|
|
802
|
-
body: string;
|
|
803
|
-
note: string;
|
|
804
|
-
rule: boolean;
|
|
805
|
-
ruled: boolean;
|
|
806
|
-
} | {
|
|
807
|
-
type: "receipt";
|
|
808
|
-
store: string;
|
|
809
|
-
address: string;
|
|
810
|
-
items: {
|
|
811
|
-
name: string;
|
|
812
|
-
price: number;
|
|
813
|
-
}[];
|
|
814
|
-
taxRate: number;
|
|
815
|
-
barcode: boolean;
|
|
816
|
-
footer: string;
|
|
817
|
-
timestamp?: string | undefined;
|
|
818
|
-
} | undefined;
|
|
819
|
-
}, {
|
|
820
|
-
type: "receipt";
|
|
821
|
-
store?: string | undefined;
|
|
822
|
-
address?: string | undefined;
|
|
823
|
-
items?: {
|
|
824
|
-
name: string;
|
|
825
|
-
price: number;
|
|
826
|
-
}[] | undefined;
|
|
827
|
-
taxRate?: number | undefined;
|
|
828
|
-
barcode?: boolean | undefined;
|
|
829
|
-
timestamp?: string | undefined;
|
|
830
|
-
footer?: string | undefined;
|
|
831
|
-
back?: {
|
|
832
|
-
type: "blank";
|
|
833
|
-
} | {
|
|
834
|
-
type: "image";
|
|
835
|
-
src?: string | undefined;
|
|
836
|
-
fit?: "cover" | "contain" | undefined;
|
|
837
|
-
alt?: string | undefined;
|
|
838
|
-
} | {
|
|
839
|
-
type: "text";
|
|
840
|
-
text?: string | undefined;
|
|
841
|
-
font?: string | undefined;
|
|
842
|
-
size?: number | undefined;
|
|
843
|
-
weight?: number | undefined;
|
|
844
|
-
color?: string | undefined;
|
|
845
|
-
align?: "left" | "right" | "center" | undefined;
|
|
846
|
-
padding?: number | undefined;
|
|
847
|
-
lineHeight?: number | undefined;
|
|
848
|
-
tracking?: number | undefined;
|
|
849
|
-
valign?: "top" | "center" | undefined;
|
|
850
|
-
} | {
|
|
851
|
-
type: "card";
|
|
852
|
-
font?: string | undefined;
|
|
853
|
-
size?: number | undefined;
|
|
854
|
-
color?: string | undefined;
|
|
855
|
-
align?: "left" | "center" | undefined;
|
|
856
|
-
padding?: number | undefined;
|
|
857
|
-
title?: string | undefined;
|
|
858
|
-
body?: string | undefined;
|
|
859
|
-
note?: string | undefined;
|
|
860
|
-
rule?: boolean | undefined;
|
|
861
|
-
ruled?: boolean | undefined;
|
|
862
|
-
} | {
|
|
863
|
-
type: "receipt";
|
|
864
|
-
store?: string | undefined;
|
|
865
|
-
address?: string | undefined;
|
|
866
|
-
items?: {
|
|
867
|
-
name: string;
|
|
868
|
-
price: number;
|
|
869
|
-
}[] | undefined;
|
|
870
|
-
taxRate?: number | undefined;
|
|
871
|
-
barcode?: boolean | undefined;
|
|
872
|
-
timestamp?: string | undefined;
|
|
873
|
-
footer?: string | undefined;
|
|
874
|
-
} | undefined;
|
|
875
|
-
}>;
|
|
876
238
|
declare const contentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
877
239
|
type: z.ZodLiteral<"blank">;
|
|
878
240
|
} & {
|
|
@@ -6642,20 +6004,5 @@ interface FieldPaperSlot {
|
|
|
6642
6004
|
/** Per-instance state overrides, merged over the preset's states. */
|
|
6643
6005
|
states?: PaperStatesInput;
|
|
6644
6006
|
}
|
|
6645
|
-
interface FieldGroupData {
|
|
6646
|
-
config: PaperConfig;
|
|
6647
|
-
/** Global slot indices this group renders (layout poses use global i / total n). */
|
|
6648
|
-
indices: number[];
|
|
6649
|
-
contents: ContentConfig[];
|
|
6650
|
-
}
|
|
6651
|
-
/** Group slots by resolved preset — one instanced draw call per distinct preset. */
|
|
6652
|
-
declare function groupFieldPapers(papers: FieldPaperSlot[], fallback?: string | PaperConfigInput): FieldGroupData[];
|
|
6653
|
-
/**
|
|
6654
|
-
* Resolve one slot to its final render config: preset (or fallback) + slot
|
|
6655
|
-
* content + slot-level state overrides merged over the preset's states + the
|
|
6656
|
-
* `sheet` smart default (an 'auto' peel corner resolves to the corner facing
|
|
6657
|
-
* away from the sheet's center — what a thumb would find).
|
|
6658
|
-
*/
|
|
6659
|
-
declare function resolveFieldSlotConfig(slot: FieldPaperSlot, fallback: string | PaperConfigInput | undefined, index: number, layoutId: string, layoutOptions: Record<string, unknown>): PaperConfig;
|
|
6660
6007
|
|
|
6661
|
-
export {
|
|
6008
|
+
export { paperEdges as A, type BehaviorConfigInput as B, type ContentConfigInput as C, type DeformerInstanceConfigInput as D, paperStatesSchema as E, type FieldPaperSlot as F, physicsNames as G, stateDefSchema as H, stockNames as I, type LightingName as L, type PaperConfig as P, type SheetConfig as S, type PaperConfigInput as a, type StockName as b, type SurfaceConfigInput as c, type SceneConfigInput as d, type PhysicsConfigInput as e, type ContentConfig as f, type PaperStatesInput as g, type FilmName as h, type BackContentConfig as i, type BehaviorConfig as j, type ClothConfig as k, type CoreStateName as l, type DeformerInstanceConfig as m, type PaperEdge as n, type PaperStates as o, type PhysicsConfig as p, type SceneConfig as q, type StateDef as r, type StateName as s, type StateTransitionConfig as t, type SurfaceConfig as u, behaviorConfigSchema as v, clothConfigSchema as w, coreStateNames as x, lightingNames as y, paperConfigSchema as z };
|