@the-smithy/hearth-schema 0.19.0 → 0.20.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/index.d.ts +504 -22
- package/dist/index.js +124 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -17,11 +17,23 @@ declare const image: z.ZodObject<{
|
|
|
17
17
|
alt: z.ZodDefault<z.ZodString>;
|
|
18
18
|
width: z.ZodOptional<z.ZodNumber>;
|
|
19
19
|
height: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
x: z.ZodNumber;
|
|
22
|
+
y: z.ZodNumber;
|
|
23
|
+
}, z.core.$strip>>;
|
|
20
24
|
}, z.core.$strip>;
|
|
21
25
|
declare const link: z.ZodObject<{
|
|
22
26
|
label: z.ZodString;
|
|
23
27
|
href: z.ZodString;
|
|
24
28
|
}, z.core.$strip>;
|
|
29
|
+
/**
|
|
30
|
+
* A spot on a map, in degrees. Set in the editor (found from the address, then the pin dragged if needed), so
|
|
31
|
+
* frontends can show a map without looking addresses up.
|
|
32
|
+
*/
|
|
33
|
+
declare const position: z.ZodObject<{
|
|
34
|
+
lat: z.ZodNumber;
|
|
35
|
+
lng: z.ZodNumber;
|
|
36
|
+
}, z.core.$strip>;
|
|
25
37
|
declare const formFieldSchema: z.ZodObject<{
|
|
26
38
|
name: z.ZodString;
|
|
27
39
|
label: z.ZodString;
|
|
@@ -311,6 +323,10 @@ declare const blockDataSchemas: {
|
|
|
311
323
|
alt: z.ZodDefault<z.ZodString>;
|
|
312
324
|
width: z.ZodOptional<z.ZodNumber>;
|
|
313
325
|
height: z.ZodOptional<z.ZodNumber>;
|
|
326
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
327
|
+
x: z.ZodNumber;
|
|
328
|
+
y: z.ZodNumber;
|
|
329
|
+
}, z.core.$strip>>;
|
|
314
330
|
}, z.core.$strip>>;
|
|
315
331
|
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
316
332
|
label: z.ZodString;
|
|
@@ -342,6 +358,10 @@ declare const blockDataSchemas: {
|
|
|
342
358
|
alt: z.ZodDefault<z.ZodString>;
|
|
343
359
|
width: z.ZodOptional<z.ZodNumber>;
|
|
344
360
|
height: z.ZodOptional<z.ZodNumber>;
|
|
361
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
362
|
+
x: z.ZodNumber;
|
|
363
|
+
y: z.ZodNumber;
|
|
364
|
+
}, z.core.$strip>>;
|
|
345
365
|
}, z.core.$strip>>;
|
|
346
366
|
imagePosition: z.ZodDefault<z.ZodEnum<{
|
|
347
367
|
left: "left";
|
|
@@ -375,6 +395,10 @@ declare const blockDataSchemas: {
|
|
|
375
395
|
alt: z.ZodDefault<z.ZodString>;
|
|
376
396
|
width: z.ZodOptional<z.ZodNumber>;
|
|
377
397
|
height: z.ZodOptional<z.ZodNumber>;
|
|
398
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
399
|
+
x: z.ZodNumber;
|
|
400
|
+
y: z.ZodNumber;
|
|
401
|
+
}, z.core.$strip>>;
|
|
378
402
|
}, z.core.$strip>>;
|
|
379
403
|
link: z.ZodOptional<z.ZodObject<{
|
|
380
404
|
label: z.ZodString;
|
|
@@ -410,6 +434,10 @@ declare const blockDataSchemas: {
|
|
|
410
434
|
alt: z.ZodDefault<z.ZodString>;
|
|
411
435
|
width: z.ZodOptional<z.ZodNumber>;
|
|
412
436
|
height: z.ZodOptional<z.ZodNumber>;
|
|
437
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
438
|
+
x: z.ZodNumber;
|
|
439
|
+
y: z.ZodNumber;
|
|
440
|
+
}, z.core.$strip>>;
|
|
413
441
|
}, z.core.$strip>>;
|
|
414
442
|
}, z.core.$strip>;
|
|
415
443
|
readonly faq: z.ZodObject<{
|
|
@@ -457,6 +485,10 @@ declare const blockDataSchemas: {
|
|
|
457
485
|
alt: z.ZodDefault<z.ZodString>;
|
|
458
486
|
width: z.ZodOptional<z.ZodNumber>;
|
|
459
487
|
height: z.ZodOptional<z.ZodNumber>;
|
|
488
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
489
|
+
x: z.ZodNumber;
|
|
490
|
+
y: z.ZodNumber;
|
|
491
|
+
}, z.core.$strip>>;
|
|
460
492
|
}, z.core.$strip>>;
|
|
461
493
|
url: z.ZodOptional<z.ZodString>;
|
|
462
494
|
role: z.ZodOptional<z.ZodString>;
|
|
@@ -482,6 +514,31 @@ declare const blockDataSchemas: {
|
|
|
482
514
|
hours: z.ZodOptional<z.ZodString>;
|
|
483
515
|
notes: z.ZodOptional<z.ZodString>;
|
|
484
516
|
showMap: z.ZodDefault<z.ZodBoolean>;
|
|
517
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
518
|
+
lat: z.ZodNumber;
|
|
519
|
+
lng: z.ZodNumber;
|
|
520
|
+
}, z.core.$strip>>;
|
|
521
|
+
}, z.core.$strip>;
|
|
522
|
+
/** Several places on one map, with a list beside it: branches, venues, drop-off points. */
|
|
523
|
+
readonly locations: z.ZodObject<{
|
|
524
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
525
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
526
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
527
|
+
items: z.ZodArray<z.ZodObject<{
|
|
528
|
+
name: z.ZodString;
|
|
529
|
+
address: z.ZodString;
|
|
530
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
531
|
+
lat: z.ZodNumber;
|
|
532
|
+
lng: z.ZodNumber;
|
|
533
|
+
}, z.core.$strip>>;
|
|
534
|
+
hours: z.ZodOptional<z.ZodString>;
|
|
535
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
536
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
537
|
+
label: z.ZodString;
|
|
538
|
+
href: z.ZodString;
|
|
539
|
+
}, z.core.$strip>>;
|
|
540
|
+
}, z.core.$strip>>;
|
|
541
|
+
showMap: z.ZodDefault<z.ZodBoolean>;
|
|
485
542
|
}, z.core.$strip>;
|
|
486
543
|
readonly schedule: z.ZodObject<{
|
|
487
544
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
@@ -502,6 +559,10 @@ declare const blockDataSchemas: {
|
|
|
502
559
|
alt: z.ZodDefault<z.ZodString>;
|
|
503
560
|
width: z.ZodOptional<z.ZodNumber>;
|
|
504
561
|
height: z.ZodOptional<z.ZodNumber>;
|
|
562
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
563
|
+
x: z.ZodNumber;
|
|
564
|
+
y: z.ZodNumber;
|
|
565
|
+
}, z.core.$strip>>;
|
|
505
566
|
}, z.core.$strip>;
|
|
506
567
|
caption: z.ZodOptional<z.ZodString>;
|
|
507
568
|
}, z.core.$strip>>;
|
|
@@ -520,6 +581,10 @@ declare const blockDataSchemas: {
|
|
|
520
581
|
alt: z.ZodDefault<z.ZodString>;
|
|
521
582
|
width: z.ZodOptional<z.ZodNumber>;
|
|
522
583
|
height: z.ZodOptional<z.ZodNumber>;
|
|
584
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
585
|
+
x: z.ZodNumber;
|
|
586
|
+
y: z.ZodNumber;
|
|
587
|
+
}, z.core.$strip>>;
|
|
523
588
|
}, z.core.$strip>>;
|
|
524
589
|
tone: z.ZodDefault<z.ZodEnum<{
|
|
525
590
|
default: "default";
|
|
@@ -562,6 +627,10 @@ declare const blockDataSchemas: {
|
|
|
562
627
|
alt: z.ZodDefault<z.ZodString>;
|
|
563
628
|
width: z.ZodOptional<z.ZodNumber>;
|
|
564
629
|
height: z.ZodOptional<z.ZodNumber>;
|
|
630
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
631
|
+
x: z.ZodNumber;
|
|
632
|
+
y: z.ZodNumber;
|
|
633
|
+
}, z.core.$strip>>;
|
|
565
634
|
}, z.core.$strip>>;
|
|
566
635
|
bio: z.ZodOptional<z.ZodString>;
|
|
567
636
|
}, z.core.$strip>>;
|
|
@@ -576,6 +645,10 @@ declare const blockDataSchemas: {
|
|
|
576
645
|
alt: z.ZodDefault<z.ZodString>;
|
|
577
646
|
width: z.ZodOptional<z.ZodNumber>;
|
|
578
647
|
height: z.ZodOptional<z.ZodNumber>;
|
|
648
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
649
|
+
x: z.ZodNumber;
|
|
650
|
+
y: z.ZodNumber;
|
|
651
|
+
}, z.core.$strip>>;
|
|
579
652
|
}, z.core.$strip>>;
|
|
580
653
|
url: z.ZodOptional<z.ZodString>;
|
|
581
654
|
}, z.core.$strip>>;
|
|
@@ -627,6 +700,16 @@ declare const blockDataSchemas: {
|
|
|
627
700
|
categoryId: z.ZodOptional<z.ZodString>;
|
|
628
701
|
heading: z.ZodOptional<z.ZodString>;
|
|
629
702
|
}, z.core.$strip>;
|
|
703
|
+
/**
|
|
704
|
+
* Volunteer sign-up for one of the site's events: the event's form, shifts and questions, wherever the block sits.
|
|
705
|
+
* On an event's own page, leave `eventSlug` out for that event. The API adds `event` (with its `volunteering`) and
|
|
706
|
+
* leaves the block out when the event isn't found or doesn't ask for volunteers.
|
|
707
|
+
*/
|
|
708
|
+
readonly volunteerSignup: z.ZodObject<{
|
|
709
|
+
eventSlug: z.ZodOptional<z.ZodString>;
|
|
710
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
711
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
712
|
+
}, z.core.$strip>;
|
|
630
713
|
/** Entries of a page collection (a blog, case studies…), newest first unless the collection says otherwise. */
|
|
631
714
|
readonly collectionList: z.ZodObject<{
|
|
632
715
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
@@ -689,7 +772,7 @@ declare const blockTypes: BlockType[];
|
|
|
689
772
|
declare const blockFeature: Partial<Record<BlockType, "events" | "giving">>;
|
|
690
773
|
declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
691
774
|
id: z.ZodString;
|
|
692
|
-
type: z.ZodLiteral<"custom" | "cta" | "quote" | "people" | "logos" | "hero" | "richText" | "mediaText" | "stats" | "cardGrid" | "faq" | "pricing" | "projects" | "location" | "schedule" | "gallery" | "video" | "embed" | "form" | "upcomingEvents" | "pastEvents" | "eventSpotlight" | "collectionList" | "sharedBlock" | "fundraiserSpotlight" | "fundraiserGrid" | "donate">;
|
|
775
|
+
type: z.ZodLiteral<"custom" | "cta" | "quote" | "people" | "logos" | "hero" | "richText" | "mediaText" | "stats" | "cardGrid" | "faq" | "pricing" | "projects" | "location" | "locations" | "schedule" | "gallery" | "video" | "embed" | "form" | "upcomingEvents" | "pastEvents" | "eventSpotlight" | "volunteerSignup" | "collectionList" | "sharedBlock" | "fundraiserSpotlight" | "fundraiserGrid" | "donate">;
|
|
693
776
|
data: z.ZodObject<{
|
|
694
777
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
695
778
|
heading: z.ZodString;
|
|
@@ -699,6 +782,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
699
782
|
alt: z.ZodDefault<z.ZodString>;
|
|
700
783
|
width: z.ZodOptional<z.ZodNumber>;
|
|
701
784
|
height: z.ZodOptional<z.ZodNumber>;
|
|
785
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
786
|
+
x: z.ZodNumber;
|
|
787
|
+
y: z.ZodNumber;
|
|
788
|
+
}, z.core.$strip>>;
|
|
702
789
|
}, z.core.$strip>>;
|
|
703
790
|
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
704
791
|
label: z.ZodString;
|
|
@@ -728,6 +815,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
728
815
|
alt: z.ZodDefault<z.ZodString>;
|
|
729
816
|
width: z.ZodOptional<z.ZodNumber>;
|
|
730
817
|
height: z.ZodOptional<z.ZodNumber>;
|
|
818
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
819
|
+
x: z.ZodNumber;
|
|
820
|
+
y: z.ZodNumber;
|
|
821
|
+
}, z.core.$strip>>;
|
|
731
822
|
}, z.core.$strip>>;
|
|
732
823
|
imagePosition: z.ZodDefault<z.ZodEnum<{
|
|
733
824
|
left: "left";
|
|
@@ -759,6 +850,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
759
850
|
alt: z.ZodDefault<z.ZodString>;
|
|
760
851
|
width: z.ZodOptional<z.ZodNumber>;
|
|
761
852
|
height: z.ZodOptional<z.ZodNumber>;
|
|
853
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
854
|
+
x: z.ZodNumber;
|
|
855
|
+
y: z.ZodNumber;
|
|
856
|
+
}, z.core.$strip>>;
|
|
762
857
|
}, z.core.$strip>>;
|
|
763
858
|
link: z.ZodOptional<z.ZodObject<{
|
|
764
859
|
label: z.ZodString;
|
|
@@ -793,6 +888,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
793
888
|
alt: z.ZodDefault<z.ZodString>;
|
|
794
889
|
width: z.ZodOptional<z.ZodNumber>;
|
|
795
890
|
height: z.ZodOptional<z.ZodNumber>;
|
|
891
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
892
|
+
x: z.ZodNumber;
|
|
893
|
+
y: z.ZodNumber;
|
|
894
|
+
}, z.core.$strip>>;
|
|
796
895
|
}, z.core.$strip>>;
|
|
797
896
|
}, z.core.$strip> | z.ZodObject<{
|
|
798
897
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -835,6 +934,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
835
934
|
alt: z.ZodDefault<z.ZodString>;
|
|
836
935
|
width: z.ZodOptional<z.ZodNumber>;
|
|
837
936
|
height: z.ZodOptional<z.ZodNumber>;
|
|
937
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
938
|
+
x: z.ZodNumber;
|
|
939
|
+
y: z.ZodNumber;
|
|
940
|
+
}, z.core.$strip>>;
|
|
838
941
|
}, z.core.$strip>>;
|
|
839
942
|
url: z.ZodOptional<z.ZodString>;
|
|
840
943
|
role: z.ZodOptional<z.ZodString>;
|
|
@@ -859,6 +962,29 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
859
962
|
hours: z.ZodOptional<z.ZodString>;
|
|
860
963
|
notes: z.ZodOptional<z.ZodString>;
|
|
861
964
|
showMap: z.ZodDefault<z.ZodBoolean>;
|
|
965
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
966
|
+
lat: z.ZodNumber;
|
|
967
|
+
lng: z.ZodNumber;
|
|
968
|
+
}, z.core.$strip>>;
|
|
969
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
970
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
971
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
972
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
973
|
+
items: z.ZodArray<z.ZodObject<{
|
|
974
|
+
name: z.ZodString;
|
|
975
|
+
address: z.ZodString;
|
|
976
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
977
|
+
lat: z.ZodNumber;
|
|
978
|
+
lng: z.ZodNumber;
|
|
979
|
+
}, z.core.$strip>>;
|
|
980
|
+
hours: z.ZodOptional<z.ZodString>;
|
|
981
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
982
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
983
|
+
label: z.ZodString;
|
|
984
|
+
href: z.ZodString;
|
|
985
|
+
}, z.core.$strip>>;
|
|
986
|
+
}, z.core.$strip>>;
|
|
987
|
+
showMap: z.ZodDefault<z.ZodBoolean>;
|
|
862
988
|
}, z.core.$strip> | z.ZodObject<{
|
|
863
989
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
864
990
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -877,6 +1003,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
877
1003
|
alt: z.ZodDefault<z.ZodString>;
|
|
878
1004
|
width: z.ZodOptional<z.ZodNumber>;
|
|
879
1005
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1006
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1007
|
+
x: z.ZodNumber;
|
|
1008
|
+
y: z.ZodNumber;
|
|
1009
|
+
}, z.core.$strip>>;
|
|
880
1010
|
}, z.core.$strip>;
|
|
881
1011
|
caption: z.ZodOptional<z.ZodString>;
|
|
882
1012
|
}, z.core.$strip>>;
|
|
@@ -894,6 +1024,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
894
1024
|
alt: z.ZodDefault<z.ZodString>;
|
|
895
1025
|
width: z.ZodOptional<z.ZodNumber>;
|
|
896
1026
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1027
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1028
|
+
x: z.ZodNumber;
|
|
1029
|
+
y: z.ZodNumber;
|
|
1030
|
+
}, z.core.$strip>>;
|
|
897
1031
|
}, z.core.$strip>>;
|
|
898
1032
|
tone: z.ZodDefault<z.ZodEnum<{
|
|
899
1033
|
default: "default";
|
|
@@ -928,6 +1062,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
928
1062
|
alt: z.ZodDefault<z.ZodString>;
|
|
929
1063
|
width: z.ZodOptional<z.ZodNumber>;
|
|
930
1064
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1065
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1066
|
+
x: z.ZodNumber;
|
|
1067
|
+
y: z.ZodNumber;
|
|
1068
|
+
}, z.core.$strip>>;
|
|
931
1069
|
}, z.core.$strip>>;
|
|
932
1070
|
bio: z.ZodOptional<z.ZodString>;
|
|
933
1071
|
}, z.core.$strip>>;
|
|
@@ -941,6 +1079,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
941
1079
|
alt: z.ZodDefault<z.ZodString>;
|
|
942
1080
|
width: z.ZodOptional<z.ZodNumber>;
|
|
943
1081
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1082
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1083
|
+
x: z.ZodNumber;
|
|
1084
|
+
y: z.ZodNumber;
|
|
1085
|
+
}, z.core.$strip>>;
|
|
944
1086
|
}, z.core.$strip>>;
|
|
945
1087
|
url: z.ZodOptional<z.ZodString>;
|
|
946
1088
|
}, z.core.$strip>>;
|
|
@@ -986,6 +1128,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
986
1128
|
eventSlug: z.ZodOptional<z.ZodString>;
|
|
987
1129
|
categoryId: z.ZodOptional<z.ZodString>;
|
|
988
1130
|
heading: z.ZodOptional<z.ZodString>;
|
|
1131
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1132
|
+
eventSlug: z.ZodOptional<z.ZodString>;
|
|
1133
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
1134
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
989
1135
|
}, z.core.$strip> | z.ZodObject<{
|
|
990
1136
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
991
1137
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -1026,7 +1172,7 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1026
1172
|
}, z.core.$strip>;
|
|
1027
1173
|
}, z.core.$strip>, ...z.ZodObject<{
|
|
1028
1174
|
id: z.ZodString;
|
|
1029
|
-
type: z.ZodLiteral<"custom" | "cta" | "quote" | "people" | "logos" | "hero" | "richText" | "mediaText" | "stats" | "cardGrid" | "faq" | "pricing" | "projects" | "location" | "schedule" | "gallery" | "video" | "embed" | "form" | "upcomingEvents" | "pastEvents" | "eventSpotlight" | "collectionList" | "sharedBlock" | "fundraiserSpotlight" | "fundraiserGrid" | "donate">;
|
|
1175
|
+
type: z.ZodLiteral<"custom" | "cta" | "quote" | "people" | "logos" | "hero" | "richText" | "mediaText" | "stats" | "cardGrid" | "faq" | "pricing" | "projects" | "location" | "locations" | "schedule" | "gallery" | "video" | "embed" | "form" | "upcomingEvents" | "pastEvents" | "eventSpotlight" | "volunteerSignup" | "collectionList" | "sharedBlock" | "fundraiserSpotlight" | "fundraiserGrid" | "donate">;
|
|
1030
1176
|
data: z.ZodObject<{
|
|
1031
1177
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1032
1178
|
heading: z.ZodString;
|
|
@@ -1036,6 +1182,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1036
1182
|
alt: z.ZodDefault<z.ZodString>;
|
|
1037
1183
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1038
1184
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1185
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1186
|
+
x: z.ZodNumber;
|
|
1187
|
+
y: z.ZodNumber;
|
|
1188
|
+
}, z.core.$strip>>;
|
|
1039
1189
|
}, z.core.$strip>>;
|
|
1040
1190
|
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
1041
1191
|
label: z.ZodString;
|
|
@@ -1065,6 +1215,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1065
1215
|
alt: z.ZodDefault<z.ZodString>;
|
|
1066
1216
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1067
1217
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1218
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1219
|
+
x: z.ZodNumber;
|
|
1220
|
+
y: z.ZodNumber;
|
|
1221
|
+
}, z.core.$strip>>;
|
|
1068
1222
|
}, z.core.$strip>>;
|
|
1069
1223
|
imagePosition: z.ZodDefault<z.ZodEnum<{
|
|
1070
1224
|
left: "left";
|
|
@@ -1096,6 +1250,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1096
1250
|
alt: z.ZodDefault<z.ZodString>;
|
|
1097
1251
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1098
1252
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1253
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1254
|
+
x: z.ZodNumber;
|
|
1255
|
+
y: z.ZodNumber;
|
|
1256
|
+
}, z.core.$strip>>;
|
|
1099
1257
|
}, z.core.$strip>>;
|
|
1100
1258
|
link: z.ZodOptional<z.ZodObject<{
|
|
1101
1259
|
label: z.ZodString;
|
|
@@ -1130,6 +1288,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1130
1288
|
alt: z.ZodDefault<z.ZodString>;
|
|
1131
1289
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1132
1290
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1291
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1292
|
+
x: z.ZodNumber;
|
|
1293
|
+
y: z.ZodNumber;
|
|
1294
|
+
}, z.core.$strip>>;
|
|
1133
1295
|
}, z.core.$strip>>;
|
|
1134
1296
|
}, z.core.$strip> | z.ZodObject<{
|
|
1135
1297
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -1172,6 +1334,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1172
1334
|
alt: z.ZodDefault<z.ZodString>;
|
|
1173
1335
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1174
1336
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1337
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1338
|
+
x: z.ZodNumber;
|
|
1339
|
+
y: z.ZodNumber;
|
|
1340
|
+
}, z.core.$strip>>;
|
|
1175
1341
|
}, z.core.$strip>>;
|
|
1176
1342
|
url: z.ZodOptional<z.ZodString>;
|
|
1177
1343
|
role: z.ZodOptional<z.ZodString>;
|
|
@@ -1196,6 +1362,29 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1196
1362
|
hours: z.ZodOptional<z.ZodString>;
|
|
1197
1363
|
notes: z.ZodOptional<z.ZodString>;
|
|
1198
1364
|
showMap: z.ZodDefault<z.ZodBoolean>;
|
|
1365
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
1366
|
+
lat: z.ZodNumber;
|
|
1367
|
+
lng: z.ZodNumber;
|
|
1368
|
+
}, z.core.$strip>>;
|
|
1369
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1370
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1371
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
1372
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
1373
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1374
|
+
name: z.ZodString;
|
|
1375
|
+
address: z.ZodString;
|
|
1376
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
1377
|
+
lat: z.ZodNumber;
|
|
1378
|
+
lng: z.ZodNumber;
|
|
1379
|
+
}, z.core.$strip>>;
|
|
1380
|
+
hours: z.ZodOptional<z.ZodString>;
|
|
1381
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
1382
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
1383
|
+
label: z.ZodString;
|
|
1384
|
+
href: z.ZodString;
|
|
1385
|
+
}, z.core.$strip>>;
|
|
1386
|
+
}, z.core.$strip>>;
|
|
1387
|
+
showMap: z.ZodDefault<z.ZodBoolean>;
|
|
1199
1388
|
}, z.core.$strip> | z.ZodObject<{
|
|
1200
1389
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1201
1390
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -1214,6 +1403,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1214
1403
|
alt: z.ZodDefault<z.ZodString>;
|
|
1215
1404
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1216
1405
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1406
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1407
|
+
x: z.ZodNumber;
|
|
1408
|
+
y: z.ZodNumber;
|
|
1409
|
+
}, z.core.$strip>>;
|
|
1217
1410
|
}, z.core.$strip>;
|
|
1218
1411
|
caption: z.ZodOptional<z.ZodString>;
|
|
1219
1412
|
}, z.core.$strip>>;
|
|
@@ -1231,6 +1424,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1231
1424
|
alt: z.ZodDefault<z.ZodString>;
|
|
1232
1425
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1233
1426
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1427
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1428
|
+
x: z.ZodNumber;
|
|
1429
|
+
y: z.ZodNumber;
|
|
1430
|
+
}, z.core.$strip>>;
|
|
1234
1431
|
}, z.core.$strip>>;
|
|
1235
1432
|
tone: z.ZodDefault<z.ZodEnum<{
|
|
1236
1433
|
default: "default";
|
|
@@ -1265,6 +1462,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1265
1462
|
alt: z.ZodDefault<z.ZodString>;
|
|
1266
1463
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1267
1464
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1465
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1466
|
+
x: z.ZodNumber;
|
|
1467
|
+
y: z.ZodNumber;
|
|
1468
|
+
}, z.core.$strip>>;
|
|
1268
1469
|
}, z.core.$strip>>;
|
|
1269
1470
|
bio: z.ZodOptional<z.ZodString>;
|
|
1270
1471
|
}, z.core.$strip>>;
|
|
@@ -1278,6 +1479,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1278
1479
|
alt: z.ZodDefault<z.ZodString>;
|
|
1279
1480
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1280
1481
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1482
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1483
|
+
x: z.ZodNumber;
|
|
1484
|
+
y: z.ZodNumber;
|
|
1485
|
+
}, z.core.$strip>>;
|
|
1281
1486
|
}, z.core.$strip>>;
|
|
1282
1487
|
url: z.ZodOptional<z.ZodString>;
|
|
1283
1488
|
}, z.core.$strip>>;
|
|
@@ -1323,6 +1528,10 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1323
1528
|
eventSlug: z.ZodOptional<z.ZodString>;
|
|
1324
1529
|
categoryId: z.ZodOptional<z.ZodString>;
|
|
1325
1530
|
heading: z.ZodOptional<z.ZodString>;
|
|
1531
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1532
|
+
eventSlug: z.ZodOptional<z.ZodString>;
|
|
1533
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
1534
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
1326
1535
|
}, z.core.$strip> | z.ZodObject<{
|
|
1327
1536
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1328
1537
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -1371,6 +1580,7 @@ type Block = {
|
|
|
1371
1580
|
}[BlockType];
|
|
1372
1581
|
type ImageRef = z.infer<typeof image>;
|
|
1373
1582
|
type LinkRef = z.infer<typeof link>;
|
|
1583
|
+
type Position = z.infer<typeof position>;
|
|
1374
1584
|
type FormField = z.infer<typeof formFieldSchema>;
|
|
1375
1585
|
/**
|
|
1376
1586
|
* Search & sharing for a page, event or fundraiser: search title and description, share image, hiding it from search
|
|
@@ -1384,6 +1594,10 @@ declare const seoSchema: z.ZodObject<{
|
|
|
1384
1594
|
alt: z.ZodDefault<z.ZodString>;
|
|
1385
1595
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1386
1596
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1597
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1598
|
+
x: z.ZodNumber;
|
|
1599
|
+
y: z.ZodNumber;
|
|
1600
|
+
}, z.core.$strip>>;
|
|
1387
1601
|
}, z.core.$strip>>;
|
|
1388
1602
|
noIndex: z.ZodOptional<z.ZodBoolean>;
|
|
1389
1603
|
canonical: z.ZodOptional<z.ZodString>;
|
|
@@ -1400,13 +1614,17 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1400
1614
|
alt: z.ZodDefault<z.ZodString>;
|
|
1401
1615
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1402
1616
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1617
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1618
|
+
x: z.ZodNumber;
|
|
1619
|
+
y: z.ZodNumber;
|
|
1620
|
+
}, z.core.$strip>>;
|
|
1403
1621
|
}, z.core.$strip>>;
|
|
1404
1622
|
noIndex: z.ZodOptional<z.ZodBoolean>;
|
|
1405
1623
|
canonical: z.ZodOptional<z.ZodString>;
|
|
1406
1624
|
}, z.core.$strip>>;
|
|
1407
1625
|
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1408
1626
|
id: z.ZodString;
|
|
1409
|
-
type: z.ZodLiteral<"custom" | "cta" | "quote" | "people" | "logos" | "hero" | "richText" | "mediaText" | "stats" | "cardGrid" | "faq" | "pricing" | "projects" | "location" | "schedule" | "gallery" | "video" | "embed" | "form" | "upcomingEvents" | "pastEvents" | "eventSpotlight" | "collectionList" | "sharedBlock" | "fundraiserSpotlight" | "fundraiserGrid" | "donate">;
|
|
1627
|
+
type: z.ZodLiteral<"custom" | "cta" | "quote" | "people" | "logos" | "hero" | "richText" | "mediaText" | "stats" | "cardGrid" | "faq" | "pricing" | "projects" | "location" | "locations" | "schedule" | "gallery" | "video" | "embed" | "form" | "upcomingEvents" | "pastEvents" | "eventSpotlight" | "volunteerSignup" | "collectionList" | "sharedBlock" | "fundraiserSpotlight" | "fundraiserGrid" | "donate">;
|
|
1410
1628
|
data: z.ZodObject<{
|
|
1411
1629
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1412
1630
|
heading: z.ZodString;
|
|
@@ -1416,6 +1634,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1416
1634
|
alt: z.ZodDefault<z.ZodString>;
|
|
1417
1635
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1418
1636
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1637
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1638
|
+
x: z.ZodNumber;
|
|
1639
|
+
y: z.ZodNumber;
|
|
1640
|
+
}, z.core.$strip>>;
|
|
1419
1641
|
}, z.core.$strip>>;
|
|
1420
1642
|
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
1421
1643
|
label: z.ZodString;
|
|
@@ -1445,6 +1667,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1445
1667
|
alt: z.ZodDefault<z.ZodString>;
|
|
1446
1668
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1447
1669
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1670
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1671
|
+
x: z.ZodNumber;
|
|
1672
|
+
y: z.ZodNumber;
|
|
1673
|
+
}, z.core.$strip>>;
|
|
1448
1674
|
}, z.core.$strip>>;
|
|
1449
1675
|
imagePosition: z.ZodDefault<z.ZodEnum<{
|
|
1450
1676
|
left: "left";
|
|
@@ -1476,6 +1702,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1476
1702
|
alt: z.ZodDefault<z.ZodString>;
|
|
1477
1703
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1478
1704
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1705
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1706
|
+
x: z.ZodNumber;
|
|
1707
|
+
y: z.ZodNumber;
|
|
1708
|
+
}, z.core.$strip>>;
|
|
1479
1709
|
}, z.core.$strip>>;
|
|
1480
1710
|
link: z.ZodOptional<z.ZodObject<{
|
|
1481
1711
|
label: z.ZodString;
|
|
@@ -1510,6 +1740,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1510
1740
|
alt: z.ZodDefault<z.ZodString>;
|
|
1511
1741
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1512
1742
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1743
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1744
|
+
x: z.ZodNumber;
|
|
1745
|
+
y: z.ZodNumber;
|
|
1746
|
+
}, z.core.$strip>>;
|
|
1513
1747
|
}, z.core.$strip>>;
|
|
1514
1748
|
}, z.core.$strip> | z.ZodObject<{
|
|
1515
1749
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -1552,6 +1786,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1552
1786
|
alt: z.ZodDefault<z.ZodString>;
|
|
1553
1787
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1554
1788
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1789
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1790
|
+
x: z.ZodNumber;
|
|
1791
|
+
y: z.ZodNumber;
|
|
1792
|
+
}, z.core.$strip>>;
|
|
1555
1793
|
}, z.core.$strip>>;
|
|
1556
1794
|
url: z.ZodOptional<z.ZodString>;
|
|
1557
1795
|
role: z.ZodOptional<z.ZodString>;
|
|
@@ -1576,6 +1814,29 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1576
1814
|
hours: z.ZodOptional<z.ZodString>;
|
|
1577
1815
|
notes: z.ZodOptional<z.ZodString>;
|
|
1578
1816
|
showMap: z.ZodDefault<z.ZodBoolean>;
|
|
1817
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
1818
|
+
lat: z.ZodNumber;
|
|
1819
|
+
lng: z.ZodNumber;
|
|
1820
|
+
}, z.core.$strip>>;
|
|
1821
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1822
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1823
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
1824
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
1825
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1826
|
+
name: z.ZodString;
|
|
1827
|
+
address: z.ZodString;
|
|
1828
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
1829
|
+
lat: z.ZodNumber;
|
|
1830
|
+
lng: z.ZodNumber;
|
|
1831
|
+
}, z.core.$strip>>;
|
|
1832
|
+
hours: z.ZodOptional<z.ZodString>;
|
|
1833
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
1834
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
1835
|
+
label: z.ZodString;
|
|
1836
|
+
href: z.ZodString;
|
|
1837
|
+
}, z.core.$strip>>;
|
|
1838
|
+
}, z.core.$strip>>;
|
|
1839
|
+
showMap: z.ZodDefault<z.ZodBoolean>;
|
|
1579
1840
|
}, z.core.$strip> | z.ZodObject<{
|
|
1580
1841
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1581
1842
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -1594,6 +1855,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1594
1855
|
alt: z.ZodDefault<z.ZodString>;
|
|
1595
1856
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1596
1857
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1858
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1859
|
+
x: z.ZodNumber;
|
|
1860
|
+
y: z.ZodNumber;
|
|
1861
|
+
}, z.core.$strip>>;
|
|
1597
1862
|
}, z.core.$strip>;
|
|
1598
1863
|
caption: z.ZodOptional<z.ZodString>;
|
|
1599
1864
|
}, z.core.$strip>>;
|
|
@@ -1611,6 +1876,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1611
1876
|
alt: z.ZodDefault<z.ZodString>;
|
|
1612
1877
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1613
1878
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1879
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1880
|
+
x: z.ZodNumber;
|
|
1881
|
+
y: z.ZodNumber;
|
|
1882
|
+
}, z.core.$strip>>;
|
|
1614
1883
|
}, z.core.$strip>>;
|
|
1615
1884
|
tone: z.ZodDefault<z.ZodEnum<{
|
|
1616
1885
|
default: "default";
|
|
@@ -1645,6 +1914,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1645
1914
|
alt: z.ZodDefault<z.ZodString>;
|
|
1646
1915
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1647
1916
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1917
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1918
|
+
x: z.ZodNumber;
|
|
1919
|
+
y: z.ZodNumber;
|
|
1920
|
+
}, z.core.$strip>>;
|
|
1648
1921
|
}, z.core.$strip>>;
|
|
1649
1922
|
bio: z.ZodOptional<z.ZodString>;
|
|
1650
1923
|
}, z.core.$strip>>;
|
|
@@ -1658,6 +1931,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1658
1931
|
alt: z.ZodDefault<z.ZodString>;
|
|
1659
1932
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1660
1933
|
height: z.ZodOptional<z.ZodNumber>;
|
|
1934
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
1935
|
+
x: z.ZodNumber;
|
|
1936
|
+
y: z.ZodNumber;
|
|
1937
|
+
}, z.core.$strip>>;
|
|
1661
1938
|
}, z.core.$strip>>;
|
|
1662
1939
|
url: z.ZodOptional<z.ZodString>;
|
|
1663
1940
|
}, z.core.$strip>>;
|
|
@@ -1703,6 +1980,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1703
1980
|
eventSlug: z.ZodOptional<z.ZodString>;
|
|
1704
1981
|
categoryId: z.ZodOptional<z.ZodString>;
|
|
1705
1982
|
heading: z.ZodOptional<z.ZodString>;
|
|
1983
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
1984
|
+
eventSlug: z.ZodOptional<z.ZodString>;
|
|
1985
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
1986
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
1706
1987
|
}, z.core.$strip> | z.ZodObject<{
|
|
1707
1988
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1708
1989
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -1743,7 +2024,7 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1743
2024
|
}, z.core.$strip>;
|
|
1744
2025
|
}, z.core.$strip>, ...z.ZodObject<{
|
|
1745
2026
|
id: z.ZodString;
|
|
1746
|
-
type: z.ZodLiteral<"custom" | "cta" | "quote" | "people" | "logos" | "hero" | "richText" | "mediaText" | "stats" | "cardGrid" | "faq" | "pricing" | "projects" | "location" | "schedule" | "gallery" | "video" | "embed" | "form" | "upcomingEvents" | "pastEvents" | "eventSpotlight" | "collectionList" | "sharedBlock" | "fundraiserSpotlight" | "fundraiserGrid" | "donate">;
|
|
2027
|
+
type: z.ZodLiteral<"custom" | "cta" | "quote" | "people" | "logos" | "hero" | "richText" | "mediaText" | "stats" | "cardGrid" | "faq" | "pricing" | "projects" | "location" | "locations" | "schedule" | "gallery" | "video" | "embed" | "form" | "upcomingEvents" | "pastEvents" | "eventSpotlight" | "volunteerSignup" | "collectionList" | "sharedBlock" | "fundraiserSpotlight" | "fundraiserGrid" | "donate">;
|
|
1747
2028
|
data: z.ZodObject<{
|
|
1748
2029
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1749
2030
|
heading: z.ZodString;
|
|
@@ -1753,6 +2034,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1753
2034
|
alt: z.ZodDefault<z.ZodString>;
|
|
1754
2035
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1755
2036
|
height: z.ZodOptional<z.ZodNumber>;
|
|
2037
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
2038
|
+
x: z.ZodNumber;
|
|
2039
|
+
y: z.ZodNumber;
|
|
2040
|
+
}, z.core.$strip>>;
|
|
1756
2041
|
}, z.core.$strip>>;
|
|
1757
2042
|
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
1758
2043
|
label: z.ZodString;
|
|
@@ -1782,6 +2067,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1782
2067
|
alt: z.ZodDefault<z.ZodString>;
|
|
1783
2068
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1784
2069
|
height: z.ZodOptional<z.ZodNumber>;
|
|
2070
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
2071
|
+
x: z.ZodNumber;
|
|
2072
|
+
y: z.ZodNumber;
|
|
2073
|
+
}, z.core.$strip>>;
|
|
1785
2074
|
}, z.core.$strip>>;
|
|
1786
2075
|
imagePosition: z.ZodDefault<z.ZodEnum<{
|
|
1787
2076
|
left: "left";
|
|
@@ -1813,6 +2102,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1813
2102
|
alt: z.ZodDefault<z.ZodString>;
|
|
1814
2103
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1815
2104
|
height: z.ZodOptional<z.ZodNumber>;
|
|
2105
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
2106
|
+
x: z.ZodNumber;
|
|
2107
|
+
y: z.ZodNumber;
|
|
2108
|
+
}, z.core.$strip>>;
|
|
1816
2109
|
}, z.core.$strip>>;
|
|
1817
2110
|
link: z.ZodOptional<z.ZodObject<{
|
|
1818
2111
|
label: z.ZodString;
|
|
@@ -1847,6 +2140,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1847
2140
|
alt: z.ZodDefault<z.ZodString>;
|
|
1848
2141
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1849
2142
|
height: z.ZodOptional<z.ZodNumber>;
|
|
2143
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
2144
|
+
x: z.ZodNumber;
|
|
2145
|
+
y: z.ZodNumber;
|
|
2146
|
+
}, z.core.$strip>>;
|
|
1850
2147
|
}, z.core.$strip>>;
|
|
1851
2148
|
}, z.core.$strip> | z.ZodObject<{
|
|
1852
2149
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -1889,6 +2186,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1889
2186
|
alt: z.ZodDefault<z.ZodString>;
|
|
1890
2187
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1891
2188
|
height: z.ZodOptional<z.ZodNumber>;
|
|
2189
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
2190
|
+
x: z.ZodNumber;
|
|
2191
|
+
y: z.ZodNumber;
|
|
2192
|
+
}, z.core.$strip>>;
|
|
1892
2193
|
}, z.core.$strip>>;
|
|
1893
2194
|
url: z.ZodOptional<z.ZodString>;
|
|
1894
2195
|
role: z.ZodOptional<z.ZodString>;
|
|
@@ -1913,6 +2214,29 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1913
2214
|
hours: z.ZodOptional<z.ZodString>;
|
|
1914
2215
|
notes: z.ZodOptional<z.ZodString>;
|
|
1915
2216
|
showMap: z.ZodDefault<z.ZodBoolean>;
|
|
2217
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
2218
|
+
lat: z.ZodNumber;
|
|
2219
|
+
lng: z.ZodNumber;
|
|
2220
|
+
}, z.core.$strip>>;
|
|
2221
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
2222
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
2223
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
2224
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
2225
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2226
|
+
name: z.ZodString;
|
|
2227
|
+
address: z.ZodString;
|
|
2228
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
2229
|
+
lat: z.ZodNumber;
|
|
2230
|
+
lng: z.ZodNumber;
|
|
2231
|
+
}, z.core.$strip>>;
|
|
2232
|
+
hours: z.ZodOptional<z.ZodString>;
|
|
2233
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
2234
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
2235
|
+
label: z.ZodString;
|
|
2236
|
+
href: z.ZodString;
|
|
2237
|
+
}, z.core.$strip>>;
|
|
2238
|
+
}, z.core.$strip>>;
|
|
2239
|
+
showMap: z.ZodDefault<z.ZodBoolean>;
|
|
1916
2240
|
}, z.core.$strip> | z.ZodObject<{
|
|
1917
2241
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1918
2242
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -1931,6 +2255,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1931
2255
|
alt: z.ZodDefault<z.ZodString>;
|
|
1932
2256
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1933
2257
|
height: z.ZodOptional<z.ZodNumber>;
|
|
2258
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
2259
|
+
x: z.ZodNumber;
|
|
2260
|
+
y: z.ZodNumber;
|
|
2261
|
+
}, z.core.$strip>>;
|
|
1934
2262
|
}, z.core.$strip>;
|
|
1935
2263
|
caption: z.ZodOptional<z.ZodString>;
|
|
1936
2264
|
}, z.core.$strip>>;
|
|
@@ -1948,6 +2276,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1948
2276
|
alt: z.ZodDefault<z.ZodString>;
|
|
1949
2277
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1950
2278
|
height: z.ZodOptional<z.ZodNumber>;
|
|
2279
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
2280
|
+
x: z.ZodNumber;
|
|
2281
|
+
y: z.ZodNumber;
|
|
2282
|
+
}, z.core.$strip>>;
|
|
1951
2283
|
}, z.core.$strip>>;
|
|
1952
2284
|
tone: z.ZodDefault<z.ZodEnum<{
|
|
1953
2285
|
default: "default";
|
|
@@ -1982,6 +2314,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1982
2314
|
alt: z.ZodDefault<z.ZodString>;
|
|
1983
2315
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1984
2316
|
height: z.ZodOptional<z.ZodNumber>;
|
|
2317
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
2318
|
+
x: z.ZodNumber;
|
|
2319
|
+
y: z.ZodNumber;
|
|
2320
|
+
}, z.core.$strip>>;
|
|
1985
2321
|
}, z.core.$strip>>;
|
|
1986
2322
|
bio: z.ZodOptional<z.ZodString>;
|
|
1987
2323
|
}, z.core.$strip>>;
|
|
@@ -1995,6 +2331,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1995
2331
|
alt: z.ZodDefault<z.ZodString>;
|
|
1996
2332
|
width: z.ZodOptional<z.ZodNumber>;
|
|
1997
2333
|
height: z.ZodOptional<z.ZodNumber>;
|
|
2334
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
2335
|
+
x: z.ZodNumber;
|
|
2336
|
+
y: z.ZodNumber;
|
|
2337
|
+
}, z.core.$strip>>;
|
|
1998
2338
|
}, z.core.$strip>>;
|
|
1999
2339
|
url: z.ZodOptional<z.ZodString>;
|
|
2000
2340
|
}, z.core.$strip>>;
|
|
@@ -2040,6 +2380,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
2040
2380
|
eventSlug: z.ZodOptional<z.ZodString>;
|
|
2041
2381
|
categoryId: z.ZodOptional<z.ZodString>;
|
|
2042
2382
|
heading: z.ZodOptional<z.ZodString>;
|
|
2383
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
2384
|
+
eventSlug: z.ZodOptional<z.ZodString>;
|
|
2385
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
2386
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
2043
2387
|
}, z.core.$strip> | z.ZodObject<{
|
|
2044
2388
|
eyebrow: z.ZodOptional<z.ZodString>;
|
|
2045
2389
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -2088,6 +2432,10 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
2088
2432
|
alt: z.ZodDefault<z.ZodString>;
|
|
2089
2433
|
width: z.ZodOptional<z.ZodNumber>;
|
|
2090
2434
|
height: z.ZodOptional<z.ZodNumber>;
|
|
2435
|
+
focal: z.ZodOptional<z.ZodObject<{
|
|
2436
|
+
x: z.ZodNumber;
|
|
2437
|
+
y: z.ZodNumber;
|
|
2438
|
+
}, z.core.$strip>>;
|
|
2091
2439
|
}, z.core.$strip>>;
|
|
2092
2440
|
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2093
2441
|
}, z.core.$strip>>;
|
|
@@ -2145,6 +2493,43 @@ declare const EMBED_ALLOW = "autoplay; encrypted-media; fullscreen; picture-in-p
|
|
|
2145
2493
|
/** The document an Embed block's iframe shows: the pasted HTML on a blank, borderless page. */
|
|
2146
2494
|
declare function embedDocument(html: string): string;
|
|
2147
2495
|
|
|
2496
|
+
/** An image's focal point and size, as the API sends them. */
|
|
2497
|
+
type FocalImage = {
|
|
2498
|
+
width?: number;
|
|
2499
|
+
height?: number;
|
|
2500
|
+
focal?: {
|
|
2501
|
+
x: number;
|
|
2502
|
+
y: number;
|
|
2503
|
+
};
|
|
2504
|
+
} | null | undefined;
|
|
2505
|
+
/**
|
|
2506
|
+
* The CSS `object-position` that keeps an image's focal point in view when it's cropped with `object-fit: cover`,
|
|
2507
|
+
* or undefined when it has none (the browser's default, the centre).
|
|
2508
|
+
*
|
|
2509
|
+
* Give the frame's aspect ratio (width / height, e.g. 4 / 3) when it's fixed: the focal point is then centred in the
|
|
2510
|
+
* frame as far as the crop allows, sliding toward an edge only when centring it would show past the image. Without
|
|
2511
|
+
* it (a frame whose shape changes, like a full-bleed hero), the point is used as percentages, which keeps it in view
|
|
2512
|
+
* at any size without exactly centring it.
|
|
2513
|
+
*
|
|
2514
|
+
* <img src={image.src} alt={image.alt} style={{ objectPosition: focalPosition(image, 4 / 3) }} className="aspect-[4/3] object-cover" />
|
|
2515
|
+
*/
|
|
2516
|
+
declare function focalPosition(image: FocalImage, frameRatio?: number): string | undefined;
|
|
2517
|
+
|
|
2518
|
+
/**
|
|
2519
|
+
* A link that opens directions to a place in the visitor's maps app (Google Maps, which phones hand to their own maps
|
|
2520
|
+
* app). By name and address, so the destination reads as the place rather than a coordinate.
|
|
2521
|
+
*/
|
|
2522
|
+
declare function directionsUrl(place: {
|
|
2523
|
+
name?: string;
|
|
2524
|
+
address: string;
|
|
2525
|
+
}): string;
|
|
2526
|
+
/** Places that have a map pin, for drawing a map (places without one are listed but left off it). */
|
|
2527
|
+
declare function pinned<T extends {
|
|
2528
|
+
position?: Position;
|
|
2529
|
+
}>(places: T[]): (T & {
|
|
2530
|
+
position: Position;
|
|
2531
|
+
})[];
|
|
2532
|
+
|
|
2148
2533
|
declare const ORGANIZATION_TYPES: readonly ["Organization", "LocalBusiness", "NGO", "Corporation", "EducationalOrganization", "GovernmentOrganization", "MedicalOrganization", "SportsOrganization"];
|
|
2149
2534
|
/** Languages a site can be in (Open Graph locale; the page's lang attribute is the part before the underscore). */
|
|
2150
2535
|
declare const SITE_LOCALES: readonly ["en_US", "en_GB", "en_CA", "en_AU", "es_US", "es_ES", "es_MX", "fr_CA", "fr_FR", "de_DE", "pt_BR"];
|
|
@@ -2170,10 +2555,10 @@ declare const siteSettingsSchema: z.ZodObject<{
|
|
|
2170
2555
|
tagline: z.ZodOptional<z.ZodString>;
|
|
2171
2556
|
social: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2172
2557
|
platform: z.ZodEnum<{
|
|
2558
|
+
x: "x";
|
|
2173
2559
|
facebook: "facebook";
|
|
2174
2560
|
instagram: "instagram";
|
|
2175
2561
|
linkedin: "linkedin";
|
|
2176
|
-
x: "x";
|
|
2177
2562
|
youtube: "youtube";
|
|
2178
2563
|
tiktok: "tiktok";
|
|
2179
2564
|
other: "other";
|
|
@@ -2280,6 +2665,60 @@ type TicketType = z.infer<typeof ticketTypeSchema>;
|
|
|
2280
2665
|
/** Stored ticket types, dropping anything that doesn't parse (never throws). */
|
|
2281
2666
|
declare function parseTicketTypes(input: unknown): TicketType[];
|
|
2282
2667
|
|
|
2668
|
+
/** Keys the sign-up itself uses, so the event's own questions can't take them. */
|
|
2669
|
+
declare const VOLUNTEER_RESERVED_KEYS: readonly ["name", "email", "shift", "shifts", "answers"];
|
|
2670
|
+
/** A day and time volunteers can sign up for, e.g. "Setup crew · Sat 8–11am · 6 needed". */
|
|
2671
|
+
declare const volunteerShiftSchema: z.ZodObject<{
|
|
2672
|
+
id: z.ZodString;
|
|
2673
|
+
name: z.ZodString;
|
|
2674
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2675
|
+
startsAt: z.ZodISODateTime;
|
|
2676
|
+
endsAt: z.ZodISODateTime;
|
|
2677
|
+
spots: z.ZodOptional<z.ZodNumber>;
|
|
2678
|
+
active: z.ZodDefault<z.ZodBoolean>;
|
|
2679
|
+
}, z.core.$strip>;
|
|
2680
|
+
declare const volunteerShiftsSchema: z.ZodArray<z.ZodObject<{
|
|
2681
|
+
id: z.ZodString;
|
|
2682
|
+
name: z.ZodString;
|
|
2683
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2684
|
+
startsAt: z.ZodISODateTime;
|
|
2685
|
+
endsAt: z.ZodISODateTime;
|
|
2686
|
+
spots: z.ZodOptional<z.ZodNumber>;
|
|
2687
|
+
active: z.ZodDefault<z.ZodBoolean>;
|
|
2688
|
+
}, z.core.$strip>>;
|
|
2689
|
+
/** The event's volunteer form: an intro, its own questions, whether to pick shifts, and the wording around it. */
|
|
2690
|
+
declare const volunteerFormSchema: z.ZodObject<{
|
|
2691
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
2692
|
+
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2693
|
+
name: z.ZodString;
|
|
2694
|
+
label: z.ZodString;
|
|
2695
|
+
type: z.ZodEnum<{
|
|
2696
|
+
text: "text";
|
|
2697
|
+
email: "email";
|
|
2698
|
+
tel: "tel";
|
|
2699
|
+
textarea: "textarea";
|
|
2700
|
+
select: "select";
|
|
2701
|
+
checkbox: "checkbox";
|
|
2702
|
+
}>;
|
|
2703
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
2704
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2705
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
2706
|
+
}, z.core.$strip>>>;
|
|
2707
|
+
shiftsEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
2708
|
+
shiftChoice: z.ZodDefault<z.ZodEnum<{
|
|
2709
|
+
one: "one";
|
|
2710
|
+
many: "many";
|
|
2711
|
+
}>>;
|
|
2712
|
+
submitLabel: z.ZodDefault<z.ZodString>;
|
|
2713
|
+
successMessage: z.ZodDefault<z.ZodString>;
|
|
2714
|
+
}, z.core.$strip>;
|
|
2715
|
+
type VolunteerShift = z.infer<typeof volunteerShiftSchema>;
|
|
2716
|
+
type VolunteerForm = z.infer<typeof volunteerFormSchema>;
|
|
2717
|
+
/** Stored shifts, dropping anything that doesn't parse (never throws). */
|
|
2718
|
+
declare function parseVolunteerShifts(input: unknown): VolunteerShift[];
|
|
2719
|
+
/** A stored volunteer form, with defaults for anything missing (never throws). */
|
|
2720
|
+
declare function parseVolunteerForm(input: unknown): VolunteerForm;
|
|
2721
|
+
|
|
2283
2722
|
/** Resolved search and sharing data for a page or event. */
|
|
2284
2723
|
type PageMeta = {
|
|
2285
2724
|
/** The page's own title. */
|
|
@@ -2338,10 +2777,7 @@ type HearthEvent = {
|
|
|
2338
2777
|
/** How people attend: at the place, online, or either. */
|
|
2339
2778
|
attendance: "in_person" | "online" | "mixed";
|
|
2340
2779
|
registrationUrl: string | null;
|
|
2341
|
-
image:
|
|
2342
|
-
src: string;
|
|
2343
|
-
alt: string;
|
|
2344
|
-
} | null;
|
|
2780
|
+
image: ImageRef | null;
|
|
2345
2781
|
customFields: EventCustomFields & Record<string, unknown>;
|
|
2346
2782
|
/** Where the event's page lives: /<collection>/<slug> for events in a collection, else /events/<slug>. */
|
|
2347
2783
|
path: string;
|
|
@@ -2350,6 +2786,53 @@ type HearthEvent = {
|
|
|
2350
2786
|
categories: CategoryRef[];
|
|
2351
2787
|
/** On-site registration (sites with Tickets), or null when the event uses `registrationUrl` or none. */
|
|
2352
2788
|
registration: EventRegistration | null;
|
|
2789
|
+
/** Volunteer sign-up, or null when the event isn't asking for volunteers. */
|
|
2790
|
+
volunteering: EventVolunteering | null;
|
|
2791
|
+
};
|
|
2792
|
+
/** A shift volunteers can choose, as the public sees it: active shifts that haven't started, with spots left. */
|
|
2793
|
+
type EventVolunteerShift = {
|
|
2794
|
+
id: string;
|
|
2795
|
+
name: string;
|
|
2796
|
+
description: string | null;
|
|
2797
|
+
startsAt: string;
|
|
2798
|
+
endsAt: string;
|
|
2799
|
+
/** Spots left, or null when there's no limit. */
|
|
2800
|
+
remaining: number | null;
|
|
2801
|
+
full: boolean;
|
|
2802
|
+
};
|
|
2803
|
+
type EventVolunteering = {
|
|
2804
|
+
/** Taking sign-ups now: published, before the closing time, and (with shifts) at least one shift not full. */
|
|
2805
|
+
open: boolean;
|
|
2806
|
+
closesAt: string | null;
|
|
2807
|
+
/** A line or two to show above the form. */
|
|
2808
|
+
intro: string | null;
|
|
2809
|
+
/** The event's own questions, asked after name and email. Post each answer under its `name`. */
|
|
2810
|
+
fields: FormField[];
|
|
2811
|
+
/** none: no shifts to choose; one: exactly one shift; many: at least one. */
|
|
2812
|
+
pickShifts: "none" | "one" | "many";
|
|
2813
|
+
shifts: EventVolunteerShift[];
|
|
2814
|
+
submitLabel: string;
|
|
2815
|
+
successMessage: string;
|
|
2816
|
+
/** The fundraiser this event supports, if any. */
|
|
2817
|
+
fundraiser: {
|
|
2818
|
+
slug: string;
|
|
2819
|
+
title: string;
|
|
2820
|
+
} | null;
|
|
2821
|
+
};
|
|
2822
|
+
/** Sign up to volunteer at an event: POST /events/{slug}/volunteers. */
|
|
2823
|
+
type VolunteerInput = {
|
|
2824
|
+
name: string;
|
|
2825
|
+
email: string;
|
|
2826
|
+
/** Shift ids (when `pickShifts` isn't "none"). */
|
|
2827
|
+
shifts?: string[];
|
|
2828
|
+
/** Answers to the event's own questions, by field name (checkboxes: true/false). */
|
|
2829
|
+
answers?: Record<string, string | boolean>;
|
|
2830
|
+
/** Honeypot: leave empty. Bots fill it, and their sign-ups are dropped. */
|
|
2831
|
+
_gotcha?: string;
|
|
2832
|
+
};
|
|
2833
|
+
type VolunteerResult = {
|
|
2834
|
+
signupId: string;
|
|
2835
|
+
message: string;
|
|
2353
2836
|
};
|
|
2354
2837
|
/** One ticket as the public sees it: active tickets only, with spots left. */
|
|
2355
2838
|
type EventTicket = {
|
|
@@ -2448,10 +2931,7 @@ type CollectionEntry = {
|
|
|
2448
2931
|
/** YYYY-MM-DD; falls back to the date the entry was published. */
|
|
2449
2932
|
date: string | null;
|
|
2450
2933
|
summary: string | null;
|
|
2451
|
-
image:
|
|
2452
|
-
src: string;
|
|
2453
|
-
alt: string;
|
|
2454
|
-
} | null;
|
|
2934
|
+
image: ImageRef | null;
|
|
2455
2935
|
tags: string[];
|
|
2456
2936
|
categories: CategoryRef[];
|
|
2457
2937
|
publishedAt: string | null;
|
|
@@ -2467,10 +2947,7 @@ type Fundraiser = {
|
|
|
2467
2947
|
path: string;
|
|
2468
2948
|
title: string;
|
|
2469
2949
|
summary: string | null;
|
|
2470
|
-
image:
|
|
2471
|
-
src: string;
|
|
2472
|
-
alt: string;
|
|
2473
|
-
} | null;
|
|
2950
|
+
image: ImageRef | null;
|
|
2474
2951
|
status: "active" | "completed";
|
|
2475
2952
|
goalCents: number | null;
|
|
2476
2953
|
/** Offline money plus completed online donations (and ticket sales for linked events). */
|
|
@@ -2516,10 +2993,7 @@ type Resolved<T extends BlockType> = T extends "hero" ? {
|
|
|
2516
2993
|
id: string;
|
|
2517
2994
|
type: T;
|
|
2518
2995
|
data: BlockData<T> & {
|
|
2519
|
-
logo?:
|
|
2520
|
-
src: string;
|
|
2521
|
-
alt: string;
|
|
2522
|
-
} | null;
|
|
2996
|
+
logo?: ImageRef | null;
|
|
2523
2997
|
};
|
|
2524
2998
|
} : T extends "upcomingEvents" | "pastEvents" ? {
|
|
2525
2999
|
id: string;
|
|
@@ -2533,6 +3007,14 @@ type Resolved<T extends BlockType> = T extends "hero" ? {
|
|
|
2533
3007
|
data: BlockData<T> & {
|
|
2534
3008
|
event: HearthEventDetail | null;
|
|
2535
3009
|
};
|
|
3010
|
+
} : T extends "volunteerSignup" ? {
|
|
3011
|
+
id: string;
|
|
3012
|
+
type: T;
|
|
3013
|
+
data: BlockData<T> & {
|
|
3014
|
+
event: HearthEvent & {
|
|
3015
|
+
volunteering: EventVolunteering;
|
|
3016
|
+
};
|
|
3017
|
+
};
|
|
2536
3018
|
} : T extends "collectionList" ? {
|
|
2537
3019
|
id: string;
|
|
2538
3020
|
type: T;
|
|
@@ -2697,4 +3179,4 @@ type ApiErrorBody = {
|
|
|
2697
3179
|
};
|
|
2698
3180
|
};
|
|
2699
3181
|
|
|
2700
|
-
export { type AnalyticsReport, type AnalyticsRow, type ApiErrorBody, BLOCK_SCHEMA_VERSION, type Block, type BlockData, type BlockOf, type BlockType, type CategoryGroup, type CategoryRef, type Collection, type CollectionEntry, type CollectionRef, type CustomBlockDefinition, type CustomField, type CustomFieldKind, type DonationCheckout, type DonationInput, EMBED_ALLOW, EMBED_SANDBOX, type EntryDetails, type EventCustomFields, type EventRegistration, type EventTicket, type FormDefinition, type FormField, type Fundraiser, type FundraiserDetail, type HearthEvent, type HearthEventDetail, type HearthForm, type ImageRef, type KnownBlock, type LinkRef, ORGANIZATION_TYPES, type Page, type PageContent, type PageMeta, type PageSummary, type Redirect, type RegistrationInput, type RegistrationResult, type ResolvedBlock, SITE_LOCALES, SOCIAL_PLATFORMS, type Seo, type Site, type SiteAnalytics, type SiteSettings, type SitemapEntry, type TicketType, type UnknownBlock, type WebhookPayload, blockDataSchemas, blockFeature, blockSchema, blockTypes, customBlockDefinitionSchema, customBlockKey, customFieldSchema, customValuesSchema, embedDocument, formDefinitionSchema, formFieldSchema, pageContentSchema, parseBlocks, parsePageContent, parseSiteSettings, parseTicketTypes, seoSchema, siteSettingsSchema, ticketTypeSchema, ticketTypesSchema, videoEmbedUrl };
|
|
3182
|
+
export { type AnalyticsReport, type AnalyticsRow, type ApiErrorBody, BLOCK_SCHEMA_VERSION, type Block, type BlockData, type BlockOf, type BlockType, type CategoryGroup, type CategoryRef, type Collection, type CollectionEntry, type CollectionRef, type CustomBlockDefinition, type CustomField, type CustomFieldKind, type DonationCheckout, type DonationInput, EMBED_ALLOW, EMBED_SANDBOX, type EntryDetails, type EventCustomFields, type EventRegistration, type EventTicket, type EventVolunteerShift, type EventVolunteering, type FormDefinition, type FormField, type Fundraiser, type FundraiserDetail, type HearthEvent, type HearthEventDetail, type HearthForm, type ImageRef, type KnownBlock, type LinkRef, ORGANIZATION_TYPES, type Page, type PageContent, type PageMeta, type PageSummary, type Position, type Redirect, type RegistrationInput, type RegistrationResult, type ResolvedBlock, SITE_LOCALES, SOCIAL_PLATFORMS, type Seo, type Site, type SiteAnalytics, type SiteSettings, type SitemapEntry, type TicketType, type UnknownBlock, VOLUNTEER_RESERVED_KEYS, type VolunteerForm, type VolunteerInput, type VolunteerResult, type VolunteerShift, type WebhookPayload, blockDataSchemas, blockFeature, blockSchema, blockTypes, customBlockDefinitionSchema, customBlockKey, customFieldSchema, customValuesSchema, directionsUrl, embedDocument, focalPosition, formDefinitionSchema, formFieldSchema, pageContentSchema, parseBlocks, parsePageContent, parseSiteSettings, parseTicketTypes, parseVolunteerForm, parseVolunteerShifts, pinned, seoSchema, siteSettingsSchema, ticketTypeSchema, ticketTypesSchema, videoEmbedUrl, volunteerFormSchema, volunteerShiftSchema, volunteerShiftsSchema };
|
package/dist/index.js
CHANGED
|
@@ -7,13 +7,19 @@ var image = z.object({
|
|
|
7
7
|
alt: z.string().default(""),
|
|
8
8
|
/** The file's size in pixels: filled in by the API from the media library, so frontends can avoid layout shift. */
|
|
9
9
|
width: z.number().int().positive().optional(),
|
|
10
|
-
height: z.number().int().positive().optional()
|
|
10
|
+
height: z.number().int().positive().optional(),
|
|
11
|
+
/**
|
|
12
|
+
* The spot to keep in view when the image is cropped, as percentages across (x) and down (y). Filled in by the API
|
|
13
|
+
* from the media library; none means the centre. `focalPosition()` in the SDK turns it into `object-position`.
|
|
14
|
+
*/
|
|
15
|
+
focal: z.object({ x: z.number().min(0).max(100), y: z.number().min(0).max(100) }).optional()
|
|
11
16
|
});
|
|
12
17
|
var link = z.object({
|
|
13
18
|
label: z.string().min(1),
|
|
14
19
|
/** A path on the site ("/about") or a full URL. */
|
|
15
20
|
href: z.string().min(1)
|
|
16
21
|
});
|
|
22
|
+
var position = z.object({ lat: z.number().min(-90).max(90), lng: z.number().min(-180).max(180) });
|
|
17
23
|
var markdown = z.string().default("");
|
|
18
24
|
var tone = z.enum(["default", "muted", "inverse", "accent"]);
|
|
19
25
|
var formFieldSchema = z.object({
|
|
@@ -220,6 +226,27 @@ var blockDataSchemas = {
|
|
|
220
226
|
/** Free text so editors control the wording: "Mon–Fri · 9am–5pm". */
|
|
221
227
|
hours: z.string().optional(),
|
|
222
228
|
notes: z.string().optional(),
|
|
229
|
+
showMap: z.boolean().default(true),
|
|
230
|
+
/** Where the map's pin goes. Content from before pins has none: frontends then map the address or show no map. */
|
|
231
|
+
position: position.optional()
|
|
232
|
+
}),
|
|
233
|
+
/** Several places on one map, with a list beside it: branches, venues, drop-off points. */
|
|
234
|
+
locations: z.object({
|
|
235
|
+
eyebrow: z.string().optional(),
|
|
236
|
+
heading: z.string().optional(),
|
|
237
|
+
intro: z.string().optional(),
|
|
238
|
+
items: z.array(
|
|
239
|
+
z.object({
|
|
240
|
+
name: z.string().min(1),
|
|
241
|
+
address: z.string().min(1),
|
|
242
|
+
/** Places without a pin are listed but left off the map. */
|
|
243
|
+
position: position.optional(),
|
|
244
|
+
hours: z.string().optional(),
|
|
245
|
+
notes: z.string().optional(),
|
|
246
|
+
/** A page about the place, or its own website. */
|
|
247
|
+
link: link.optional()
|
|
248
|
+
})
|
|
249
|
+
).min(1).max(50),
|
|
223
250
|
showMap: z.boolean().default(true)
|
|
224
251
|
}),
|
|
225
252
|
schedule: z.object({
|
|
@@ -324,6 +351,17 @@ var blockDataSchemas = {
|
|
|
324
351
|
categoryId: z.string().uuid().optional(),
|
|
325
352
|
heading: z.string().optional()
|
|
326
353
|
}),
|
|
354
|
+
/**
|
|
355
|
+
* Volunteer sign-up for one of the site's events: the event's form, shifts and questions, wherever the block sits.
|
|
356
|
+
* On an event's own page, leave `eventSlug` out for that event. The API adds `event` (with its `volunteering`) and
|
|
357
|
+
* leaves the block out when the event isn't found or doesn't ask for volunteers.
|
|
358
|
+
*/
|
|
359
|
+
volunteerSignup: z.object({
|
|
360
|
+
eventSlug: z.string().optional(),
|
|
361
|
+
heading: z.string().optional(),
|
|
362
|
+
/** Shown above the form; omit to use the event's own volunteer intro. */
|
|
363
|
+
intro: z.string().optional()
|
|
364
|
+
}),
|
|
327
365
|
/** Entries of a page collection (a blog, case studies…), newest first unless the collection says otherwise. */
|
|
328
366
|
collectionList: z.object({
|
|
329
367
|
eyebrow: z.string().optional(),
|
|
@@ -381,6 +419,7 @@ var blockFeature = {
|
|
|
381
419
|
upcomingEvents: "events",
|
|
382
420
|
pastEvents: "events",
|
|
383
421
|
eventSpotlight: "events",
|
|
422
|
+
volunteerSignup: "events",
|
|
384
423
|
fundraiserSpotlight: "giving",
|
|
385
424
|
fundraiserGrid: "giving",
|
|
386
425
|
donate: "giving"
|
|
@@ -503,6 +542,28 @@ function embedDocument(html) {
|
|
|
503
542
|
return `<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><base target="_blank"><style>html,body{margin:0;padding:0}body{font-family:system-ui,sans-serif}img,iframe,video{max-width:100%}</style></head><body>${html}</body></html>`;
|
|
504
543
|
}
|
|
505
544
|
|
|
545
|
+
// src/images.ts
|
|
546
|
+
var round = (n) => Math.round(n * 10) / 10;
|
|
547
|
+
function focalPosition(image2, frameRatio) {
|
|
548
|
+
const focal = image2?.focal;
|
|
549
|
+
if (!focal) return void 0;
|
|
550
|
+
const imageRatio = image2.width && image2.height ? image2.width / image2.height : 0;
|
|
551
|
+
if (!frameRatio || !imageRatio) return `${round(focal.x)}% ${round(focal.y)}%`;
|
|
552
|
+
const centre = (point, scale) => scale <= 1.001 ? 50 : Math.min(100, Math.max(0, (point / 100 * scale - 0.5) / (scale - 1) * 100));
|
|
553
|
+
const x = imageRatio > frameRatio ? centre(focal.x, imageRatio / frameRatio) : 50;
|
|
554
|
+
const y = imageRatio < frameRatio ? centre(focal.y, frameRatio / imageRatio) : 50;
|
|
555
|
+
return `${round(x)}% ${round(y)}%`;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
// src/maps.ts
|
|
559
|
+
function directionsUrl(place) {
|
|
560
|
+
const destination = place.name ? `${place.name}, ${place.address.replace(/\s*\n\s*/g, ", ")}` : place.address.replace(/\s*\n\s*/g, ", ");
|
|
561
|
+
return `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(destination)}`;
|
|
562
|
+
}
|
|
563
|
+
function pinned(places) {
|
|
564
|
+
return places.filter((p) => Boolean(p.position));
|
|
565
|
+
}
|
|
566
|
+
|
|
506
567
|
// src/site-settings.ts
|
|
507
568
|
import { z as z2 } from "zod";
|
|
508
569
|
var link2 = z2.object({ label: z2.string().trim().min(1, "Add link text."), href: z2.string().trim().min(1, "Add where it goes.") });
|
|
@@ -622,6 +683,58 @@ function parseTicketTypes(input) {
|
|
|
622
683
|
const parsed = ticketTypesSchema.safeParse(input);
|
|
623
684
|
return parsed.success ? parsed.data : [];
|
|
624
685
|
}
|
|
686
|
+
|
|
687
|
+
// src/volunteers.ts
|
|
688
|
+
import { z as z4 } from "zod";
|
|
689
|
+
var VOLUNTEER_RESERVED_KEYS = ["name", "email", "shift", "shifts", "answers"];
|
|
690
|
+
var volunteerShiftSchema = z4.object({
|
|
691
|
+
id: z4.string().min(1).max(40),
|
|
692
|
+
name: z4.string().trim().min(1, "Name this shift, e.g. Setup crew.").max(80),
|
|
693
|
+
description: z4.string().trim().max(300).optional(),
|
|
694
|
+
startsAt: z4.iso.datetime({ offset: true, message: "Choose when the shift starts." }),
|
|
695
|
+
endsAt: z4.iso.datetime({ offset: true, message: "Choose when the shift ends." }),
|
|
696
|
+
/** Volunteers needed; empty means no limit. */
|
|
697
|
+
spots: z4.number().int().min(1).max(1e3).optional(),
|
|
698
|
+
/** Shown on the site; turn off to stop sign-ups for one shift without deleting it. */
|
|
699
|
+
active: z4.boolean().default(true)
|
|
700
|
+
}).refine((s) => new Date(s.endsAt) > new Date(s.startsAt), { message: "A shift must end after it starts.", path: ["endsAt"] });
|
|
701
|
+
var volunteerShiftsSchema = z4.array(volunteerShiftSchema).max(50, "Use up to 50 shifts.").refine((shifts) => new Set(shifts.map((s) => s.id)).size === shifts.length, { message: "Two shifts share an id. Remove one and add it again." });
|
|
702
|
+
var volunteerFormSchema = z4.object({
|
|
703
|
+
/** A line or two above the form: what volunteers will do, who to contact. */
|
|
704
|
+
intro: z4.string().trim().max(1e3).optional(),
|
|
705
|
+
/** Questions besides name and email (asked always), e.g. phone, T-shirt size, experience. */
|
|
706
|
+
fields: z4.array(formFieldSchema).max(20, "Up to 20 questions.").default([]),
|
|
707
|
+
/** Volunteers choose from the event's shifts. */
|
|
708
|
+
shiftsEnabled: z4.boolean().default(false),
|
|
709
|
+
/** one: a single shift; many: as many as they like (at least one). */
|
|
710
|
+
shiftChoice: z4.enum(["one", "many"]).default("many"),
|
|
711
|
+
submitLabel: z4.string().trim().min(1, "The button needs a label.").max(40).default("Sign up to volunteer"),
|
|
712
|
+
successMessage: z4.string().trim().min(1, "Add a thank-you message.").max(500).default("Thanks for volunteering! We'll be in touch with the details.")
|
|
713
|
+
}).superRefine((form, ctx) => {
|
|
714
|
+
const seen = /* @__PURE__ */ new Set();
|
|
715
|
+
form.fields.forEach((f, i) => {
|
|
716
|
+
if (VOLUNTEER_RESERVED_KEYS.includes(f.name))
|
|
717
|
+
ctx.addIssue({ code: "custom", path: ["fields", i, "name"], message: `\u201C${f.name}\u201D is used by the sign-up itself. Choose another key.` });
|
|
718
|
+
else if (seen.has(f.name)) ctx.addIssue({ code: "custom", path: ["fields", i, "name"], message: `Two questions use the key \u201C${f.name}\u201D.` });
|
|
719
|
+
seen.add(f.name);
|
|
720
|
+
if (f.type === "select" && !f.options?.length) ctx.addIssue({ code: "custom", path: ["fields", i, "options"], message: "Add the dropdown's choices." });
|
|
721
|
+
});
|
|
722
|
+
});
|
|
723
|
+
function parseVolunteerShifts(input) {
|
|
724
|
+
if (!Array.isArray(input)) return [];
|
|
725
|
+
return input.flatMap((s) => {
|
|
726
|
+
const parsed = volunteerShiftSchema.safeParse(s);
|
|
727
|
+
return parsed.success ? [parsed.data] : [];
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
function parseVolunteerForm(input) {
|
|
731
|
+
const parsed = volunteerFormSchema.safeParse(input ?? {});
|
|
732
|
+
if (parsed.success) return parsed.data;
|
|
733
|
+
const raw = input && typeof input === "object" ? input : {};
|
|
734
|
+
const fields = Array.isArray(raw.fields) ? raw.fields.flatMap((f) => formFieldSchema.safeParse(f).success ? [formFieldSchema.parse(f)] : []) : [];
|
|
735
|
+
const retry = volunteerFormSchema.safeParse({ ...raw, fields: fields.filter((f) => !VOLUNTEER_RESERVED_KEYS.includes(f.name)) });
|
|
736
|
+
return retry.success ? retry.data : volunteerFormSchema.parse({});
|
|
737
|
+
}
|
|
625
738
|
export {
|
|
626
739
|
BLOCK_SCHEMA_VERSION,
|
|
627
740
|
EMBED_ALLOW,
|
|
@@ -629,6 +742,7 @@ export {
|
|
|
629
742
|
ORGANIZATION_TYPES,
|
|
630
743
|
SITE_LOCALES,
|
|
631
744
|
SOCIAL_PLATFORMS,
|
|
745
|
+
VOLUNTEER_RESERVED_KEYS,
|
|
632
746
|
blockDataSchemas,
|
|
633
747
|
blockFeature,
|
|
634
748
|
blockSchema,
|
|
@@ -637,7 +751,9 @@ export {
|
|
|
637
751
|
customBlockKey,
|
|
638
752
|
customFieldSchema,
|
|
639
753
|
customValuesSchema,
|
|
754
|
+
directionsUrl,
|
|
640
755
|
embedDocument,
|
|
756
|
+
focalPosition,
|
|
641
757
|
formDefinitionSchema,
|
|
642
758
|
formFieldSchema,
|
|
643
759
|
pageContentSchema,
|
|
@@ -645,9 +761,15 @@ export {
|
|
|
645
761
|
parsePageContent,
|
|
646
762
|
parseSiteSettings,
|
|
647
763
|
parseTicketTypes,
|
|
764
|
+
parseVolunteerForm,
|
|
765
|
+
parseVolunteerShifts,
|
|
766
|
+
pinned,
|
|
648
767
|
seoSchema,
|
|
649
768
|
siteSettingsSchema,
|
|
650
769
|
ticketTypeSchema,
|
|
651
770
|
ticketTypesSchema,
|
|
652
|
-
videoEmbedUrl
|
|
771
|
+
videoEmbedUrl,
|
|
772
|
+
volunteerFormSchema,
|
|
773
|
+
volunteerShiftSchema,
|
|
774
|
+
volunteerShiftsSchema
|
|
653
775
|
};
|