@seed-hypermedia/client 0.0.32 → 0.0.34

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.
@@ -71,6 +71,20 @@ var HighlightAnnotationSchema = z.object({
71
71
  type: z.literal("Range"),
72
72
  ...baseAnnotationProperties
73
73
  }).strict();
74
+ var colorAnnotationProperties = {
75
+ ...baseAnnotationProperties,
76
+ attributes: z.object({
77
+ color: z.string()
78
+ }).optional()
79
+ };
80
+ var TextColorAnnotationSchema = z.object({
81
+ type: z.literal("TextColor"),
82
+ ...colorAnnotationProperties
83
+ }).strict();
84
+ var BackgroundColorAnnotationSchema = z.object({
85
+ type: z.literal("BackgroundColor"),
86
+ ...colorAnnotationProperties
87
+ }).strict();
74
88
  var HMAnnotationSchema = z.discriminatedUnion("type", [
75
89
  BoldAnnotationSchema,
76
90
  ItalicAnnotationSchema,
@@ -79,7 +93,9 @@ var HMAnnotationSchema = z.discriminatedUnion("type", [
79
93
  CodeAnnotationSchema,
80
94
  LinkAnnotationSchema,
81
95
  InlineEmbedAnnotationSchema,
82
- HighlightAnnotationSchema
96
+ HighlightAnnotationSchema,
97
+ TextColorAnnotationSchema,
98
+ BackgroundColorAnnotationSchema
83
99
  ]);
84
100
  var HMAnnotationsSchema = z.array(HMAnnotationSchema).optional();
85
101
  var blockBaseProperties = {
@@ -1219,6 +1235,8 @@ export {
1219
1235
  LinkAnnotationSchema,
1220
1236
  InlineEmbedAnnotationSchema,
1221
1237
  HighlightAnnotationSchema,
1238
+ TextColorAnnotationSchema,
1239
+ BackgroundColorAnnotationSchema,
1222
1240
  HMAnnotationSchema,
1223
1241
  HMAnnotationsSchema,
1224
1242
  HMBlockParagraphSchema,
package/dist/client.d.ts CHANGED
@@ -17,7 +17,7 @@ export type PublishDocumentInput = {
17
17
  };
18
18
  export type SeedClientOptions = {
19
19
  fetch?: typeof globalThis.fetch;
20
- headers?: Record<string, string>;
20
+ headers?: Record<string, string> | (() => Record<string, string> | Promise<Record<string, string>>);
21
21
  };
22
22
  type PublishBlobsRequest = Extract<HMRequest, {
23
23
  key: 'PublishBlobs';
@@ -145,6 +145,8 @@ export interface EditorInlineStyles {
145
145
  code?: boolean;
146
146
  math?: boolean;
147
147
  range?: boolean;
148
+ textColor?: string;
149
+ backgroundColor?: string;
148
150
  }
149
151
  export type EditorAnnotationType = 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'link' | 'inline-embed' | 'range';
150
152
  export type EditorBlockType = EditorBlock['type'];
@@ -233,6 +233,64 @@ export declare const HighlightAnnotationSchema: z.ZodObject<{
233
233
  link?: "" | undefined;
234
234
  attributes?: {} | undefined;
235
235
  }>;
236
+ export declare const TextColorAnnotationSchema: z.ZodObject<{
237
+ attributes: z.ZodOptional<z.ZodObject<{
238
+ color: z.ZodString;
239
+ }, "strip", z.ZodTypeAny, {
240
+ color: string;
241
+ }, {
242
+ color: string;
243
+ }>>;
244
+ starts: z.ZodArray<z.ZodNumber, "many">;
245
+ ends: z.ZodArray<z.ZodNumber, "many">;
246
+ link: z.ZodOptional<z.ZodLiteral<"">>;
247
+ type: z.ZodLiteral<"TextColor">;
248
+ }, "strict", z.ZodTypeAny, {
249
+ type: "TextColor";
250
+ starts: number[];
251
+ ends: number[];
252
+ link?: "" | undefined;
253
+ attributes?: {
254
+ color: string;
255
+ } | undefined;
256
+ }, {
257
+ type: "TextColor";
258
+ starts: number[];
259
+ ends: number[];
260
+ link?: "" | undefined;
261
+ attributes?: {
262
+ color: string;
263
+ } | undefined;
264
+ }>;
265
+ export declare const BackgroundColorAnnotationSchema: z.ZodObject<{
266
+ attributes: z.ZodOptional<z.ZodObject<{
267
+ color: z.ZodString;
268
+ }, "strip", z.ZodTypeAny, {
269
+ color: string;
270
+ }, {
271
+ color: string;
272
+ }>>;
273
+ starts: z.ZodArray<z.ZodNumber, "many">;
274
+ ends: z.ZodArray<z.ZodNumber, "many">;
275
+ link: z.ZodOptional<z.ZodLiteral<"">>;
276
+ type: z.ZodLiteral<"BackgroundColor">;
277
+ }, "strict", z.ZodTypeAny, {
278
+ type: "BackgroundColor";
279
+ starts: number[];
280
+ ends: number[];
281
+ link?: "" | undefined;
282
+ attributes?: {
283
+ color: string;
284
+ } | undefined;
285
+ }, {
286
+ type: "BackgroundColor";
287
+ starts: number[];
288
+ ends: number[];
289
+ link?: "" | undefined;
290
+ attributes?: {
291
+ color: string;
292
+ } | undefined;
293
+ }>;
236
294
  export declare const HMAnnotationSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
237
295
  starts: z.ZodArray<z.ZodNumber, "many">;
238
296
  ends: z.ZodArray<z.ZodNumber, "many">;
@@ -377,6 +435,62 @@ export declare const HMAnnotationSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
377
435
  ends: number[];
378
436
  link?: "" | undefined;
379
437
  attributes?: {} | undefined;
438
+ }>, z.ZodObject<{
439
+ attributes: z.ZodOptional<z.ZodObject<{
440
+ color: z.ZodString;
441
+ }, "strip", z.ZodTypeAny, {
442
+ color: string;
443
+ }, {
444
+ color: string;
445
+ }>>;
446
+ starts: z.ZodArray<z.ZodNumber, "many">;
447
+ ends: z.ZodArray<z.ZodNumber, "many">;
448
+ link: z.ZodOptional<z.ZodLiteral<"">>;
449
+ type: z.ZodLiteral<"TextColor">;
450
+ }, "strict", z.ZodTypeAny, {
451
+ type: "TextColor";
452
+ starts: number[];
453
+ ends: number[];
454
+ link?: "" | undefined;
455
+ attributes?: {
456
+ color: string;
457
+ } | undefined;
458
+ }, {
459
+ type: "TextColor";
460
+ starts: number[];
461
+ ends: number[];
462
+ link?: "" | undefined;
463
+ attributes?: {
464
+ color: string;
465
+ } | undefined;
466
+ }>, z.ZodObject<{
467
+ attributes: z.ZodOptional<z.ZodObject<{
468
+ color: z.ZodString;
469
+ }, "strip", z.ZodTypeAny, {
470
+ color: string;
471
+ }, {
472
+ color: string;
473
+ }>>;
474
+ starts: z.ZodArray<z.ZodNumber, "many">;
475
+ ends: z.ZodArray<z.ZodNumber, "many">;
476
+ link: z.ZodOptional<z.ZodLiteral<"">>;
477
+ type: z.ZodLiteral<"BackgroundColor">;
478
+ }, "strict", z.ZodTypeAny, {
479
+ type: "BackgroundColor";
480
+ starts: number[];
481
+ ends: number[];
482
+ link?: "" | undefined;
483
+ attributes?: {
484
+ color: string;
485
+ } | undefined;
486
+ }, {
487
+ type: "BackgroundColor";
488
+ starts: number[];
489
+ ends: number[];
490
+ link?: "" | undefined;
491
+ attributes?: {
492
+ color: string;
493
+ } | undefined;
380
494
  }>]>;
381
495
  export type HMAnnotation = z.infer<typeof HMAnnotationSchema>;
382
496
  export type BoldAnnotation = z.infer<typeof BoldAnnotationSchema>;
@@ -386,6 +500,8 @@ export type StrikeAnnotation = z.infer<typeof StrikeAnnotationSchema>;
386
500
  export type CodeAnnotation = z.infer<typeof CodeAnnotationSchema>;
387
501
  export type LinkAnnotation = z.infer<typeof LinkAnnotationSchema>;
388
502
  export type InlineEmbedAnnotation = z.infer<typeof InlineEmbedAnnotationSchema>;
503
+ export type TextColorAnnotation = z.infer<typeof TextColorAnnotationSchema>;
504
+ export type BackgroundColorAnnotation = z.infer<typeof BackgroundColorAnnotationSchema>;
389
505
  export declare const HMAnnotationsSchema: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
390
506
  starts: z.ZodArray<z.ZodNumber, "many">;
391
507
  ends: z.ZodArray<z.ZodNumber, "many">;
@@ -530,6 +646,62 @@ export declare const HMAnnotationsSchema: z.ZodOptional<z.ZodArray<z.ZodDiscrimi
530
646
  ends: number[];
531
647
  link?: "" | undefined;
532
648
  attributes?: {} | undefined;
649
+ }>, z.ZodObject<{
650
+ attributes: z.ZodOptional<z.ZodObject<{
651
+ color: z.ZodString;
652
+ }, "strip", z.ZodTypeAny, {
653
+ color: string;
654
+ }, {
655
+ color: string;
656
+ }>>;
657
+ starts: z.ZodArray<z.ZodNumber, "many">;
658
+ ends: z.ZodArray<z.ZodNumber, "many">;
659
+ link: z.ZodOptional<z.ZodLiteral<"">>;
660
+ type: z.ZodLiteral<"TextColor">;
661
+ }, "strict", z.ZodTypeAny, {
662
+ type: "TextColor";
663
+ starts: number[];
664
+ ends: number[];
665
+ link?: "" | undefined;
666
+ attributes?: {
667
+ color: string;
668
+ } | undefined;
669
+ }, {
670
+ type: "TextColor";
671
+ starts: number[];
672
+ ends: number[];
673
+ link?: "" | undefined;
674
+ attributes?: {
675
+ color: string;
676
+ } | undefined;
677
+ }>, z.ZodObject<{
678
+ attributes: z.ZodOptional<z.ZodObject<{
679
+ color: z.ZodString;
680
+ }, "strip", z.ZodTypeAny, {
681
+ color: string;
682
+ }, {
683
+ color: string;
684
+ }>>;
685
+ starts: z.ZodArray<z.ZodNumber, "many">;
686
+ ends: z.ZodArray<z.ZodNumber, "many">;
687
+ link: z.ZodOptional<z.ZodLiteral<"">>;
688
+ type: z.ZodLiteral<"BackgroundColor">;
689
+ }, "strict", z.ZodTypeAny, {
690
+ type: "BackgroundColor";
691
+ starts: number[];
692
+ ends: number[];
693
+ link?: "" | undefined;
694
+ attributes?: {
695
+ color: string;
696
+ } | undefined;
697
+ }, {
698
+ type: "BackgroundColor";
699
+ starts: number[];
700
+ ends: number[];
701
+ link?: "" | undefined;
702
+ attributes?: {
703
+ color: string;
704
+ } | undefined;
533
705
  }>]>, "many">>;
534
706
  export type HMAnnotations = z.infer<typeof HMAnnotationsSchema>;
535
707
  export declare const HMBlockParagraphSchema: z.ZodObject<{
@@ -688,6 +860,62 @@ export declare const HMBlockParagraphSchema: z.ZodObject<{
688
860
  ends: number[];
689
861
  link?: "" | undefined;
690
862
  attributes?: {} | undefined;
863
+ }>, z.ZodObject<{
864
+ attributes: z.ZodOptional<z.ZodObject<{
865
+ color: z.ZodString;
866
+ }, "strip", z.ZodTypeAny, {
867
+ color: string;
868
+ }, {
869
+ color: string;
870
+ }>>;
871
+ starts: z.ZodArray<z.ZodNumber, "many">;
872
+ ends: z.ZodArray<z.ZodNumber, "many">;
873
+ link: z.ZodOptional<z.ZodLiteral<"">>;
874
+ type: z.ZodLiteral<"TextColor">;
875
+ }, "strict", z.ZodTypeAny, {
876
+ type: "TextColor";
877
+ starts: number[];
878
+ ends: number[];
879
+ link?: "" | undefined;
880
+ attributes?: {
881
+ color: string;
882
+ } | undefined;
883
+ }, {
884
+ type: "TextColor";
885
+ starts: number[];
886
+ ends: number[];
887
+ link?: "" | undefined;
888
+ attributes?: {
889
+ color: string;
890
+ } | undefined;
891
+ }>, z.ZodObject<{
892
+ attributes: z.ZodOptional<z.ZodObject<{
893
+ color: z.ZodString;
894
+ }, "strip", z.ZodTypeAny, {
895
+ color: string;
896
+ }, {
897
+ color: string;
898
+ }>>;
899
+ starts: z.ZodArray<z.ZodNumber, "many">;
900
+ ends: z.ZodArray<z.ZodNumber, "many">;
901
+ link: z.ZodOptional<z.ZodLiteral<"">>;
902
+ type: z.ZodLiteral<"BackgroundColor">;
903
+ }, "strict", z.ZodTypeAny, {
904
+ type: "BackgroundColor";
905
+ starts: number[];
906
+ ends: number[];
907
+ link?: "" | undefined;
908
+ attributes?: {
909
+ color: string;
910
+ } | undefined;
911
+ }, {
912
+ type: "BackgroundColor";
913
+ starts: number[];
914
+ ends: number[];
915
+ link?: "" | undefined;
916
+ attributes?: {
917
+ color: string;
918
+ } | undefined;
691
919
  }>]>, "many">>;
692
920
  id: z.ZodString;
693
921
  revision: z.ZodOptional<z.ZodString>;
@@ -750,6 +978,22 @@ export declare const HMBlockParagraphSchema: z.ZodObject<{
750
978
  ends: number[];
751
979
  link?: "" | undefined;
752
980
  attributes?: {} | undefined;
981
+ } | {
982
+ type: "TextColor";
983
+ starts: number[];
984
+ ends: number[];
985
+ link?: "" | undefined;
986
+ attributes?: {
987
+ color: string;
988
+ } | undefined;
989
+ } | {
990
+ type: "BackgroundColor";
991
+ starts: number[];
992
+ ends: number[];
993
+ link?: "" | undefined;
994
+ attributes?: {
995
+ color: string;
996
+ } | undefined;
753
997
  })[] | undefined;
