@prismicio/types-internal 2.2.0-traverse.alpha-8 → 2.2.0-traverse.alpha-10

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.
@@ -281,7 +281,7 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
281
281
  text: t.StringC;
282
282
  }>, t.PartialC<{
283
283
  spans: t.Type<({
284
- data?: ({
284
+ data: ({
285
285
  __TYPE__: "ImageLink";
286
286
  } & {
287
287
  id: string;
@@ -320,12 +320,20 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
320
320
  title?: string;
321
321
  } | null | undefined;
322
322
  });
323
- } & {
324
323
  start: number;
325
324
  end: number;
326
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
325
+ type: "hyperlink";
326
+ } | {
327
+ data: string;
328
+ start: number;
329
+ end: number;
330
+ type: "label";
331
+ } | {
332
+ start: number;
333
+ end: number;
334
+ type: string;
327
335
  })[], ({
328
- data?: ({
336
+ data: ({
329
337
  __TYPE__: "ImageLink";
330
338
  } & {
331
339
  id: string;
@@ -364,10 +372,18 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
364
372
  title?: string;
365
373
  } | null | undefined;
366
374
  });
367
- } & {
368
375
  start: number;
369
376
  end: number;
370
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
377
+ type: "hyperlink";
378
+ } | {
379
+ data: string;
380
+ start: number;
381
+ end: number;
382
+ type: "label";
383
+ } | {
384
+ start: number;
385
+ end: number;
386
+ type: string;
371
387
  })[], unknown>;
372
388
  }>]>;
373
389
  }>, t.PartialC<{
@@ -632,7 +648,7 @@ export declare const isNestableContent: (u: unknown) => u is {
632
648
  text: string;
633
649
  } & {
634
650
  spans?: ({
635
- data?: ({
651
+ data: ({
636
652
  __TYPE__: "ImageLink";
637
653
  } & {
638
654
  id: string;
@@ -671,10 +687,18 @@ export declare const isNestableContent: (u: unknown) => u is {
671
687
  title?: string;
672
688
  } | null | undefined;
673
689
  });
674
- } & {
675
690
  start: number;
676
691
  end: number;
677
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
692
+ type: "hyperlink";
693
+ } | {
694
+ data: string;
695
+ start: number;
696
+ end: number;
697
+ type: "label";
698
+ } | {
699
+ start: number;
700
+ end: number;
701
+ type: string;
678
702
  })[];
679
703
  };
680
704
  } & {
@@ -938,7 +962,7 @@ export declare const NestableLegacy: (ctx: LegacyContentCtx) => {
938
962
  text: string;
939
963
  } & {
940
964
  spans?: ({
941
- data?: ({
965
+ data: ({
942
966
  __TYPE__: "ImageLink";
943
967
  } & {
944
968
  id: string;
@@ -977,10 +1001,18 @@ export declare const NestableLegacy: (ctx: LegacyContentCtx) => {
977
1001
  title?: string;
978
1002
  } | null | undefined;
979
1003
  });
980
- } & {
981
1004
  start: number;
982
1005
  end: number;
983
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1006
+ type: "hyperlink";
1007
+ } | {
1008
+ data: string;
1009
+ start: number;
1010
+ end: number;
1011
+ type: "label";
1012
+ } | {
1013
+ start: number;
1014
+ end: number;
1015
+ type: string;
984
1016
  })[];
985
1017
  };
986
1018
  } & {
@@ -1,5 +1,5 @@
1
1
  import * as t from "io-ts";
2
- export declare const Span: t.ExactC<t.IntersectionC<[t.PartialC<{
2
+ export declare const Span: t.UnionC<[t.ExactC<t.TypeC<{
3
3
  data: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
4
4
  __TYPE__: t.LiteralC<"ImageLink">;
5
5
  }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
@@ -107,30 +107,21 @@ export declare const Span: t.ExactC<t.IntersectionC<[t.PartialC<{
107
107
  title?: string;
108
108
  } | null | undefined;
109
109
  }, unknown>]>;
110
- }>, t.TypeC<{
111
110
  start: t.NumberC;
112
111
  end: t.NumberC;
113
- type: t.UnionC<[t.KeyofC<{
114
- heading1: null;
115
- heading2: null;
116
- heading3: null;
117
- heading4: null;
118
- heading5: null;
119
- heading6: null;
120
- paragraph: null;
121
- strong: null;
122
- em: null;
123
- preformatted: null;
124
- hyperlink: null;
125
- image: null;
126
- embed: null;
127
- "list-item": null;
128
- "o-list-item": null;
129
- rtl: null;
130
- }>, t.LiteralC<"label">]>;
131
- }>]>>;
112
+ type: t.LiteralC<"hyperlink">;
113
+ }>>, t.ExactC<t.TypeC<{
114
+ data: t.StringC;
115
+ start: t.NumberC;
116
+ end: t.NumberC;
117
+ type: t.LiteralC<"label">;
118
+ }>>, t.ExactC<t.TypeC<{
119
+ start: t.NumberC;
120
+ end: t.NumberC;
121
+ type: t.KeyofC<Record<string, null>>;
122
+ }>>]>;
132
123
  export declare type Span = t.TypeOf<typeof Span>;
133
- export declare const SpanLegacy: t.ExactC<t.IntersectionC<[t.PartialC<{
124
+ export declare const SpanLegacy: t.UnionC<[t.ExactC<t.TypeC<{
134
125
  data: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
135
126
  __TYPE__: t.LiteralC<"ImageLink">;
136
127
  }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
@@ -238,30 +229,21 @@ export declare const SpanLegacy: t.ExactC<t.IntersectionC<[t.PartialC<{
238
229
  title?: string;
239
230
  } | null | undefined;
240
231
  }, unknown>]>;
241
- }>, t.TypeC<{
242
232
  start: t.NumberC;
243
233
  end: t.NumberC;
244
- type: t.UnionC<[t.KeyofC<{
245
- heading1: null;
246
- heading2: null;
247
- heading3: null;
248
- heading4: null;
249
- heading5: null;
250
- heading6: null;
251
- paragraph: null;
252
- strong: null;
253
- em: null;
254
- preformatted: null;
255
- hyperlink: null;
256
- image: null;
257
- embed: null;
258
- "list-item": null;
259
- "o-list-item": null;
260
- rtl: null;
261
- }>, t.LiteralC<"label">]>;
262
- }>]>>;
234
+ type: t.LiteralC<"hyperlink">;
235
+ }>>, t.ExactC<t.TypeC<{
236
+ data: t.StringC;
237
+ start: t.NumberC;
238
+ end: t.NumberC;
239
+ type: t.LiteralC<"label">;
240
+ }>>, t.ExactC<t.TypeC<{
241
+ start: t.NumberC;
242
+ end: t.NumberC;
243
+ type: t.KeyofC<Record<string, null>>;
244
+ }>>]>;
263
245
  export declare type SpanLegacy = t.TypeOf<typeof SpanLegacy>;
264
- export declare const ValidatedSpans: <C extends t.ExactC<t.IntersectionC<[t.PartialC<{
246
+ export declare const ValidatedSpans: <C extends t.UnionC<[t.ExactC<t.TypeC<{
265
247
  data: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
266
248
  __TYPE__: t.LiteralC<"ImageLink">;
267
249
  }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
@@ -369,28 +351,19 @@ export declare const ValidatedSpans: <C extends t.ExactC<t.IntersectionC<[t.Part
369
351
  title?: string;
370
352
  } | null | undefined;
371
353
  }, unknown>]>;
372
- }>, t.TypeC<{
373
354
  start: t.NumberC;
374
355
  end: t.NumberC;
375
- type: t.UnionC<[t.KeyofC<{
376
- heading1: null;
377
- heading2: null;
378
- heading3: null;
379
- heading4: null;
380
- heading5: null;
381
- heading6: null;
382
- paragraph: null;
383
- strong: null;
384
- em: null;
385
- preformatted: null;
386
- hyperlink: null;
387
- image: null;
388
- embed: null;
389
- "list-item": null;
390
- "o-list-item": null;
391
- rtl: null;
392
- }>, t.LiteralC<"label">]>;
393
- }>]>>>(spanCodec: C) => t.Type<t.TypeOf<C>[], t.TypeOf<C>[], unknown>;
356
+ type: t.LiteralC<"hyperlink">;
357
+ }>>, t.ExactC<t.TypeC<{
358
+ data: t.StringC;
359
+ start: t.NumberC;
360
+ end: t.NumberC;
361
+ type: t.LiteralC<"label">;
362
+ }>>, t.ExactC<t.TypeC<{
363
+ start: t.NumberC;
364
+ end: t.NumberC;
365
+ type: t.KeyofC<Record<string, null>>;
366
+ }>>]>>(spanCodec: C) => t.Type<t.TypeOf<C>[], t.TypeOf<C>[], unknown>;
394
367
  export declare const ImageBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
