@the-smithy/hearth-schema 0.14.0 → 0.16.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 +148 -3
- package/dist/index.js +27 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ declare const BLOCK_SCHEMA_VERSION = 1;
|
|
|
15
15
|
declare const image: z.ZodObject<{
|
|
16
16
|
src: z.ZodString;
|
|
17
17
|
alt: z.ZodDefault<z.ZodString>;
|
|
18
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
18
20
|
}, z.core.$strip>;
|
|
19
21
|
declare const link: z.ZodObject<{
|
|
20
22
|
label: z.ZodString;
|
|
@@ -307,6 +309,8 @@ declare const blockDataSchemas: {
|
|
|
307
309
|
image: z.ZodOptional<z.ZodObject<{
|
|
308
310
|
src: z.ZodString;
|
|
309
311
|
alt: z.ZodDefault<z.ZodString>;
|
|
312
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
313
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
310
314
|
}, z.core.$strip>>;
|
|
311
315
|
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
312
316
|
label: z.ZodString;
|
|
@@ -336,6 +340,8 @@ declare const blockDataSchemas: {
|
|
|
336
340
|
image: z.ZodOptional<z.ZodObject<{
|
|
337
341
|
src: z.ZodString;
|
|
338
342
|
alt: z.ZodDefault<z.ZodString>;
|
|
343
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
344
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
339
345
|
}, z.core.$strip>>;
|
|
340
346
|
imagePosition: z.ZodDefault<z.ZodEnum<{
|
|
341
347
|
left: "left";
|
|
@@ -367,6 +373,8 @@ declare const blockDataSchemas: {
|
|
|
367
373
|
image: z.ZodOptional<z.ZodObject<{
|
|
368
374
|
src: z.ZodString;
|
|
369
375
|
alt: z.ZodDefault<z.ZodString>;
|
|
376
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
377
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
370
378
|
}, z.core.$strip>>;
|
|
371
379
|
link: z.ZodOptional<z.ZodObject<{
|
|
372
380
|
label: z.ZodString;
|
|
@@ -400,6 +408,8 @@ declare const blockDataSchemas: {
|
|
|
400
408
|
image: z.ZodOptional<z.ZodObject<{
|
|
401
409
|
src: z.ZodString;
|
|
402
410
|
alt: z.ZodDefault<z.ZodString>;
|
|
411
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
412
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
403
413
|
}, z.core.$strip>>;
|
|
404
414
|
}, z.core.$strip>;
|
|
405
415
|
readonly faq: z.ZodObject<{
|
|
@@ -445,6 +455,8 @@ declare const blockDataSchemas: {
|
|
|
445
455
|
image: z.ZodOptional<z.ZodObject<{
|
|
446
456
|
src: z.ZodString;
|
|
447
457
|
alt: z.ZodDefault<z.ZodString>;
|
|
458
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
459
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
448
460
|
}, z.core.$strip>>;
|
|
449
461
|
url: z.ZodOptional<z.ZodString>;
|
|
450
462
|
role: z.ZodOptional<z.ZodString>;
|
|
@@ -488,6 +500,8 @@ declare const blockDataSchemas: {
|
|
|
488
500
|
image: z.ZodObject<{
|
|
489
501
|
src: z.ZodString;
|
|
490
502
|
alt: z.ZodDefault<z.ZodString>;
|
|
503
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
504
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
491
505
|
}, z.core.$strip>;
|
|
492
506
|
caption: z.ZodOptional<z.ZodString>;
|
|
493
507
|
}, z.core.$strip>>;
|
|
@@ -504,6 +518,8 @@ declare const blockDataSchemas: {
|
|
|
504
518
|
image: z.ZodOptional<z.ZodObject<{
|
|
505
519
|
src: z.ZodString;
|
|
506
520
|
alt: z.ZodDefault<z.ZodString>;
|
|
521
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
522
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
507
523
|
}, z.core.$strip>>;
|
|
508
524
|
tone: z.ZodDefault<z.ZodEnum<{
|
|
509
525
|
default: "default";
|
|
@@ -544,6 +560,8 @@ declare const blockDataSchemas: {
|
|
|
544
560
|
image: z.ZodOptional<z.ZodObject<{
|
|
545
561
|
src: z.ZodString;
|
|
546
562
|
alt: z.ZodDefault<z.ZodString>;
|
|
563
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
564
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
547
565
|
}, z.core.$strip>>;
|
|
548
566
|
bio: z.ZodOptional<z.ZodString>;
|
|
549
567
|
}, z.core.$strip>>;
|
|
@@ -556,6 +574,8 @@ declare const blockDataSchemas: {
|
|
|
556
574
|
logo: z.ZodOptional<z.ZodObject<{
|
|
557
575
|
src: z.ZodString;
|
|
558
576
|
alt: z.ZodDefault<z.ZodString>;
|
|
577
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
578
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
559
579
|
}, z.core.$strip>>;
|
|
560
580
|
url: z.ZodOptional<z.ZodString>;
|
|
561
581
|
}, z.core.$strip>>;
|
|
@@ -668,6 +688,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
668
688
|
image: z.ZodOptional<z.ZodObject<{
|
|
669
689
|
src: z.ZodString;
|
|
670
690
|
alt: z.ZodDefault<z.ZodString>;
|
|
691
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
692
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
671
693
|
}, z.core.$strip>>;
|
|
672
694
|
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
673
695
|
label: z.ZodString;
|
|
@@ -695,6 +717,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
695
717
|
image: z.ZodOptional<z.ZodObject<{
|
|
696
718
|
src: z.ZodString;
|
|
697
719
|
alt: z.ZodDefault<z.ZodString>;
|
|
720
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
721
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
698
722
|
}, z.core.$strip>>;
|
|
699
723
|
imagePosition: z.ZodDefault<z.ZodEnum<{
|
|
700
724
|
left: "left";
|
|
@@ -724,6 +748,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
724
748
|
image: z.ZodOptional<z.ZodObject<{
|
|
725
749
|
src: z.ZodString;
|
|
726
750
|
alt: z.ZodDefault<z.ZodString>;
|
|
751
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
752
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
727
753
|
}, z.core.$strip>>;
|
|
728
754
|
link: z.ZodOptional<z.ZodObject<{
|
|
729
755
|
label: z.ZodString;
|
|
@@ -756,6 +782,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
756
782
|
image: z.ZodOptional<z.ZodObject<{
|
|
757
783
|
src: z.ZodString;
|
|
758
784
|
alt: z.ZodDefault<z.ZodString>;
|
|
785
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
786
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
759
787
|
}, z.core.$strip>>;
|
|
760
788
|
}, z.core.$strip> | z.ZodObject<{
|
|
761
789
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -796,6 +824,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
796
824
|
image: z.ZodOptional<z.ZodObject<{
|
|
797
825
|
src: z.ZodString;
|
|
798
826
|
alt: z.ZodDefault<z.ZodString>;
|
|
827
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
828
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
799
829
|
}, z.core.$strip>>;
|
|
800
830
|
url: z.ZodOptional<z.ZodString>;
|
|
801
831
|
role: z.ZodOptional<z.ZodString>;
|
|
@@ -836,6 +866,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
836
866
|
image: z.ZodObject<{
|
|
837
867
|
src: z.ZodString;
|
|
838
868
|
alt: z.ZodDefault<z.ZodString>;
|
|
869
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
870
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
839
871
|
}, z.core.$strip>;
|
|
840
872
|
caption: z.ZodOptional<z.ZodString>;
|
|
841
873
|
}, z.core.$strip>>;
|
|
@@ -851,6 +883,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
851
883
|
image: z.ZodOptional<z.ZodObject<{
|
|
852
884
|
src: z.ZodString;
|
|
853
885
|
alt: z.ZodDefault<z.ZodString>;
|
|
886
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
887
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
854
888
|
}, z.core.$strip>>;
|
|
855
889
|
tone: z.ZodDefault<z.ZodEnum<{
|
|
856
890
|
default: "default";
|
|
@@ -883,6 +917,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
883
917
|
image: z.ZodOptional<z.ZodObject<{
|
|
884
918
|
src: z.ZodString;
|
|
885
919
|
alt: z.ZodDefault<z.ZodString>;
|
|
920
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
921
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
886
922
|
}, z.core.$strip>>;
|
|
887
923
|
bio: z.ZodOptional<z.ZodString>;
|
|
888
924
|
}, z.core.$strip>>;
|
|
@@ -894,6 +930,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
894
930
|
logo: z.ZodOptional<z.ZodObject<{
|
|
895
931
|
src: z.ZodString;
|
|
896
932
|
alt: z.ZodDefault<z.ZodString>;
|
|
933
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
934
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
897
935
|
}, z.core.$strip>>;
|
|
898
936
|
url: z.ZodOptional<z.ZodString>;
|
|
899
937
|
}, z.core.$strip>>;
|
|
@@ -980,6 +1018,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
980
1018
|
image: z.ZodOptional<z.ZodObject<{
|
|
981
1019
|
src: z.ZodString;
|
|
982
1020
|
alt: z.ZodDefault<z.ZodString>;
|
|
1021
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1022
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
983
1023
|
}, z.core.$strip>>;
|
|
984
1024
|
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
985
1025
|
label: z.ZodString;
|
|
@@ -1007,6 +1047,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1007
1047
|
image: z.ZodOptional<z.ZodObject<{
|
|
1008
1048
|
src: z.ZodString;
|
|
1009
1049
|
alt: z.ZodDefault<z.ZodString>;
|
|
1050
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1051
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1010
1052
|
}, z.core.$strip>>;
|
|
1011
1053
|
imagePosition: z.ZodDefault<z.ZodEnum<{
|
|
1012
1054
|
left: "left";
|
|
@@ -1036,6 +1078,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1036
1078
|
image: z.ZodOptional<z.ZodObject<{
|
|
1037
1079
|
src: z.ZodString;
|
|
1038
1080
|
alt: z.ZodDefault<z.ZodString>;
|
|
1081
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1082
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1039
1083
|
}, z.core.$strip>>;
|
|
1040
1084
|
link: z.ZodOptional<z.ZodObject<{
|
|
1041
1085
|
label: z.ZodString;
|
|
@@ -1068,6 +1112,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1068
1112
|
image: z.ZodOptional<z.ZodObject<{
|
|
1069
1113
|
src: z.ZodString;
|
|
1070
1114
|
alt: z.ZodDefault<z.ZodString>;
|
|
1115
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1116
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1071
1117
|
}, z.core.$strip>>;
|
|
1072
1118
|
}, z.core.$strip> | z.ZodObject<{
|
|
1073
1119
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -1108,6 +1154,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1108
1154
|
image: z.ZodOptional<z.ZodObject<{
|
|
1109
1155
|
src: z.ZodString;
|
|
1110
1156
|
alt: z.ZodDefault<z.ZodString>;
|
|
1157
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1158
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1111
1159
|
}, z.core.$strip>>;
|
|
1112
1160
|
url: z.ZodOptional<z.ZodString>;
|
|
1113
1161
|
role: z.ZodOptional<z.ZodString>;
|
|
@@ -1148,6 +1196,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1148
1196
|
image: z.ZodObject<{
|
|
1149
1197
|
src: z.ZodString;
|
|
1150
1198
|
alt: z.ZodDefault<z.ZodString>;
|
|
1199
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1200
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1151
1201
|
}, z.core.$strip>;
|
|
1152
1202
|
caption: z.ZodOptional<z.ZodString>;
|
|
1153
1203
|
}, z.core.$strip>>;
|
|
@@ -1163,6 +1213,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1163
1213
|
image: z.ZodOptional<z.ZodObject<{
|
|
1164
1214
|
src: z.ZodString;
|
|
1165
1215
|
alt: z.ZodDefault<z.ZodString>;
|
|
1216
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1217
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1166
1218
|
}, z.core.$strip>>;
|
|
1167
1219
|
tone: z.ZodDefault<z.ZodEnum<{
|
|
1168
1220
|
default: "default";
|
|
@@ -1195,6 +1247,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1195
1247
|
image: z.ZodOptional<z.ZodObject<{
|
|
1196
1248
|
src: z.ZodString;
|
|
1197
1249
|
alt: z.ZodDefault<z.ZodString>;
|
|
1250
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1251
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1198
1252
|
}, z.core.$strip>>;
|
|
1199
1253
|
bio: z.ZodOptional<z.ZodString>;
|
|
1200
1254
|
}, z.core.$strip>>;
|
|
@@ -1206,6 +1260,8 @@ declare const blockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1206
1260
|
logo: z.ZodOptional<z.ZodObject<{
|
|
1207
1261
|
src: z.ZodString;
|
|
1208
1262
|
alt: z.ZodDefault<z.ZodString>;
|
|
1263
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1264
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1209
1265
|
}, z.core.$strip>>;
|
|
1210
1266
|
url: z.ZodOptional<z.ZodString>;
|
|
1211
1267
|
}, z.core.$strip>>;
|
|
@@ -1293,6 +1349,23 @@ type Block = {
|
|
|
1293
1349
|
type ImageRef = z.infer<typeof image>;
|
|
1294
1350
|
type LinkRef = z.infer<typeof link>;
|
|
1295
1351
|
type FormField = z.infer<typeof formFieldSchema>;
|
|
1352
|
+
/**
|
|
1353
|
+
* Search & sharing for a page, event or fundraiser: search title and description, share image, hiding it from search
|
|
1354
|
+
* engines, and (pages only) a canonical address.
|
|
1355
|
+
*/
|
|
1356
|
+
declare const seoSchema: z.ZodObject<{
|
|
1357
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1358
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1359
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
1360
|
+
src: z.ZodString;
|
|
1361
|
+
alt: z.ZodDefault<z.ZodString>;
|
|
1362
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1363
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1364
|
+
}, z.core.$strip>>;
|
|
1365
|
+
noIndex: z.ZodOptional<z.ZodBoolean>;
|
|
1366
|
+
canonical: z.ZodOptional<z.ZodString>;
|
|
1367
|
+
}, z.core.$strip>;
|
|
1368
|
+
type Seo = z.infer<typeof seoSchema>;
|
|
1296
1369
|
/** Page content as stored in `pages.draft` and `page_revisions.content`. */
|
|
1297
1370
|
declare const pageContentSchema: z.ZodObject<{
|
|
1298
1371
|
title: z.ZodString;
|
|
@@ -1302,6 +1375,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1302
1375
|
image: z.ZodOptional<z.ZodObject<{
|
|
1303
1376
|
src: z.ZodString;
|
|
1304
1377
|
alt: z.ZodDefault<z.ZodString>;
|
|
1378
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1379
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1305
1380
|
}, z.core.$strip>>;
|
|
1306
1381
|
noIndex: z.ZodOptional<z.ZodBoolean>;
|
|
1307
1382
|
canonical: z.ZodOptional<z.ZodString>;
|
|
@@ -1316,6 +1391,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1316
1391
|
image: z.ZodOptional<z.ZodObject<{
|
|
1317
1392
|
src: z.ZodString;
|
|
1318
1393
|
alt: z.ZodDefault<z.ZodString>;
|
|
1394
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1395
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1319
1396
|
}, z.core.$strip>>;
|
|
1320
1397
|
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
1321
1398
|
label: z.ZodString;
|
|
@@ -1343,6 +1420,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1343
1420
|
image: z.ZodOptional<z.ZodObject<{
|
|
1344
1421
|
src: z.ZodString;
|
|
1345
1422
|
alt: z.ZodDefault<z.ZodString>;
|
|
1423
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1424
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1346
1425
|
}, z.core.$strip>>;
|
|
1347
1426
|
imagePosition: z.ZodDefault<z.ZodEnum<{
|
|
1348
1427
|
left: "left";
|
|
@@ -1372,6 +1451,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1372
1451
|
image: z.ZodOptional<z.ZodObject<{
|
|
1373
1452
|
src: z.ZodString;
|
|
1374
1453
|
alt: z.ZodDefault<z.ZodString>;
|
|
1454
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1455
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1375
1456
|
}, z.core.$strip>>;
|
|
1376
1457
|
link: z.ZodOptional<z.ZodObject<{
|
|
1377
1458
|
label: z.ZodString;
|
|
@@ -1404,6 +1485,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1404
1485
|
image: z.ZodOptional<z.ZodObject<{
|
|
1405
1486
|
src: z.ZodString;
|
|
1406
1487
|
alt: z.ZodDefault<z.ZodString>;
|
|
1488
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1489
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1407
1490
|
}, z.core.$strip>>;
|
|
1408
1491
|
}, z.core.$strip> | z.ZodObject<{
|
|
1409
1492
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -1444,6 +1527,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1444
1527
|
image: z.ZodOptional<z.ZodObject<{
|
|
1445
1528
|
src: z.ZodString;
|
|
1446
1529
|
alt: z.ZodDefault<z.ZodString>;
|
|
1530
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1531
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1447
1532
|
}, z.core.$strip>>;
|
|
1448
1533
|
url: z.ZodOptional<z.ZodString>;
|
|
1449
1534
|
role: z.ZodOptional<z.ZodString>;
|
|
@@ -1484,6 +1569,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1484
1569
|
image: z.ZodObject<{
|
|
1485
1570
|
src: z.ZodString;
|
|
1486
1571
|
alt: z.ZodDefault<z.ZodString>;
|
|
1572
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1573
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1487
1574
|
}, z.core.$strip>;
|
|
1488
1575
|
caption: z.ZodOptional<z.ZodString>;
|
|
1489
1576
|
}, z.core.$strip>>;
|
|
@@ -1499,6 +1586,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1499
1586
|
image: z.ZodOptional<z.ZodObject<{
|
|
1500
1587
|
src: z.ZodString;
|
|
1501
1588
|
alt: z.ZodDefault<z.ZodString>;
|
|
1589
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1590
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1502
1591
|
}, z.core.$strip>>;
|
|
1503
1592
|
tone: z.ZodDefault<z.ZodEnum<{
|
|
1504
1593
|
default: "default";
|
|
@@ -1531,6 +1620,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1531
1620
|
image: z.ZodOptional<z.ZodObject<{
|
|
1532
1621
|
src: z.ZodString;
|
|
1533
1622
|
alt: z.ZodDefault<z.ZodString>;
|
|
1623
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1624
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1534
1625
|
}, z.core.$strip>>;
|
|
1535
1626
|
bio: z.ZodOptional<z.ZodString>;
|
|
1536
1627
|
}, z.core.$strip>>;
|
|
@@ -1542,6 +1633,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1542
1633
|
logo: z.ZodOptional<z.ZodObject<{
|
|
1543
1634
|
src: z.ZodString;
|
|
1544
1635
|
alt: z.ZodDefault<z.ZodString>;
|
|
1636
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1637
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1545
1638
|
}, z.core.$strip>>;
|
|
1546
1639
|
url: z.ZodOptional<z.ZodString>;
|
|
1547
1640
|
}, z.core.$strip>>;
|
|
@@ -1628,6 +1721,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1628
1721
|
image: z.ZodOptional<z.ZodObject<{
|
|
1629
1722
|
src: z.ZodString;
|
|
1630
1723
|
alt: z.ZodDefault<z.ZodString>;
|
|
1724
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1725
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1631
1726
|
}, z.core.$strip>>;
|
|
1632
1727
|
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
1633
1728
|
label: z.ZodString;
|
|
@@ -1655,6 +1750,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1655
1750
|
image: z.ZodOptional<z.ZodObject<{
|
|
1656
1751
|
src: z.ZodString;
|
|
1657
1752
|
alt: z.ZodDefault<z.ZodString>;
|
|
1753
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1754
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1658
1755
|
}, z.core.$strip>>;
|
|
1659
1756
|
imagePosition: z.ZodDefault<z.ZodEnum<{
|
|
1660
1757
|
left: "left";
|
|
@@ -1684,6 +1781,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1684
1781
|
image: z.ZodOptional<z.ZodObject<{
|
|
1685
1782
|
src: z.ZodString;
|
|
1686
1783
|
alt: z.ZodDefault<z.ZodString>;
|
|
1784
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1785
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1687
1786
|
}, z.core.$strip>>;
|
|
1688
1787
|
link: z.ZodOptional<z.ZodObject<{
|
|
1689
1788
|
label: z.ZodString;
|
|
@@ -1716,6 +1815,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1716
1815
|
image: z.ZodOptional<z.ZodObject<{
|
|
1717
1816
|
src: z.ZodString;
|
|
1718
1817
|
alt: z.ZodDefault<z.ZodString>;
|
|
1818
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1819
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1719
1820
|
}, z.core.$strip>>;
|
|
1720
1821
|
}, z.core.$strip> | z.ZodObject<{
|
|
1721
1822
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -1756,6 +1857,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1756
1857
|
image: z.ZodOptional<z.ZodObject<{
|
|
1757
1858
|
src: z.ZodString;
|
|
1758
1859
|
alt: z.ZodDefault<z.ZodString>;
|
|
1860
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1861
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1759
1862
|
}, z.core.$strip>>;
|
|
1760
1863
|
url: z.ZodOptional<z.ZodString>;
|
|
1761
1864
|
role: z.ZodOptional<z.ZodString>;
|
|
@@ -1796,6 +1899,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1796
1899
|
image: z.ZodObject<{
|
|
1797
1900
|
src: z.ZodString;
|
|
1798
1901
|
alt: z.ZodDefault<z.ZodString>;
|
|
1902
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1903
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1799
1904
|
}, z.core.$strip>;
|
|
1800
1905
|
caption: z.ZodOptional<z.ZodString>;
|
|
1801
1906
|
}, z.core.$strip>>;
|
|
@@ -1811,6 +1916,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1811
1916
|
image: z.ZodOptional<z.ZodObject<{
|
|
1812
1917
|
src: z.ZodString;
|
|
1813
1918
|
alt: z.ZodDefault<z.ZodString>;
|
|
1919
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1920
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1814
1921
|
}, z.core.$strip>>;
|
|
1815
1922
|
tone: z.ZodDefault<z.ZodEnum<{
|
|
1816
1923
|
default: "default";
|
|
@@ -1843,6 +1950,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1843
1950
|
image: z.ZodOptional<z.ZodObject<{
|
|
1844
1951
|
src: z.ZodString;
|
|
1845
1952
|
alt: z.ZodDefault<z.ZodString>;
|
|
1953
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1954
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1846
1955
|
}, z.core.$strip>>;
|
|
1847
1956
|
bio: z.ZodOptional<z.ZodString>;
|
|
1848
1957
|
}, z.core.$strip>>;
|
|
@@ -1854,6 +1963,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1854
1963
|
logo: z.ZodOptional<z.ZodObject<{
|
|
1855
1964
|
src: z.ZodString;
|
|
1856
1965
|
alt: z.ZodDefault<z.ZodString>;
|
|
1966
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1967
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1857
1968
|
}, z.core.$strip>>;
|
|
1858
1969
|
url: z.ZodOptional<z.ZodString>;
|
|
1859
1970
|
}, z.core.$strip>>;
|
|
@@ -1938,6 +2049,8 @@ declare const pageContentSchema: z.ZodObject<{
|
|
|
1938
2049
|
image: z.ZodOptional<z.ZodObject<{
|
|
1939
2050
|
src: z.ZodString;
|
|
1940
2051
|
alt: z.ZodDefault<z.ZodString>;
|
|
2052
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
2053
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1941
2054
|
}, z.core.$strip>>;
|
|
1942
2055
|
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1943
2056
|
}, z.core.$strip>>;
|
|
@@ -1996,6 +2109,8 @@ declare const EMBED_ALLOW = "autoplay; encrypted-media; fullscreen; picture-in-p
|
|
|
1996
2109
|
declare function embedDocument(html: string): string;
|
|
1997
2110
|
|
|
1998
2111
|
declare const ORGANIZATION_TYPES: readonly ["Organization", "LocalBusiness", "NGO", "Corporation", "EducationalOrganization", "GovernmentOrganization", "MedicalOrganization", "SportsOrganization"];
|
|
2112
|
+
/** Languages a site can be in (Open Graph locale; the page's lang attribute is the part before the underscore). */
|
|
2113
|
+
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"];
|
|
1999
2114
|
declare const SOCIAL_PLATFORMS: readonly ["facebook", "instagram", "linkedin", "x", "youtube", "tiktok", "other"];
|
|
2000
2115
|
declare const siteSettingsSchema: z.ZodObject<{
|
|
2001
2116
|
navigation: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -2074,6 +2189,24 @@ declare const siteSettingsSchema: z.ZodObject<{
|
|
|
2074
2189
|
ogBackground: z.ZodOptional<z.ZodString>;
|
|
2075
2190
|
ogText: z.ZodOptional<z.ZodString>;
|
|
2076
2191
|
ogAccent: z.ZodOptional<z.ZodString>;
|
|
2192
|
+
noIndex: z.ZodOptional<z.ZodBoolean>;
|
|
2193
|
+
locale: z.ZodDefault<z.ZodEnum<{
|
|
2194
|
+
en_US: "en_US";
|
|
2195
|
+
en_GB: "en_GB";
|
|
2196
|
+
en_CA: "en_CA";
|
|
2197
|
+
en_AU: "en_AU";
|
|
2198
|
+
es_US: "es_US";
|
|
2199
|
+
es_ES: "es_ES";
|
|
2200
|
+
es_MX: "es_MX";
|
|
2201
|
+
fr_CA: "fr_CA";
|
|
2202
|
+
fr_FR: "fr_FR";
|
|
2203
|
+
de_DE: "de_DE";
|
|
2204
|
+
pt_BR: "pt_BR";
|
|
2205
|
+
}>>;
|
|
2206
|
+
verification: z.ZodDefault<z.ZodObject<{
|
|
2207
|
+
google: z.ZodOptional<z.ZodString>;
|
|
2208
|
+
bing: z.ZodOptional<z.ZodString>;
|
|
2209
|
+
}, z.core.$strip>>;
|
|
2077
2210
|
}, z.core.$strip>>;
|
|
2078
2211
|
}, z.core.$strip>;
|
|
2079
2212
|
type SiteSettings = z.infer<typeof siteSettingsSchema>;
|
|
@@ -2121,10 +2254,11 @@ type PageMeta = {
|
|
|
2121
2254
|
index: boolean;
|
|
2122
2255
|
follow: boolean;
|
|
2123
2256
|
};
|
|
2257
|
+
/** The share image. Generated ones are 1200×630; an uploaded one's size isn't known, so width and height are left out. */
|
|
2124
2258
|
image: {
|
|
2125
2259
|
url: string;
|
|
2126
|
-
width
|
|
2127
|
-
height
|
|
2260
|
+
width?: number;
|
|
2261
|
+
height?: number;
|
|
2128
2262
|
alt: string;
|
|
2129
2263
|
generated: boolean;
|
|
2130
2264
|
};
|
|
@@ -2161,6 +2295,8 @@ type HearthEvent = {
|
|
|
2161
2295
|
name: string | null;
|
|
2162
2296
|
address: string | null;
|
|
2163
2297
|
};
|
|
2298
|
+
/** How people attend: at the place, online, or either. */
|
|
2299
|
+
attendance: "in_person" | "online" | "mixed";
|
|
2164
2300
|
registrationUrl: string | null;
|
|
2165
2301
|
image: {
|
|
2166
2302
|
src: string;
|
|
@@ -2461,6 +2597,15 @@ type SitemapEntry = {
|
|
|
2461
2597
|
lastModified: string | null;
|
|
2462
2598
|
priority: number;
|
|
2463
2599
|
};
|
|
2600
|
+
/**
|
|
2601
|
+
* An old address that now lives elsewhere (made when a live page changes address, by a migration, or by hand).
|
|
2602
|
+
* `from` is a lowercase path without a trailing slash; `to` is a path on the site or a full URL.
|
|
2603
|
+
*/
|
|
2604
|
+
type Redirect = {
|
|
2605
|
+
from: string;
|
|
2606
|
+
to: string;
|
|
2607
|
+
permanent: boolean;
|
|
2608
|
+
};
|
|
2464
2609
|
/** Body of a publish webhook (verify the X-Hearth-Signature header first). */
|
|
2465
2610
|
type WebhookPayload = {
|
|
2466
2611
|
site: string;
|
|
@@ -2476,4 +2621,4 @@ type ApiErrorBody = {
|
|
|
2476
2621
|
};
|
|
2477
2622
|
};
|
|
2478
2623
|
|
|
2479
|
-
export { 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 RegistrationInput, type RegistrationResult, type ResolvedBlock, SOCIAL_PLATFORMS, type Site, 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, siteSettingsSchema, ticketTypeSchema, ticketTypesSchema, videoEmbedUrl };
|
|
2624
|
+
export { 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 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 };
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,10 @@ var BLOCK_SCHEMA_VERSION = 1;
|
|
|
4
4
|
var image = z.object({
|
|
5
5
|
/** R2 object key of an uploaded file, or an absolute URL. The API returns absolute URLs. */
|
|
6
6
|
src: z.string().min(1),
|
|
7
|
-
alt: z.string().default("")
|
|
7
|
+
alt: z.string().default(""),
|
|
8
|
+
/** The file's size in pixels: filled in by the API from the media library, so frontends can avoid layout shift. */
|
|
9
|
+
width: z.number().int().positive().optional(),
|
|
10
|
+
height: z.number().int().positive().optional()
|
|
8
11
|
});
|
|
9
12
|
var link = z.object({
|
|
10
13
|
label: z.string().min(1),
|
|
@@ -381,6 +384,15 @@ var blockSchema = z.discriminatedUnion(
|
|
|
381
384
|
"type",
|
|
382
385
|
blockVariants
|
|
383
386
|
);
|
|
387
|
+
var seoSchema = z.object({
|
|
388
|
+
title: z.string().trim().max(70, "Keep it under 70 characters.").optional(),
|
|
389
|
+
description: z.string().trim().max(200, "Keep it under 200 characters.").optional(),
|
|
390
|
+
image: image.optional(),
|
|
391
|
+
/** Keep it out of search engines (and the sitemap). */
|
|
392
|
+
noIndex: z.boolean().optional(),
|
|
393
|
+
/** Point search engines at another address for this content (a path or full URL). */
|
|
394
|
+
canonical: z.string().trim().max(500).optional()
|
|
395
|
+
});
|
|
384
396
|
var pageContentSchema = z.object({
|
|
385
397
|
title: z.string().trim().min(1, "Give the page a title."),
|
|
386
398
|
seo: z.object({
|
|
@@ -483,6 +495,7 @@ function embedDocument(html) {
|
|
|
483
495
|
import { z as z2 } from "zod";
|
|
484
496
|
var link2 = z2.object({ label: z2.string().trim().min(1, "Add link text."), href: z2.string().trim().min(1, "Add where it goes.") });
|
|
485
497
|
var ORGANIZATION_TYPES = ["Organization", "LocalBusiness", "NGO", "Corporation", "EducationalOrganization", "GovernmentOrganization", "MedicalOrganization", "SportsOrganization"];
|
|
498
|
+
var SITE_LOCALES = ["en_US", "en_GB", "en_CA", "en_AU", "es_US", "es_ES", "es_MX", "fr_CA", "fr_FR", "de_DE", "pt_BR"];
|
|
486
499
|
var SOCIAL_PLATFORMS = ["facebook", "instagram", "linkedin", "x", "youtube", "tiktok", "other"];
|
|
487
500
|
var siteSettingsSchema = z2.object({
|
|
488
501
|
navigation: z2.array(link2).default([]),
|
|
@@ -557,8 +570,17 @@ var siteSettingsSchema = z2.object({
|
|
|
557
570
|
/** Colors for generated share images. */
|
|
558
571
|
ogBackground: z2.string().regex(/^#[0-9a-fA-F]{6}$/, "Use a hex color like #1A1A14.").optional(),
|
|
559
572
|
ogText: z2.string().regex(/^#[0-9a-fA-F]{6}$/, "Use a hex color like #FFFFFF.").optional(),
|
|
560
|
-
ogAccent: z2.string().regex(/^#[0-9a-fA-F]{6}$/, "Use a hex color like #E8993F.").optional()
|
|
561
|
-
|
|
573
|
+
ogAccent: z2.string().regex(/^#[0-9a-fA-F]{6}$/, "Use a hex color like #E8993F.").optional(),
|
|
574
|
+
/** Keep the whole site out of search engines (e.g. before launch): every page asks not to be listed, and the sitemap is empty. */
|
|
575
|
+
noIndex: z2.boolean().optional(),
|
|
576
|
+
/** The site's language and region, e.g. en_US: social share tags and the page's lang attribute. */
|
|
577
|
+
locale: z2.enum(SITE_LOCALES).default("en_US"),
|
|
578
|
+
/** Ownership checks from Google Search Console and Bing Webmaster Tools (the code from their HTML tag method). */
|
|
579
|
+
verification: z2.object({
|
|
580
|
+
google: z2.string().trim().max(120).regex(/^[A-Za-z0-9_-]*$/, `Paste only the code from the tag's content="\u2026".`).optional(),
|
|
581
|
+
bing: z2.string().trim().max(120).regex(/^[A-Za-z0-9_-]*$/, `Paste only the code from the tag's content="\u2026".`).optional()
|
|
582
|
+
}).default({})
|
|
583
|
+
}).default({ organizationType: "Organization", locale: "en_US", verification: {} })
|
|
562
584
|
});
|
|
563
585
|
function parseSiteSettings(input) {
|
|
564
586
|
const parsed = siteSettingsSchema.safeParse(input ?? {});
|
|
@@ -591,6 +613,7 @@ export {
|
|
|
591
613
|
EMBED_ALLOW,
|
|
592
614
|
EMBED_SANDBOX,
|
|
593
615
|
ORGANIZATION_TYPES,
|
|
616
|
+
SITE_LOCALES,
|
|
594
617
|
SOCIAL_PLATFORMS,
|
|
595
618
|
blockDataSchemas,
|
|
596
619
|
blockFeature,
|
|
@@ -608,6 +631,7 @@ export {
|
|
|
608
631
|
parsePageContent,
|
|
609
632
|
parseSiteSettings,
|
|
610
633
|
parseTicketTypes,
|
|
634
|
+
seoSchema,
|
|
611
635
|
siteSettingsSchema,
|
|
612
636
|
ticketTypeSchema,
|
|
613
637
|
ticketTypesSchema,
|