754
998
  revision?: string | undefined;
755
999
  }, {
@@ -809,6 +1053,22 @@ export declare const HMBlockParagraphSchema: z.ZodObject<{
809
1053
  ends: number[];
810
1054
  link?: "" | undefined;
811
1055
  attributes?: {} | undefined;
1056
+ } | {
1057
+ type: "TextColor";
1058
+ starts: number[];
1059
+ ends: number[];
1060
+ link?: "" | undefined;
1061
+ attributes?: {
1062
+ color: string;
1063
+ } | undefined;
1064
+ } | {
1065
+ type: "BackgroundColor";
1066
+ starts: number[];
1067
+ ends: number[];
1068
+ link?: "" | undefined;
1069
+ attributes?: {
1070
+ color: string;
1071
+ } | undefined;
812
1072
  })[] | undefined;
813
1073
  revision?: string | undefined;
814
1074
  }>;
@@ -968,6 +1228,62 @@ export declare const HMBlockHeadingSchema: z.ZodObject<{
968
1228
  ends: number[];
969
1229
  link?: "" | undefined;
970
1230
  attributes?: {} | undefined;
1231
+ }>, z.ZodObject<{
1232
+ attributes: z.ZodOptional<z.ZodObject<{
1233
+ color: z.ZodString;
1234
+ }, "strip", z.ZodTypeAny, {
1235
+ color: string;
1236
+ }, {
1237
+ color: string;
1238
+ }>>;
1239
+ starts: z.ZodArray<z.ZodNumber, "many">;
1240
+ ends: z.ZodArray<z.ZodNumber, "many">;
1241
+ link: z.ZodOptional<z.ZodLiteral<"">>;
1242
+ type: z.ZodLiteral<"TextColor">;
1243
+ }, "strict", z.ZodTypeAny, {
1244
+ type: "TextColor";
1245
+ starts: number[];
1246
+ ends: number[];
1247
+ link?: "" | undefined;
1248
+ attributes?: {
1249
+ color: string;
1250
+ } | undefined;
1251
+ }, {
1252
+ type: "TextColor";
1253
+ starts: number[];
1254
+ ends: number[];
1255
+ link?: "" | undefined;
1256
+ attributes?: {
1257
+ color: string;
1258
+ } | undefined;
1259
+ }>, z.ZodObject<{
1260
+ attributes: z.ZodOptional<z.ZodObject<{
1261
+ color: z.ZodString;
1262
+ }, "strip", z.ZodTypeAny, {
1263
+ color: string;
1264
+ }, {
1265
+ color: string;
1266
+ }>>;
1267
+ starts: z.ZodArray<z.ZodNumber, "many">;
1268
+ ends: z.ZodArray<z.ZodNumber, "many">;
1269
+ link: z.ZodOptional<z.ZodLiteral<"">>;
1270
+ type: z.ZodLiteral<"BackgroundColor">;
1271
+ }, "strict", z.ZodTypeAny, {
1272
+ type: "BackgroundColor";
1273
+ starts: number[];
1274
+ ends: number[];
1275
+ link?: "" | undefined;
1276
+ attributes?: {
1277
+ color: string;
1278
+ } | undefined;
1279
+ }, {
1280
+ type: "BackgroundColor";
1281
+ starts: number[];
1282
+ ends: number[];
1283
+ link?: "" | undefined;
1284
+ attributes?: {
1285
+ color: string;
1286
+ } | undefined;
971
1287
  }>]>, "many">>;