395
368
  type: t.LiteralC<"image">;
396
369
  data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
@@ -523,7 +496,7 @@ export declare const TextBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
523
496
  text: t.StringC;
524
497
  }>, t.PartialC<{
525
498
  spans: t.Type<({
526
- data?: ({
499
+ data: ({
527
500
  __TYPE__: "ImageLink";
528
501
  } & {
529
502
  id: string;
@@ -562,12 +535,20 @@ export declare const TextBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
562
535
  title?: string;
563
536
  } | null | undefined;
564
537
  });
565
- } & {
566
538
  start: number;
567
539
  end: number;
568
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
540
+ type: "hyperlink";
541
+ } | {
542
+ data: string;
543
+ start: number;
544
+ end: number;
545
+ type: "label";
546
+ } | {
547
+ start: number;
548
+ end: number;
549
+ type: string;
569
550
  })[], ({
570
- data?: ({
551
+ data: ({
571
552
  __TYPE__: "ImageLink";
572
553
  } & {
573
554
  id: string;
@@ -606,10 +587,18 @@ export declare const TextBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
606
587
  title?: string;
607
588
  } | null | undefined;
608
589
  });
609
- } & {
610
590
  start: number;
611
591
  end: number;
612
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
592
+ type: "hyperlink";
593
+ } | {
594
+ data: string;
595
+ start: number;
596
+ end: number;
597
+ type: "label";
598
+ } | {
599
+ start: number;
600
+ end: number;
601
+ type: string;
613
602
  })[], unknown>;
614
603
  }>]>;
615
604
  }>, t.PartialC<{
@@ -715,7 +704,7 @@ export declare const BlockLegacy: t.Type<({
715
704
  text: string;
716
705
  } & {
717
706
  spans?: ({
718
- data?: ({
707
+ data: ({
719
708
  __TYPE__: "ImageLink";
720
709
  } & {
721
710
  id: string;
@@ -754,10 +743,18 @@ export declare const BlockLegacy: t.Type<({
754
743
  title?: string;
755
744
  } | null | undefined;
756
745
  });
757
- } & {
758
746
  start: number;
759
747
  end: number;
760
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
748
+ type: "hyperlink";
749
+ } | {
750
+ data: string;
751
+ start: number;
752
+ end: number;
753
+ type: "label";
754
+ } | {
755
+ start: number;
756
+ end: number;
757
+ type: string;
761
758
  })[];
762
759
  };
763
760
  } & {
@@ -861,7 +858,7 @@ export declare const BlockLegacy: t.Type<({
861
858
  text: string;
862
859
  } & {
863
860
  spans?: ({
864
- data?: ({
861
+ data: ({
865
862
  __TYPE__: "ImageLink";
866
863
  } & {
867
864
  id: string;
@@ -900,10 +897,18 @@ export declare const BlockLegacy: t.Type<({
900
897
  title?: string;
901
898
  } | null | undefined;
902
899
  });
903
- } & {
904
900
  start: number;
905
901
  end: number;
906
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
902
+ type: "hyperlink";
903
+ } | {
904
+ data: string;
905
+ start: number;
906
+ end: number;
907
+ type: "label";
908
+ } | {
909
+ start: number;
910
+ end: number;
911
+ type: string;
907
912
  })[];
908
913
  };
909
914
  } & {
@@ -1036,7 +1041,7 @@ export declare const Block: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1036
1041
  text: t.StringC;
1037
1042
  }>, t.PartialC<{
1038
1043
  spans: t.Type<({
1039
- data?: ({
1044
+ data: ({
1040
1045
  __TYPE__: "ImageLink";
1041
1046
  } & {
1042
1047
  id: string;
@@ -1075,12 +1080,20 @@ export declare const Block: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1075
1080
  title?: string;
1076
1081
  } | null | undefined;
1077
1082
  });
1078
- } & {
1079
1083
  start: number;
1080
1084
  end: number;
1081
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1085
+ type: "hyperlink";
1086
+ } | {
1087
+ data: string;
1088
+ start: number;
1089
+ end: number;
1090
+ type: "label";
1091
+ } | {
1092
+ start: number;
1093
+ end: number;
1094
+ type: string;
1082
1095
  })[], ({
1083
- data?: ({
1096
+ data: ({
1084
1097
  __TYPE__: "ImageLink";
1085
1098
  } & {
1086
1099
  id: string;
@@ -1119,10 +1132,18 @@ export declare const Block: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1119
1132
  title?: string;
1120
1133
  } | null | undefined;
1121
1134
  });
1122
- } & {
1123
1135
  start: number;
1124
1136
  end: number;
1125
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1137
+ type: "hyperlink";
1138
+ } | {
1139
+ data: string;
1140
+ start: number;
1141
+ end: number;
1142
+ type: "label";
1143
+ } | {
1144
+ start: number;
1145
+ end: number;
1146
+ type: string;
1126
1147
  })[], unknown>;
1127
1148
  }>]>;
1128
1149
  }>, t.PartialC<{
@@ -6,31 +6,45 @@ const fp_ts_1 = require("fp-ts");
6
6
  const Either_1 = require("fp-ts/lib/Either");
7
7
  const function_1 = require("fp-ts/lib/function");
8
8
  const t = (0, tslib_1.__importStar)(require("io-ts"));
9
+ const io_ts_types_1 = require("io-ts-types");
9
10
  const nestable_1 = require("../../../../customtypes/widgets/nestable");
10
11
  const validators_1 = require("../../../../validators");
11
12
  const function_2 = require("../../../../validators/function");
12
13
  const EmbedContent_1 = require("../EmbedContent");
13
14
  const ImageContent_1 = require("../ImageContent");
14
15
  const LinkContent_1 = require("../LinkContent");
15
- const SpanFn = (linkCodec) => t.exact(t.intersection([
16
- t.partial({
17
- data: linkCodec,
18
- }),
19
- t.type({
20
- start: t.number,
21
- end: t.number,
22
- type: t.union([nestable_1.RichTextNodeTypeCodec, t.literal("label")]),
23
- }),
24
- ]));
25
- exports.Span = SpanFn(LinkContent_1.Link);
26
- exports.SpanLegacy = SpanFn(LinkContent_1.LinkLegacy);
16
+ const linkSpan = (linkCodec) => t.strict({
17
+ data: linkCodec,
18
+ start: t.number,
19
+ end: t.number,
20
+ type: t.literal(nestable_1.RichTextNodeType.hyperlink),
21
+ });
22
+ const labelSpan = t.strict({
23
+ data: (0, io_ts_types_1.withFallback)(t.string, ""),
24
+ start: t.number,
25
+ end: t.number,
26
+ type: t.literal("label"),
27
+ });
28
+ const span = t.strict({
29
+ start: t.number,
30
+ end: t.number,
31
+ type: t.keyof(Object.entries(nestable_1.RichTextNodeType).reduce((acc, [, name]) => {
32
+ if (name === nestable_1.RichTextNodeType.hyperlink)
33
+ return acc;
34
+ return { ...acc, [name]: null };
35
+ }, {})),
36
+ });
37
+ exports.Span = t.union([linkSpan(LinkContent_1.Link), labelSpan, span]);
38
+ exports.SpanLegacy = t.union([linkSpan(LinkContent_1.LinkLegacy), labelSpan, span]);
27
39
  const ValidatedSpans = (spanCodec) => {
28
40
  return new t.Type("ValidatedSpans", (spans) => Array.isArray(spans) && spans.every(spanCodec.is), (spans, c) => {
29
41
  if (Array.isArray(spans)) {
30
42
  const res = spans
31
43
  .reduce((acc, maybeSpan) => {
32
44
  const decodedSpan = spanCodec.decode(maybeSpan);
33
- return (0, Either_1.isRight)(decodedSpan) ? [...acc, decodedSpan.right] : acc;
45
+ if ((0, Either_1.isLeft)(decodedSpan))
46
+ return acc;
47
+ return [...acc, decodedSpan.right];
34
48
  }, [])
35
49
  .sort((m1, m2) => m1.start - m2.start);
36
50
  return t.success(res);
@@ -101,7 +101,7 @@ export declare const isRichTextContent: (u: unknown) => u is {
101
101
  text: string;
102
102
  } & {
103
103
  spans?: ({
104
- data?: ({
104
+ data: ({
105
105
  __TYPE__: "ImageLink";
106
106
  } & {
107
107
  id: string;
@@ -140,10 +140,18 @@ export declare const isRichTextContent: (u: unknown) => u is {
140
140
  title?: string;
141
141
  } | null | undefined;
142
142
  });
143
- } & {
144
143
  start: number;
145
144
  end: number;
146
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
145
+ type: "hyperlink";
146
+ } | {
147
+ data: string;
148
+ start: number;
149
+ end: number;
150
+ type: "label";
151
+ } | {
152
+ start: number;
153
+ end: number;
154
+ type: string;
147
155
  })[];
148
156
  };
149
157
  } & {
@@ -279,7 +287,7 @@ export declare const RichTextContent: t.ExactC<t.TypeC<{
279
287
  text: t.StringC;
280
288
  }>, t.PartialC<{
281
289
  spans: t.Type<({
282
- data?: ({
290
+ data: ({
283
291
  __TYPE__: "ImageLink";
284
292
  } & {
285
293
  id: string;
@@ -318,12 +326,20 @@ export declare const RichTextContent: t.ExactC<t.TypeC<{
318
326
  title?: string;
319
327
  } | null | undefined;
320
328
  });
321
- } & {
322
329
  start: number;
323
330
  end: number;
324
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
331
+ type: "hyperlink";
332
+ } | {
333
+ data: string;
334
+ start: number;
335
+ end: number;
336
+ type: "label";
337
+ } | {
338
+ start: number;
339
+ end: number;
340
+ type: string;
325
341
  })[], ({
326
- data?: ({
342
+ data: ({
327
343
  __TYPE__: "ImageLink";
328
344
  } & {
329
345
  id: string;
@@ -362,10 +378,18 @@ export declare const RichTextContent: t.ExactC<t.TypeC<{
362
378
  title?: string;
363
379
  } | null | undefined;
364
380
  });
365
- } & {
366
381
  start: number;
367
382
  end: number;
368
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
383
+ type: "hyperlink";
384
+ } | {
385
+ data: string;
386
+ start: number;
387
+ end: number;
388
+ type: "label";
389
+ } | {
390
+ start: number;
391
+ end: number;
392
+ type: string;
369
393
  })[], unknown>;
370
394
  }>]>;
371
395
  }>, t.PartialC<{
@@ -475,7 +499,7 @@ export declare const RichTextLegacy: (ctx: LegacyContentCtx) => t.Type<{
475
499
  text: string;
476
500
  } & {
477
501
  spans?: ({
478
- data?: ({
502
+ data: ({
479
503
  __TYPE__: "ImageLink";
480
504
  } & {
481
505
  id: string;
@@ -514,10 +538,18 @@ export declare const RichTextLegacy: (ctx: LegacyContentCtx) => t.Type<{
514
538
  title?: string;
515
539
  } | null | undefined;
516
540
  });
517
- } & {
518
541
  start: number;
519
542
  end: number;
520
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
543
+ type: "hyperlink";
544
+ } | {
545
+ data: string;
546
+ start: number;
547
+ end: number;
548
+ type: "label";
549
+ } | {
550
+ start: number;
551
+ end: number;
552
+ type: string;
521
553
  })[];
522
554
  };
523
555
  } & {
@@ -622,7 +654,7 @@ export declare const RichTextLegacy: (ctx: LegacyContentCtx) => t.Type<{
622
654
  text: string;
623
655
  } & {
624
656
  spans?: ({
625
- data?: ({
657
+ data: ({
626
658
  __TYPE__: "ImageLink";
627
659
  } & {
628
660
  id: string;
@@ -661,10 +693,18 @@ export declare const RichTextLegacy: (ctx: LegacyContentCtx) => t.Type<{
661
693
  title?: string;
662
694
  } | null | undefined;
663
695
  });
664
- } & {
665
696
  start: number;
666
697
  end: number;
667
- type: "image" | "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
698
+ type: "hyperlink";
699
+ } | {
700
+ data: string;
701
+ start: number;
702
+ end: number;
703
+ type: "label";
704
+ } | {
705
+ start: number;
706
+ end: number;
707
+ type: string;
668
708
  })[];
669
709
  };
670
710
  } & {