972
1288
  id: z.ZodString;
973
1289
  revision: z.ZodOptional<z.ZodString>;
@@ -1030,6 +1346,22 @@ export declare const HMBlockHeadingSchema: z.ZodObject<{
1030
1346
  ends: number[];
1031
1347
  link?: "" | undefined;
1032
1348
  attributes?: {} | undefined;
1349
+ } | {
1350
+ type: "TextColor";
1351
+ starts: number[];
1352
+ ends: number[];
1353
+ link?: "" | undefined;
1354
+ attributes?: {
1355
+ color: string;
1356
+ } | undefined;
1357
+ } | {
1358
+ type: "BackgroundColor";
1359
+ starts: number[];
1360
+ ends: number[];
1361
+ link?: "" | undefined;
1362
+ attributes?: {
1363
+ color: string;
1364
+ } | undefined;
1033
1365
  })[] | undefined;
1034
1366
  revision?: string | undefined;
1035
1367
  }, {
@@ -1089,6 +1421,22 @@ export declare const HMBlockHeadingSchema: z.ZodObject<{
1089
1421
  ends: number[];
1090
1422
  link?: "" | undefined;
1091
1423
  attributes?: {} | undefined;
1424
+ } | {
1425
+ type: "TextColor";
1426
+ starts: number[];
1427
+ ends: number[];
1428
+ link?: "" | undefined;
1429
+ attributes?: {
1430
+ color: string;
1431
+ } | undefined;
1432
+ } | {
1433
+ type: "BackgroundColor";
1434
+ starts: number[];
1435
+ ends: number[];
1436
+ link?: "" | undefined;
1437
+ attributes?: {
1438
+ color: string;
1439
+ } | undefined;
1092
1440
  })[] | undefined;
1093
1441
  revision?: string | undefined;
1094
1442
  }>;
@@ -1341,6 +1689,62 @@ export declare const HMBlockImageSchema: z.ZodObject<{
1341
1689
  ends: number[];
1342
1690
  link?: "" | undefined;
1343
1691
  attributes?: {} | undefined;
1692
+ }>, z.ZodObject<{
1693
+ attributes: z.ZodOptional<z.ZodObject<{
1694
+ color: z.ZodString;
1695
+ }, "strip", z.ZodTypeAny, {
1696
+ color: string;
1697
+ }, {
1698
+ color: string;
1699
+ }>>;
1700
+ starts: z.ZodArray<z.ZodNumber, "many">;
1701
+ ends: z.ZodArray<z.ZodNumber, "many">;
1702
+ link: z.ZodOptional<z.ZodLiteral<"">>;
1703
+ type: z.ZodLiteral<"TextColor">;
1704
+ }, "strict", z.ZodTypeAny, {
1705
+ type: "TextColor";
1706
+ starts: number[];
1707
+ ends: number[];
1708
+ link?: "" | undefined;
1709
+ attributes?: {
1710
+ color: string;
1711
+ } | undefined;
1712
+ }, {
1713
+ type: "TextColor";
1714
+ starts: number[];
1715
+ ends: number[];
1716
+ link?: "" | undefined;
1717
+ attributes?: {
1718
+ color: string;
1719
+ } | undefined;
1720
+ }>, z.ZodObject<{
1721
+ attributes: z.ZodOptional<z.ZodObject<{
1722
+ color: z.ZodString;
1723
+ }, "strip", z.ZodTypeAny, {
1724
+ color: string;
1725
+ }, {
1726
+ color: string;
1727
+ }>>;
1728
+ starts: z.ZodArray<z.ZodNumber, "many">;
1729
+ ends: z.ZodArray<z.ZodNumber, "many">;
1730
+ link: z.ZodOptional<z.ZodLiteral<"">>;
1731
+ type: z.ZodLiteral<"BackgroundColor">;
1732
+ }, "strict", z.ZodTypeAny, {
1733
+ type: "BackgroundColor";
1734
+ starts: number[];
1735
+ ends: number[];
1736
+ link?: "" | undefined;
1737
+ attributes?: {
1738
+ color: string;
1739
+ } | undefined;
1740
+ }, {
1741
+ type: "BackgroundColor";
1742
+ starts: number[];
1743
+ ends: number[];
1744
+ link?: "" | undefined;
1745
+ attributes?: {
1746
+ color: string;
1747
+ } | undefined;
1344
1748
  }>]>, "many">>;
1345
1749
  id: z.ZodString;
1346
1750
  revision: z.ZodOptional<z.ZodString>;
@@ -1404,6 +1808,22 @@ export declare const HMBlockImageSchema: z.ZodObject<{
1404
1808
  ends: number[];
1405
1809
  link?: "" | undefined;
1406
1810
  attributes?: {} | undefined;
1811
+ } | {
1812
+ type: "TextColor";
1813
+ starts: number[];
1814
+ ends: number[];
1815
+ link?: "" | undefined;
1816
+ attributes?: {
1817
+ color: string;
1818
+ } | undefined;
1819
+ } | {
1820
+ type: "BackgroundColor";
1821
+ starts: number[];
1822
+ ends: number[];
1823
+ link?: "" | undefined;
1824
+ attributes?: {
1825
+ color: string;
1826
+ } | undefined;
1407
1827
  })[] | undefined;
1408
1828
  revision?: string | undefined;
1409
1829
  }, {
@@ -1465,6 +1885,22 @@ export declare const HMBlockImageSchema: z.ZodObject<{
1465
1885
  ends: number[];
1466
1886
  link?: "" | undefined;
1467
1887
  attributes?: {} | undefined;
1888
+ } | {
1889
+ type: "TextColor";
1890
+ starts: number[];
1891
+ ends: number[];
1892
+ link?: "" | undefined;
1893
+ attributes?: {
1894
+ color: string;
1895
+ } | undefined;
1896
+ } | {
1897
+ type: "BackgroundColor";
1898
+ starts: number[];
1899
+ ends: number[];
1900
+ link?: "" | undefined;
1901
+ attributes?: {
1902
+ color: string;
1903
+ } | undefined;
1468
1904
  })[] | undefined;
1469
1905
  revision?: string | undefined;
1470
1906
  }>;
@@ -5057,6 +5493,62 @@ export declare const HMBlockKnownSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
5057
5493
  ends: number[];
5058
5494
  link?: "" | undefined;
5059
5495
  attributes?: {} | undefined;
5496
+ }>, z.ZodObject<{
5497
+ attributes: z.ZodOptional<z.ZodObject<{
5498
+ color: z.ZodString;
5499
+ }, "strip", z.ZodTypeAny, {
5500
+ color: string;
5501
+ }, {
5502
+ color: string;
5503
+ }>>;
5504
+ starts: z.ZodArray<z.ZodNumber, "many">;
5505
+ ends: z.ZodArray<z.ZodNumber, "many">;
5506
+ link: z.ZodOptional<z.ZodLiteral<"">>;
5507
+ type: z.ZodLiteral<"TextColor">;
5508
+ }, "strict", z.ZodTypeAny, {
5509
+ type: "TextColor";
5510
+ starts: number[];
5511
+ ends: number[];
5512
+ link?: "" | undefined;
5513
+ attributes?: {
5514
+ color: string;
5515
+ } | undefined;
5516
+ }, {
5517
+ type: "TextColor";
5518
+ starts: number[];
5519
+ ends: number[];
5520
+ link?: "" | undefined;
5521
+ attributes?: {
5522
+ color: string;
5523
+ } | undefined;
5524
+ }>, z.ZodObject<{
5525
+ attributes: z.ZodOptional<z.ZodObject<{
5526
+ color: z.ZodString;
5527
+ }, "strip", z.ZodTypeAny, {
5528
+ color: string;
5529
+ }, {
5530
+ color: string;
5531
+ }>>;
5532
+ starts: z.ZodArray<z.ZodNumber, "many">;
5533
+ ends: z.ZodArray<z.ZodNumber, "many">;
5534
+ link: z.ZodOptional<z.ZodLiteral<"">>;
5535
+ type: z.ZodLiteral<"BackgroundColor">;
5536
+ }, "strict", z.ZodTypeAny, {
5537
+ type: "BackgroundColor";
5538
+ starts: number[];
5539
+ ends: number[];
5540
+ link?: "" | undefined;
5541
+ attributes?: {
5542
+ color: string;
5543
+ } | undefined;
5544
+ }, {
5545
+ type: "BackgroundColor";
5546
+ starts: number[];
5547
+ ends: number[];
5548
+ link?: "" | undefined;
5549
+ attributes?: {
5550
+ color: string;
5551
+ } | undefined;
5060
5552
  }>]>, "many">>;
5061
5553
  id: z.ZodString;
5062
5554
  revision: z.ZodOptional<z.ZodString>;
@@ -5119,6 +5611,22 @@ export declare const HMBlockKnownSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
5119
5611
  ends: number[];
5120
5612
  link?: "" | undefined;
5121
5613
  attributes?: {} | undefined;
5614
+ } | {
5615
+ type: "TextColor";
5616
+ starts: number[];
5617
+ ends: number[];
5618
+ link?: "" | undefined;
5619
+ attributes?: {
5620
+ color: string;
5621
+ } | undefined;
5622
+ } | {
5623
+ type: "BackgroundColor";
5624
+ starts: number[];
5625
+ ends: number[];
5626
+ link?: "" | undefined;
5627
+ attributes?: {
5628
+ color: string;
5629
+ } | undefined;
5122
5630
  })[] | undefined;
5123
5631
  revision?: string | undefined;
5124
5632
  }, {
@@ -5178,6 +5686,22 @@ export declare const HMBlockKnownSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
5178
5686
  ends: number[];
5179
5687
  link?: "" | undefined;
5180
5688
  attributes?: {} | undefined;
5689
+ } | {
5690
+ type: "TextColor";
5691
+ starts: number[];
5692
+ ends: number[];
5693
+ link?: "" | undefined;
5694
+ attributes?: {
5695
+ color: string;
5696
+ } | undefined;
5697
+ } | {
5698
+ type: "BackgroundColor";
5699
+ starts: number[];
5700
+ ends: number[];
5701
+ link?: "" | undefined;
5702
+ attributes?: {
5703
+ color: string;
5704
+ } | undefined;
5181
5705
  })[] | undefined;
5182
5706
  revision?: string | undefined;
5183
5707
  }>, z.ZodObject<{
@@ -5311,31 +5835,87 @@ export declare const HMBlockKnownSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
5311
5835
  type: "Embed";
5312
5836
  starts: number[];
5313
5837
  ends: number[];
5314
- attributes?: {} | undefined;
5838
+ attributes?: {} | undefined;
5839
+ }, {
5840
+ link: string;
5841
+ type: "Embed";
5842
+ starts: number[];
5843
+ ends: number[];
5844
+ attributes?: {} | undefined;
5845
+ }>, z.ZodObject<{
5846
+ starts: z.ZodArray<z.ZodNumber, "many">;
5847
+ ends: z.ZodArray<z.ZodNumber, "many">;
5848
+ attributes: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
5849
+ link: z.ZodOptional<z.ZodLiteral<"">>;
5850
+ type: z.ZodLiteral<"Range">;
5851
+ }, "strict", z.ZodTypeAny, {
5852
+ type: "Range";
5853
+ starts: number[];
5854
+ ends: number[];
5855
+ link?: "" | undefined;
5856
+ attributes?: {} | undefined;
5857
+ }, {
5858
+ type: "Range";
5859
+ starts: number[];
5860
+ ends: number[];
5861
+ link?: "" | undefined;
5862
+ attributes?: {} | undefined;
5863
+ }>, z.ZodObject<{
5864
+ attributes: z.ZodOptional<z.ZodObject<{
5865
+ color: z.ZodString;
5866
+ }, "strip", z.ZodTypeAny, {
5867
+ color: string;
5868
+ }, {
5869
+ color: string;
5870
+ }>>;
5871
+ starts: z.ZodArray<z.ZodNumber, "many">;
5872
+ ends: z.ZodArray<z.ZodNumber, "many">;
5873
+ link: z.ZodOptional<z.ZodLiteral<"">>;
5874
+ type: z.ZodLiteral<"TextColor">;
5875
+ }, "strict", z.ZodTypeAny, {
5876
+ type: "TextColor";
5877
+ starts: number[];
5878
+ ends: number[];
5879
+ link?: "" | undefined;
5880
+ attributes?: {
5881
+ color: string;
5882
+ } | undefined;
5315
5883
  }, {
5316
- link: string;
5317
- type: "Embed";
5884
+ type: "TextColor";
5318
5885
  starts: number[];
5319
5886
  ends: number[];
5320
- attributes?: {} | undefined;
5887
+ link?: "" | undefined;
5888
+ attributes?: {
5889
+ color: string;
5890
+ } | undefined;
5321
5891
  }>, z.ZodObject<{
5892
+ attributes: z.ZodOptional<z.ZodObject<{
5893
+ color: z.ZodString;
5894
+ }, "strip", z.ZodTypeAny, {
5895
+ color: string;
5896
+ }, {
5897
+ color: string;
5898
+ }>>;
5322
5899
  starts: z.ZodArray<z.ZodNumber, "many">;
5323
5900
  ends: z.ZodArray<z.ZodNumber, "many">;
5324
- attributes: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
5325
5901
  link: z.ZodOptional<z.ZodLiteral<"">>;
5326
- type: z.ZodLiteral<"Range">;
5902
+ type: z.ZodLiteral<"BackgroundColor">;
5327
5903
  }, "strict", z.ZodTypeAny, {
5328
- type: "Range";
5904
+ type: "BackgroundColor";
5329
5905
  starts: number[];
5330
5906
  ends: number[];
5331
5907
  link?: "" | undefined;
5332
- attributes?: {} | undefined;
5908
+ attributes?: {
5909
+ color: string;
5910
+ } | undefined;
5333
5911
  }, {
5334
- type: "Range";
5912
+ type: "BackgroundColor";
5335
5913
  starts: number[];
5336
5914
  ends: number[];
5337
5915
  link?: "" | undefined;
5338
- attributes?: {} | undefined;
5916
+ attributes?: {
5917
+ color: string;
5918
+ } | undefined;
5339
5919
  }>]>, "many">>;
5340
5920
  id: z.ZodString;
5341
5921
  revision: z.ZodOptional<z.ZodString>;
@@ -5398,6 +5978,22 @@ export declare const HMBlockKnownSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
5398
5978
  ends: number[];
5399
5979
  link?: "" | undefined;
5400
5980
  attributes?: {} | undefined;
5981
+ } | {
5982
+ type: "TextColor";
5983
+ starts: number[];
5984
+ ends: number[];
5985
+ link?: "" | undefined;
5986
+ attributes?: {
5987
+ color: string;
5988
+ } | undefined;
5989
+ } | {
5990
+ type: "BackgroundColor";
5991
+ starts: number[];
5992
+ ends: number[];
5993
+ link?: "" | undefined;
5994
+ attributes?: {
5995
+ color: string;
5996
+ } | undefined;
5401
5997
  })[] | undefined;
5402
5998
  revision?: string | undefined;
5403
5999
  }, {
@@ -5457,6 +6053,22 @@ export declare const HMBlockKnownSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
5457
6053
  ends: number[];
5458
6054
  link?: "" | undefined;
5459
6055
  attributes?: {} | undefined;
6056
+ } | {
6057
+ type: "TextColor";
6058
+ starts: number[];
6059
+ ends: number[];
6060
+ link?: "" | undefined;
6061
+ attributes?: {
6062
+ color: string;
6063
+ } | undefined;
6064
+ } | {
6065
+ type: "BackgroundColor";
6066
+ starts: number[];
6067
+ ends: number[];
6068
+ link?: "" | undefined;
6069
+ attributes?: {
6070
+ color: string;
6071
+ } | undefined;
5460
6072
  })[] | undefined;
5461
6073
  revision?: string | undefined;
5462
6074
  }>, z.ZodObject<{
@@ -5705,6 +6317,62 @@ export declare const HMBlockKnownSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
5705
6317
  ends: number[];
5706
6318
  link?: "" | undefined;
5707
6319
  attributes?: {} | undefined;
6320
+ }>, z.ZodObject<{
6321
+ attributes: z.ZodOptional<z.ZodObject<{
6322
+ color: z.ZodString;
6323
+ }, "strip", z.ZodTypeAny, {
6324
+ color: string;
6325
+ }, {
6326
+ color: string;
6327
+ }>>;
6328
+ starts: z.ZodArray<z.ZodNumber, "many">;
6329
+ ends: z.ZodArray<z.ZodNumber, "many">;
6330
+ link: z.ZodOptional<z.ZodLiteral<"">>;
6331
+ type: z.ZodLiteral<"TextColor">;
6332
+ }, "strict", z.ZodTypeAny, {
6333
+ type: "TextColor";
6334
+ starts: number[];
6335
+ ends: number[];
6336
+ link?: "" | undefined;
6337
+ attributes?: {
6338
+ color: string;
6339
+ } | undefined;
6340
+ }, {
6341
+ type: "TextColor";
6342
+ starts: number[];
6343
+ ends: number[];
6344
+ link?: "" | undefined;
6345
+ attributes?: {
6346
+ color: string;
6347
+ } | undefined;
6348
+ }>, z.ZodObject<{
6349
+ attributes: z.ZodOptional<z.ZodObject<{
6350
+ color: z.ZodString;
6351
+ }, "strip", z.ZodTypeAny, {
6352
+ color: string;
6353
+ }, {
6354
+ color: string;
6355
+ }>>;
6356
+ starts: z.ZodArray<z.ZodNumber, "many">;
6357
+ ends: z.ZodArray<z.ZodNumber, "many">;
6358
+ link: z.ZodOptional<z.ZodLiteral<"">>;
6359
+ type: z.ZodLiteral<"BackgroundColor">;
6360
+ }, "strict", z.ZodTypeAny, {
6361
+ type: "BackgroundColor";
6362
+ starts: number[];
6363
+ ends: number[];
6364
+ link?: "" | undefined;
6365
+ attributes?: {
6366
+ color: string;
6367
+ } | undefined;
6368
+ }, {
6369
+ type: "BackgroundColor";
6370
+ starts: number[];
6371
+ ends: number[];
6372
+ link?: "" | undefined;
6373
+ attributes?: {
6374
+ color: string;
6375
+ } | undefined;
5708
6376
  }>]>, "many">>;
5709
6377
  id: z.ZodString;
5710
6378
  revision: z.ZodOptional<z.ZodString>;
@@ -5768,6 +6436,22 @@ export declare const HMBlockKnownSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
5768
6436
  ends: number[];
5769
6437
  link?: "" | undefined;
5770
6438
  attributes?: {} | undefined;
6439
+ } | {
6440
+ type: "TextColor";
6441
+ starts: number[];
6442
+ ends: number[];
6443
+ link?: "" | undefined;
6444
+ attributes?: {
6445
+ color: string;
6446
+ } | undefined;
6447
+ } | {
6448
+ type: "BackgroundColor";
6449
+ starts: number[];
6450
+ ends: number[];
6451
+ link?: "" | undefined;
6452
+ attributes?: {
6453
+ color: string;
6454
+ } | undefined;
5771
6455
  })[] | undefined;
5772
6456
  revision?: string | undefined;
5773
6457
  }, {
@@ -5829,6 +6513,22 @@ export declare const HMBlockKnownSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
5829
6513
  ends: number[];
5830
6514
  link?: "" | undefined;
5831
6515
  attributes?: {} | undefined;
6516
+ } | {
6517
+ type: "TextColor";
6518
+ starts: number[];
6519
+ ends: number[];
6520
+ link?: "" | undefined;
6521
+ attributes?: {
6522
+ color: string;
6523
+ } | undefined;
6524
+ } | {
6525
+ type: "BackgroundColor";
6526
+ starts: number[];
6527
+ ends: number[];
6528
+ link?: "" | undefined;
6529
+ attributes?: {
6530
+ color: string;
6531
+ } | undefined;
5832
6532
  })[] | undefined;
5833
6533
  revision?: string | undefined;
5834
6534
  }>, z.ZodObject<{
@@ -6436,6 +7136,62 @@ export declare const HMBlockSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"type",
6436
7136
  ends: number[];
6437
7137
  link?: "" | undefined;
6438
7138
  attributes?: {} | undefined;
7139
+ }>, z.ZodObject<{
7140
+ attributes: z.ZodOptional<z.ZodObject<{
7141
+ color: z.ZodString;
7142
+ }, "strip", z.ZodTypeAny, {
7143
+ color: string;
7144
+ }, {
7145
+ color: string;
7146
+ }>>;
7147
+ starts: z.ZodArray<z.ZodNumber, "many">;
7148
+ ends: z.ZodArray<z.ZodNumber, "many">;
7149
+ link: z.ZodOptional<z.ZodLiteral<"">>;
7150
+ type: z.ZodLiteral<"TextColor">;
7151
+ }, "strict", z.ZodTypeAny, {
7152
+ type: "TextColor";
7153
+ starts: number[];
7154
+ ends: number[];
7155
+ link?: "" | undefined;
7156
+ attributes?: {
7157
+ color: string;
7158
+ } | undefined;
7159
+ }, {
7160
+ type: "TextColor";
7161
+ starts: number[];
7162
+ ends: number[];
7163
+ link?: "" | undefined;
7164
+ attributes?: {
7165
+ color: string;
7166
+ } | undefined;
7167
+ }>, z.ZodObject<{
7168
+ attributes: z.ZodOptional<z.ZodObject<{
7169
+ color: z.ZodString;
7170
+ }, "strip", z.ZodTypeAny, {
7171
+ color: string;
7172
+ }, {
7173
+ color: string;
7174
+ }>>;
7175
+ starts: z.ZodArray<z.ZodNumber, "many">;
7176
+ ends: z.ZodArray<z.ZodNumber, "many">;
7177
+ link: z.ZodOptional<z.ZodLiteral<"">>;
7178
+ type: z.ZodLiteral<"BackgroundColor">;
7179
+ }, "strict", z.ZodTypeAny, {
7180
+ type: "BackgroundColor";
7181
+ starts: number[];
7182
+ ends: number[];
7183
+ link?: "" | undefined;
7184
+ attributes?: {
7185
+ color: string;
7186
+ } | undefined;
7187
+ }, {
7188
+ type: "BackgroundColor";
7189
+ starts: number[];
7190
+ ends: number[];
7191
+ link?: "" | undefined;
7192
+ attributes?: {
7193
+ color: string;
7194
+ } | undefined;
6439
7195
  }>]>, "many">>;
6440
7196
  id: z.ZodString;
6441
7197
  revision: z.ZodOptional<z.ZodString>;
@@ -6498,6 +7254,22 @@ export declare const HMBlockSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"type",
6498
7254
  ends: number[];
6499
7255
  link?: "" | undefined;
6500
7256
  attributes?: {} | undefined;
7257
+ } | {
7258
+ type: "TextColor";
7259
+ starts: number[];
7260
+ ends: number[];
7261
+ link?: "" | undefined;
7262
+ attributes?: {
7263
+ color: string;
7264
+ } | undefined;
7265
+ } | {
7266
+ type: "BackgroundColor";
7267
+ starts: number[];
7268
+ ends: number[];
7269
+ link?: "" | undefined;
7270
+ attributes?: {
7271
+ color: string;
7272
+ } | undefined;
6501
7273
  })[] | undefined;
6502
7274
  revision?: string | undefined;
6503
7275
  }, {
@@ -6557,6 +7329,22 @@ export declare const HMBlockSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"type",
6557
7329
  ends: number[];
6558
7330
  link?: "" | undefined;
6559
7331
  attributes?: {} | undefined;
7332
+ } | {
7333
+ type: "TextColor";
7334
+ starts: number[];
7335
+ ends: number[];
7336
+ link?: "" | undefined;
7337
+ attributes?: {
7338
+ color: string;
7339
+ } | undefined;
7340
+ } | {
7341
+ type: "BackgroundColor";
7342
+ starts: number[];
7343
+ ends: number[];
7344
+ link?: "" | undefined;
7345
+ attributes?: {
7346
+ color: string;
7347
+ } | undefined;
6560
7348
  })[] | undefined;
6561
7349
  revision?: string | undefined;
6562
7350
  }>, z.ZodObject<{
@@ -6715,6 +7503,62 @@ export declare const HMBlockSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"type",
6715
7503
  ends: number[];
6716
7504
  link?: "" | undefined;
6717
7505
  attributes?: {} | undefined;
7506
+ }>, z.ZodObject<{
7507
+ attributes: z.ZodOptional<z.ZodObject<{
7508
+ color: z.ZodString;
7509
+ }, "strip", z.ZodTypeAny, {
7510
+ color: string;
7511
+ }, {
7512
+ color: string;
7513
+ }>>;
7514
+ starts: z.ZodArray<z.ZodNumber, "many">;
7515
+ ends: z.ZodArray<z.ZodNumber, "many">;
7516
+ link: z.ZodOptional<z.ZodLiteral<"">>;
7517
+ type: z.ZodLiteral<"TextColor">;
7518
+ }, "strict", z.ZodTypeAny, {
7519
+ type: "TextColor";
7520
+ starts: number[];
7521
+ ends: number[];
7522
+ link?: "" | undefined;
7523
+ attributes?: {
7524
+ color: string;
7525
+ } | undefined;
7526
+ }, {
7527
+ type: "TextColor";
7528
+ starts: number[];
7529
+ ends: number[];
7530
+ link?: "" | undefined;
7531
+ attributes?: {
7532
+ color: string;
7533
+ } | undefined;
7534
+ }>, z.ZodObject<{
7535
+ attributes: z.ZodOptional<z.ZodObject<{
7536
+ color: z.ZodString;
7537
+ }, "strip", z.ZodTypeAny, {
7538
+ color: string;
7539
+ }, {
7540
+ color: string;
7541
+ }>>;
7542
+ starts: z.ZodArray<z.ZodNumber, "many">;
7543
+ ends: z.ZodArray<z.ZodNumber, "many">;
7544
+ link: z.ZodOptional<z.ZodLiteral<"">>;
7545
+ type: z.ZodLiteral<"BackgroundColor">;
7546
+ }, "strict", z.ZodTypeAny, {
7547
+ type: "BackgroundColor";
7548
+ starts: number[];
7549
+ ends: number[];
7550
+ link?: "" | undefined;
7551
+ attributes?: {
7552
+ color: string;
7553
+ } | undefined;
7554
+ }, {
7555
+ type: "BackgroundColor";
7556
+ starts: number[];
7557
+ ends: number[];
7558
+ link?: "" | undefined;
7559
+ attributes?: {
7560
+ color: string;
7561
+ } | undefined;
6718
7562
  }>]>, "many">>;
6719
7563
  id: z.ZodString;
6720
7564
  revision: z.ZodOptional<z.ZodString>;
@@ -6777,6 +7621,22 @@ export declare const HMBlockSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"type",
6777
7621
  ends: number[];
6778
7622
  link?: "" | undefined;
6779
7623
  attributes?: {} | undefined;
7624
+ } | {
7625
+ type: "TextColor";
7626
+ starts: number[];
7627
+ ends: number[];
7628
+ link?: "" | undefined;
7629
+ attributes?: {
7630
+ color: string;
7631
+ } | undefined;
7632
+ } | {
7633
+ type: "BackgroundColor";
7634
+ starts: number[];
7635
+ ends: number[];
7636
+ link?: "" | undefined;
7637
+ attributes?: {
7638
+ color: string;
7639
+ } | undefined;
6780
7640
  })[] | undefined;
6781
7641
  revision?: string | undefined;
6782
7642
  }, {
@@ -6836,6 +7696,22 @@ export declare const HMBlockSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"type",
6836
7696
  ends: number[];
6837
7697
  link?: "" | undefined;
6838
7698
  attributes?: {} | undefined;
7699
+ } | {
7700
+ type: "TextColor";
7701
+ starts: number[];
7702
+ ends: number[];
7703
+ link?: "" | undefined;
7704
+ attributes?: {
7705
+ color: string;
7706
+ } | undefined;
7707
+ } | {
7708
+ type: "BackgroundColor";
7709
+ starts: number[];
7710
+ ends: number[];
7711
+ link?: "" | undefined;
7712
+ attributes?: {
7713
+ color: string;
7714
+ } | undefined;
6839
7715
  })[] | undefined;
6840
7716
  revision?: string | undefined;
6841
7717
  }>, z.ZodObject<{
@@ -7084,6 +7960,62 @@ export declare const HMBlockSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"type",
7084
7960
  ends: number[];
7085
7961
  link?: "" | undefined;
7086
7962
  attributes?: {} | undefined;
7963
+ }>, z.ZodObject<{
7964
+ attributes: z.ZodOptional<z.ZodObject<{
7965
+ color: z.ZodString;
7966
+ }, "strip", z.ZodTypeAny, {
7967
+ color: string;
7968
+ }, {
7969
+ color: string;
7970
+ }>>;
7971
+ starts: z.ZodArray<z.ZodNumber, "many">;
7972
+ ends: z.ZodArray<z.ZodNumber, "many">;
7973
+ link: z.ZodOptional<z.ZodLiteral<"">>;
7974
+ type: z.ZodLiteral<"TextColor">;
7975
+ }, "strict", z.ZodTypeAny, {
7976
+ type: "TextColor";
7977
+ starts: number[];
7978
+ ends: number[];
7979
+ link?: "" | undefined;
7980
+ attributes?: {
7981
+ color: string;
7982
+ } | undefined;
7983
+ }, {
7984
+ type: "TextColor";
7985
+ starts: number[];
7986
+ ends: number[];
7987
+ link?: "" | undefined;
7988
+ attributes?: {
7989
+ color: string;
7990
+ } | undefined;
7991
+ }>, z.ZodObject<{
7992
+ attributes: z.ZodOptional<z.ZodObject<{
7993
+ color: z.ZodString;
7994
+ }, "strip", z.ZodTypeAny, {
7995
+ color: string;
7996
+ }, {
7997
+ color: string;
7998
+ }>>;
7999
+ starts: z.ZodArray<z.ZodNumber, "many">;
8000
+ ends: z.ZodArray<z.ZodNumber, "many">;
8001
+ link: z.ZodOptional<z.ZodLiteral<"">>;
8002
+ type: z.ZodLiteral<"BackgroundColor">;
8003
+ }, "strict", z.ZodTypeAny, {
8004
+ type: "BackgroundColor";
8005
+ starts: number[];
8006
+ ends: number[];
8007
+ link?: "" | undefined;
8008
+ attributes?: {
8009
+ color: string;
8010
+ } | undefined;
8011
+ }, {
8012
+ type: "BackgroundColor";
8013
+ starts: number[];
8014
+ ends: number[];
8015
+ link?: "" | undefined;
8016
+ attributes?: {
8017
+ color: string;
8018
+ } | undefined;
7087
8019
  }>]>, "many">>;
7088
8020
  id: z.ZodString;
7089
8021
  revision: z.ZodOptional<z.ZodString>;
@@ -7147,6 +8079,22 @@ export declare const HMBlockSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"type",
7147
8079
  ends: number[];
7148
8080
  link?: "" | undefined;
7149
8081
  attributes?: {} | undefined;
8082
+ } | {
8083
+ type: "TextColor";
8084
+ starts: number[];
8085
+ ends: number[];
8086
+ link?: "" | undefined;
8087
+ attributes?: {
8088
+ color: string;
8089
+ } | undefined;
8090
+ } | {
8091
+ type: "BackgroundColor";
8092
+ starts: number[];
8093
+ ends: number[];
8094
+ link?: "" | undefined;
8095
+ attributes?: {
8096
+ color: string;
8097
+ } | undefined;
7150
8098
  })[] | undefined;
7151
8099
  revision?: string | undefined;
7152
8100
  }, {
@@ -7208,6 +8156,22 @@ export declare const HMBlockSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"type",
7208
8156
  ends: number[];
7209
8157
  link?: "" | undefined;
7210
8158
  attributes?: {} | undefined;
8159
+ } | {
8160
+ type: "TextColor";
8161
+ starts: number[];
8162
+ ends: number[];
8163
+ link?: "" | undefined;
8164
+ attributes?: {
8165
+ color: string;
8166
+ } | undefined;
8167
+ } | {
8168
+ type: "BackgroundColor";
8169
+ starts: number[];
8170
+ ends: number[];
8171
+ link?: "" | undefined;
8172
+ attributes?: {
8173
+ color: string;
8174
+ } | undefined;
7211
8175
  })[] | undefined;
7212
8176
  revision?: string | undefined;
7213
8177
  }>, z.ZodObject<{
package/dist/hm-types.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import {
2
+ BackgroundColorAnnotationSchema,
2
3
  BlockRangeSchema,
3
4
  BoldAnnotationSchema,
4
5
  CodeAnnotationSchema,
@@ -147,6 +148,7 @@ import {
147
148
  LinkAnnotationSchema,
148
149
  ParsedFragmentSchema,
149
150
  StrikeAnnotationSchema,
151
+ TextColorAnnotationSchema,
150
152
  UnderlineAnnotationSchema,
151
153
  codePointLength,
152
154
  entityQueryPathToHmIdPath,
@@ -165,8 +167,9 @@ import {
165
167
  toNumber,
166
168
  unpackHmId,
167
169
  unpackedHmIdSchema
168
- } from "./chunk-6HDGDXUX.mjs";
170
+ } from "./chunk-RDTEH34P.mjs";
169
171
  export {
172
+ BackgroundColorAnnotationSchema,
170
173
  BlockRangeSchema,
171
174
  BoldAnnotationSchema,
172
175
  CodeAnnotationSchema,
@@ -315,6 +318,7 @@ export {
315
318
  LinkAnnotationSchema,
316
319
  ParsedFragmentSchema,
317
320
  StrikeAnnotationSchema,
321
+ TextColorAnnotationSchema,
318
322
  UnderlineAnnotationSchema,
319
323
  codePointLength,
320
324
  entityQueryPathToHmIdPath,
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  serializeBlockRange,
18
18
  toNumber,
19
19
  unpackHmId
20
- } from "./chunk-6HDGDXUX.mjs";
20
+ } from "./chunk-RDTEH34P.mjs";
21
21
 
22
22
  // src/capability.ts
23
23
  import { encode as cborEncode2 } from "@ipld/dag-cbor";
@@ -372,7 +372,7 @@ var QUERY_PARAM_SERIALIZERS = {
372
372
  function createSeedClient(baseUrl, options) {
373
373
  const normalizedBaseUrl = baseUrl.replace(/\/+$/, "");
374
374
  const fetchFn = (options == null ? void 0 : options.fetch) ?? globalThis.fetch;
375
- const defaultHeaders = (options == null ? void 0 : options.headers) ?? {};
375
+ const getDefaultHeaders = async () => typeof (options == null ? void 0 : options.headers) === "function" ? await options.headers() : (options == null ? void 0 : options.headers) ?? {};
376
376
  async function request(key, input) {
377
377
  const requestSchema = HMRequestSchema.options.find((schema) => schema.shape.key.value === key);
378
378
  if (!requestSchema) {
@@ -385,6 +385,7 @@ function createSeedClient(baseUrl, options) {
385
385
  throw new SeedValidationError(`Invalid input for ${key}: ${err instanceof Error ? err.message : String(err)}`);
386
386
  }
387
387
  let response;
388
+ const defaultHeaders = await getDefaultHeaders();
388
389
  const isAction = HMActionSchema.options.some((s) => s.shape.key.value === key);
389
390
  if (isAction) {
390
391
  const url = `${normalizedBaseUrl}/api/${key}`;
@@ -3446,6 +3447,9 @@ var AnnotationSet = class {
3446
3447
  if (attributes.href) {
3447
3448
  return `${type}-${attributes.href}`;
3448
3449
  }
3450
+ if (attributes.color) {
3451
+ return `${type}-${attributes.color}`;
3452
+ }
3449
3453
  }
3450
3454
  return type;
3451
3455
  }
@@ -3503,7 +3507,7 @@ function toHMBlockType(editorBlockType) {
3503
3507
  return void 0;
3504
3508
  }
3505
3509
  function editorBlockToHMBlock(editorBlock) {
3506
- var _a, _b, _c, _d, _e, _f;
3510
+ var _a, _b, _c, _d, _e, _f, _g, _h;
3507
3511
  const blockType = toHMBlockType(editorBlock.type);
3508
3512
  if (!blockType) throw new Error("Unsupported block type " + editorBlock.type);
3509
3513
  let block = {
@@ -3558,6 +3562,12 @@ function editorBlockToHMBlock(editorBlock) {
3558
3562
  if (leaf.type == "link") {
3559
3563
  annotations.addSpan("Link", { link: leaf.href }, start, end);
3560
3564
  }
3565
+ if ((_g = leaf.styles) == null ? void 0 : _g.textColor) {
3566
+ annotations.addSpan("TextColor", { color: leaf.styles.textColor }, start, end);
3567
+ }
3568
+ if ((_h = leaf.styles) == null ? void 0 : _h.backgroundColor) {
3569
+ annotations.addSpan("BackgroundColor", { color: leaf.styles.backgroundColor }, start, end);
3570
+ }
3561
3571
  block.text += leaf.text;
3562
3572
  pos += charCount;
3563
3573
  }
@@ -3895,6 +3905,7 @@ function hmBlockToEditorBlock(block) {
3895
3905
  i += codeUnits;
3896
3906
  }
3897
3907
  function startLeaf(posAnnotations) {
3908
+ var _a2, _b2;
3898
3909
  const newLeaf = {
3899
3910
  type: "text",
3900
3911
  text: "",
@@ -3920,6 +3931,20 @@ function hmBlockToEditorBlock(block) {
3920
3931
  const styleKey = annotationData.type.toLowerCase();
3921
3932
  newLeaf.styles[styleKey] = true;
3922
3933
  }
3934
+ if (annotationData.type === "TextColor") {
3935
+ const color = (_a2 = annotationData.attributes) == null ? void 0 : _a2.color;
3936
+ if (typeof color === "string" && color) {
3937
+ ;
3938
+ newLeaf.styles.textColor = color;
3939
+ }
3940
+ }
3941
+ if (annotationData.type === "BackgroundColor") {
3942
+ const color = (_b2 = annotationData.attributes) == null ? void 0 : _b2.color;
3943
+ if (typeof color === "string" && color) {
3944
+ ;
3945
+ newLeaf.styles.backgroundColor = color;
3946
+ }
3947
+ }
3923
3948
  }
3924
3949
  if (linkAnnotation) {
3925
3950
  if (linkAnnotation.type === "Embed") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seed-hypermedia/client",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/seed-hypermedia/seed",