@prismicio/types-internal 2.0.0-alpha.4 → 2.0.0-alpha.6

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.
Files changed (48) hide show
  1. package/lib/content/Document.d.ts +72 -616
  2. package/lib/content/Document.js +4 -3
  3. package/lib/content/fields/GroupContent.d.ts +23 -193
  4. package/lib/content/fields/GroupContent.js +3 -3
  5. package/lib/content/fields/WidgetContent.d.ts +104 -920
  6. package/lib/content/fields/nestable/EmbedContent.d.ts +30 -45
  7. package/lib/content/fields/nestable/EmbedContent.js +25 -12
  8. package/lib/content/fields/nestable/LinkContent.d.ts +8 -8
  9. package/lib/content/fields/nestable/LinkContent.js +1 -1
  10. package/lib/content/fields/nestable/NestableContent.d.ts +14 -115
  11. package/lib/content/fields/nestable/NestableContent.js +2 -1
  12. package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +11 -78
  13. package/lib/content/fields/nestable/RichTextContent/Blocks.js +5 -5
  14. package/lib/content/fields/nestable/RichTextContent/index.d.ts +9 -77
  15. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +26 -230
  16. package/lib/content/fields/slices/Slice/CompositeSliceContent.js +4 -4
  17. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +9 -77
  18. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +26 -230
  19. package/lib/content/fields/slices/Slice/SharedSliceContent.js +4 -4
  20. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +22 -192
  21. package/lib/content/fields/slices/Slice/index.d.ts +50 -424
  22. package/lib/content/fields/slices/SliceItem.d.ts +54 -462
  23. package/lib/content/fields/slices/SliceItem.js +2 -1
  24. package/lib/content/fields/slices/SlicesContent.d.ts +78 -690
  25. package/lib/content/utils.js +3 -3
  26. package/lib/customtypes/index.d.ts +2 -2
  27. package/lib/customtypes/index.js +2 -3
  28. package/lib/customtypes/widgets/nestable/RichText.d.ts +1 -1
  29. package/lib/customtypes/widgets/nestable/RichText.js +10 -10
  30. package/lib/customtypes/widgets/slices/Slices.d.ts +12 -3
  31. package/lib/customtypes/widgets/slices/Slices.js +4 -4
  32. package/lib/customtypes/widgets/slices/index.d.ts +6 -6
  33. package/lib/customtypes/widgets/slices/index.js +6 -11
  34. package/package.json +1 -1
  35. package/src/content/Document.ts +4 -3
  36. package/src/content/fields/GroupContent.ts +4 -4
  37. package/src/content/fields/nestable/EmbedContent.ts +52 -28
  38. package/src/content/fields/nestable/LinkContent.ts +1 -1
  39. package/src/content/fields/nestable/NestableContent.ts +2 -1
  40. package/src/content/fields/nestable/RichTextContent/Blocks.ts +6 -5
  41. package/src/content/fields/slices/Slice/CompositeSliceContent.ts +4 -3
  42. package/src/content/fields/slices/Slice/SharedSliceContent.ts +4 -3
  43. package/src/content/fields/slices/SliceItem.ts +2 -2
  44. package/src/content/utils.ts +4 -5
  45. package/src/customtypes/index.ts +2 -2
  46. package/src/customtypes/widgets/nestable/RichText.ts +16 -16
  47. package/src/customtypes/widgets/slices/Slices.ts +4 -4
  48. package/src/customtypes/widgets/slices/index.ts +6 -6
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DocumentLegacy = exports.Document = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const fp_ts_1 = require("fp-ts");
6
+ const Either_1 = require("fp-ts/lib/Either");
6
7
  const function_1 = require("fp-ts/lib/function");
7
8
  const t = tslib_1.__importStar(require("io-ts"));
8
9
  const common_1 = require("../common");
@@ -16,7 +17,7 @@ const DocumentLegacyCodec = (allTypes) => {
16
17
  return Object.entries(parsedDoc).reduce((acc, [widgetKey, widgetValue]) => {
17
18
  const widgetCtx = (0, LegacyContentCtx_1.defaultCtx)(widgetKey, allTypes);
18
19
  const parsedW = (0, fields_1.WidgetLegacy)(widgetCtx).decode(widgetValue);
19
- if (!parsedW || (parsedW === null || parsedW === void 0 ? void 0 : parsedW._tag) === "Left")
20
+ if (!parsedW || (0, Either_1.isLeft)(parsedW))
20
21
  return acc;
21
22
  return { ...acc, [widgetKey]: parsedW.right };
22
23
  }, {});
@@ -39,7 +40,7 @@ function extractMetadata(data) {
39
40
  const { types, widgets } = fields.reduce((acc, [k, v]) => {
40
41
  if (k.endsWith("_TYPE")) {
41
42
  const decodedValue = LegacyContentCtx_1.FieldOrSliceType.decode(v);
42
- if (decodedValue._tag === "Right") {
43
+ if ((0, Either_1.isRight)(decodedValue)) {
43
44
  return {
44
45
  ...acc,
45
46
  types: acc.types.set(k.substring(0, k.length - 5), decodedValue.right),
@@ -78,7 +79,7 @@ function parseLegacyDocument(legacyDoc) {
78
79
  // parse the actual widgets
79
80
  return DocumentLegacyCodec(types).decode(widgets);
80
81
  }));
81
- return result._tag === "Left" ? undefined : result.right;
82
+ return (0, Either_1.isLeft)(result) ? undefined : result.right;
82
83
  }
83
84
  function encodeToLegacyDocument(document) {
84
85
  const encoded = DocumentLegacyCodec().encode(document);
@@ -9,24 +9,7 @@ export declare const GroupItemContent: t.ExactC<t.TypeC<{
9
9
  }>>, t.ExactC<t.TypeC<{
10
10
  __TYPE__: t.LiteralC<"BooleanContent">;
11
11
  value: t.BooleanC;
12
- }>>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
13
- embed_url: t.StringC;
14
- type: t.StringC;
15
- }>, t.PartialC<{
16
- version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
17
- title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
18
- author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
19
- author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
20
- provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
21
- provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
22
- cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
23
- thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
24
- thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
25
- thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
26
- html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
27
- }>]>>, t.ExactC<t.TypeC<{
28
- __TYPE__: t.LiteralC<"EmbedContent">;
29
- }>>]>, t.ExactC<t.TypeC<{
12
+ }>>, t.Type<import("./nestable").EmbedContent, import("./nestable").EmbedContent, unknown>, t.ExactC<t.TypeC<{
30
13
  type: t.LiteralC<"Text">;
31
14
  value: t.Type<string, string, unknown>;
32
15
  __TYPE__: t.LiteralC<"FieldContent">;
@@ -131,9 +114,9 @@ export declare const GroupItemContent: t.ExactC<t.TypeC<{
131
114
  url: t.StringC;
132
115
  name: t.StringC;
133
116
  kind: t.StringC;
117
+ size: t.StringC;
134
118
  }>, t.PartialC<{
135
119
  date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
136
- size: t.StringC;
137
120
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
138
121
  __TYPE__: t.LiteralC<"FileLink">;
139
122
  }>, t.PartialC<{
@@ -199,9 +182,9 @@ export declare const GroupItemContent: t.ExactC<t.TypeC<{
199
182
  url: string;
200
183
  name: string;
201
184
  kind: string;
185
+ size: string;
202
186
  } & {
203
187
  date?: string | null | undefined;
204
- size?: string;
205
188
  } & {
206
189
  __TYPE__: "FileLink";
207
190
  } & {
@@ -237,9 +220,9 @@ export declare const GroupItemContent: t.ExactC<t.TypeC<{
237
220
  url: string;
238
221
  name: string;
239
222
  kind: string;
223
+ size: string;
240
224
  } & {
241
225
  date?: string | null | undefined;
242
- size?: string;
243
226
  } & {
244
227
  __TYPE__: "FileLink";
245
228
  } & {
@@ -265,24 +248,7 @@ export declare const GroupItemContent: t.ExactC<t.TypeC<{
265
248
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
266
249
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
267
250
  type: t.LiteralC<"embed">;
268
- data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
269
- embed_url: t.StringC;
270
- type: t.StringC;
271
- }>, t.PartialC<{
272
- version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
273
- title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
274
- author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
275
- author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
276
- provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
277
- provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
278
- cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
279
- thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
280
- thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
281
- thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
282
- html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
283
- }>]>>, t.ExactC<t.TypeC<{
284
- __TYPE__: t.LiteralC<"EmbedContent">;
285
- }>>]>;
251
+ data: t.Type<import("./nestable").EmbedContent, import("./nestable").EmbedContent, unknown>;
286
252
  }>, t.PartialC<{
287
253
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
288
254
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -315,30 +281,13 @@ export declare const GroupItemContent: t.ExactC<t.TypeC<{
315
281
  }>>;
316
282
  export type GroupItemContent = t.TypeOf<typeof GroupItemContent>;
317
283
  declare const itemLegacyReader: t.ArrayC<t.TupleC<[t.StringC, t.UnknownC]>>;
318
- export type GroupItemLegacy = t.TypeOf<typeof itemLegacyReader>;
284
+ type GroupItemLegacy = t.TypeOf<typeof itemLegacyReader>;
319
285
  export declare const GroupItemLegacy: (ctx: LegacyContentCtx) => t.Type<{
320
286
  __TYPE__: "GroupItemContent";
321
287
  value: [string, {
322
288
  __TYPE__: "BooleanContent";
323
289
  value: boolean;
324
- } | ({
325
- embed_url: string;
326
- type: string;
327
- } & {
328
- version?: string | number | null;
329
- title?: string | null | undefined;
330
- author_name?: string | null | undefined;
331
- author_url?: string | null | undefined;
332
- provider_name?: string | null | undefined;
333
- provider_url?: string | null | undefined;
334
- cache_age?: string | number | null;
335
- thumbnail_url?: string | null | undefined;
336
- thumbnail_width?: number | null | undefined;
337
- thumbnail_height?: number | null | undefined;
338
- html?: string | null | undefined;
339
- } & {
340
- __TYPE__: "EmbedContent";
341
- }) | {
290
+ } | import("./nestable").EmbedContent | {
342
291
  type: "Color";
343
292
  value: string;
344
293
  __TYPE__: "FieldContent";
@@ -445,9 +394,9 @@ export declare const GroupItemLegacy: (ctx: LegacyContentCtx) => t.Type<{
445
394
  url: string;
446
395
  name: string;
447
396
  kind: string;
397
+ size: string;
448
398
  } & {
449
399
  date?: string | null | undefined;
450
- size?: string;
451
400
  } & {
452
401
  __TYPE__: "FileLink";
453
402
  } & {
@@ -514,9 +463,9 @@ export declare const GroupItemLegacy: (ctx: LegacyContentCtx) => t.Type<{
514
463
  url: string;
515
464
  name: string;
516
465
  kind: string;
466
+ size: string;
517
467
  } & {
518
468
  date?: string | null | undefined;
519
- size?: string;
520
469
  } & {
521
470
  __TYPE__: "FileLink";
522
471
  } & {
@@ -542,24 +491,7 @@ export declare const GroupItemLegacy: (ctx: LegacyContentCtx) => t.Type<{
542
491
  direction?: string | null | undefined;
543
492
  }) | ({
544
493
  type: "embed";
545
- data: {
546
- embed_url: string;
547
- type: string;
548
- } & {
549
- version?: string | number | null;
550
- title?: string | null | undefined;
551
- author_name?: string | null | undefined;
552
- author_url?: string | null | undefined;
553
- provider_name?: string | null | undefined;
554
- provider_url?: string | null | undefined;
555
- cache_age?: string | number | null;
556
- thumbnail_url?: string | null | undefined;
557
- thumbnail_width?: number | null | undefined;
558
- thumbnail_height?: number | null | undefined;
559
- html?: string | null | undefined;
560
- } & {
561
- __TYPE__: "EmbedContent";
562
- };
494
+ data: import("./nestable").EmbedContent;
563
495
  } & {
564
496
  label?: string | null | undefined;
565
497
  direction?: string | null | undefined;
@@ -592,24 +524,7 @@ export declare const GroupLegacy: (ctx: LegacyContentCtx) => t.Type<{
592
524
  value: [string, {
593
525
  __TYPE__: "BooleanContent";
594
526
  value: boolean;
595
- } | ({
596
- embed_url: string;
597
- type: string;
598
- } & {
599
- version?: string | number | null;
600
- title?: string | null | undefined;
601
- author_name?: string | null | undefined;
602
- author_url?: string | null | undefined;
603
- provider_name?: string | null | undefined;
604
- provider_url?: string | null | undefined;
605
- cache_age?: string | number | null;
606
- thumbnail_url?: string | null | undefined;
607
- thumbnail_width?: number | null | undefined;
608
- thumbnail_height?: number | null | undefined;
609
- html?: string | null | undefined;
610
- } & {
611
- __TYPE__: "EmbedContent";
612
- }) | {
527
+ } | import("./nestable").EmbedContent | {
613
528
  type: "Color";
614
529
  value: string;
615
530
  __TYPE__: "FieldContent";
@@ -716,9 +631,9 @@ export declare const GroupLegacy: (ctx: LegacyContentCtx) => t.Type<{
716
631
  url: string;
717
632
  name: string;
718
633
  kind: string;
634
+ size: string;
719
635
  } & {
720
636
  date?: string | null | undefined;
721
- size?: string;
722
637
  } & {
723
638
  __TYPE__: "FileLink";
724
639
  } & {
@@ -785,9 +700,9 @@ export declare const GroupLegacy: (ctx: LegacyContentCtx) => t.Type<{
785
700
  url: string;
786
701
  name: string;
787
702
  kind: string;
703
+ size: string;
788
704
  } & {
789
705
  date?: string | null | undefined;
790
- size?: string;
791
706
  } & {
792
707
  __TYPE__: "FileLink";
793
708
  } & {
@@ -813,24 +728,7 @@ export declare const GroupLegacy: (ctx: LegacyContentCtx) => t.Type<{
813
728
  direction?: string | null | undefined;
814
729
  }) | ({
815
730
  type: "embed";
816
- data: {
817
- embed_url: string;
818
- type: string;
819
- } & {
820
- version?: string | number | null;
821
- title?: string | null | undefined;
822
- author_name?: string | null | undefined;
823
- author_url?: string | null | undefined;
824
- provider_name?: string | null | undefined;
825
- provider_url?: string | null | undefined;
826
- cache_age?: string | number | null;
827
- thumbnail_url?: string | null | undefined;
828
- thumbnail_width?: number | null | undefined;
829
- thumbnail_height?: number | null | undefined;
830
- html?: string | null | undefined;
831
- } & {
832
- __TYPE__: "EmbedContent";
833
- };
731
+ data: import("./nestable").EmbedContent;
834
732
  } & {
835
733
  label?: string | null | undefined;
836
734
  direction?: string | null | undefined;
@@ -864,24 +762,7 @@ export declare const isGroupContent: (u: unknown) => u is {
864
762
  value: [string, {
865
763
  __TYPE__: "BooleanContent";
866
764
  value: boolean;
867
- } | ({
868
- embed_url: string;
869
- type: string;
870
- } & {
871
- version?: string | number | null;
872
- title?: string | null | undefined;
873
- author_name?: string | null | undefined;
874
- author_url?: string | null | undefined;
875
- provider_name?: string | null | undefined;
876
- provider_url?: string | null | undefined;
877
- cache_age?: string | number | null;
878
- thumbnail_url?: string | null | undefined;
879
- thumbnail_width?: number | null | undefined;
880
- thumbnail_height?: number | null | undefined;
881
- html?: string | null | undefined;
882
- } & {
883
- __TYPE__: "EmbedContent";
884
- }) | {
765
+ } | import("./nestable").EmbedContent | {
885
766
  type: "Color";
886
767
  value: string;
887
768
  __TYPE__: "FieldContent";
@@ -988,9 +869,9 @@ export declare const isGroupContent: (u: unknown) => u is {
988
869
  url: string;
989
870
  name: string;
990
871
  kind: string;
872
+ size: string;
991
873
  } & {
992
874
  date?: string | null | undefined;
993
- size?: string;
994
875
  } & {
995
876
  __TYPE__: "FileLink";
996
877
  } & {
@@ -1057,9 +938,9 @@ export declare const isGroupContent: (u: unknown) => u is {
1057
938
  url: string;
1058
939
  name: string;
1059
940
  kind: string;
941
+ size: string;
1060
942
  } & {
1061
943
  date?: string | null | undefined;
1062
- size?: string;
1063
944
  } & {
1064
945
  __TYPE__: "FileLink";
1065
946
  } & {
@@ -1085,24 +966,7 @@ export declare const isGroupContent: (u: unknown) => u is {
1085
966
  direction?: string | null | undefined;
1086
967
  }) | ({
1087
968
  type: "embed";
1088
- data: {
1089
- embed_url: string;
1090
- type: string;
1091
- } & {
1092
- version?: string | number | null;
1093
- title?: string | null | undefined;
1094
- author_name?: string | null | undefined;
1095
- author_url?: string | null | undefined;
1096
- provider_name?: string | null | undefined;
1097
- provider_url?: string | null | undefined;
1098
- cache_age?: string | number | null;
1099
- thumbnail_url?: string | null | undefined;
1100
- thumbnail_width?: number | null | undefined;
1101
- thumbnail_height?: number | null | undefined;
1102
- html?: string | null | undefined;
1103
- } & {
1104
- __TYPE__: "EmbedContent";
1105
- };
969
+ data: import("./nestable").EmbedContent;
1106
970
  } & {
1107
971
  label?: string | null | undefined;
1108
972
  direction?: string | null | undefined;
@@ -1138,24 +1002,7 @@ export declare const GroupContent: t.ExactC<t.TypeC<{
1138
1002
  }>>, t.ExactC<t.TypeC<{
1139
1003
  __TYPE__: t.LiteralC<"BooleanContent">;
1140
1004
  value: t.BooleanC;
1141
- }>>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1142
- embed_url: t.StringC;
1143
- type: t.StringC;
1144
- }>, t.PartialC<{
1145
- version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1146
- title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1147
- author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1148
- author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1149
- provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1150
- provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1151
- cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1152
- thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1153
- thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1154
- thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1155
- html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1156
- }>]>>, t.ExactC<t.TypeC<{
1157
- __TYPE__: t.LiteralC<"EmbedContent">;
1158
- }>>]>, t.ExactC<t.TypeC<{
1005
+ }>>, t.Type<import("./nestable").EmbedContent, import("./nestable").EmbedContent, unknown>, t.ExactC<t.TypeC<{
1159
1006
  type: t.LiteralC<"Text">;
1160
1007
  value: t.Type<string, string, unknown>;
1161
1008
  __TYPE__: t.LiteralC<"FieldContent">;
@@ -1260,9 +1107,9 @@ export declare const GroupContent: t.ExactC<t.TypeC<{
1260
1107
  url: t.StringC;
1261
1108
  name: t.StringC;
1262
1109
  kind: t.StringC;
1110
+ size: t.StringC;
1263
1111
  }>, t.PartialC<{
1264
1112
  date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1265
- size: t.StringC;
1266
1113
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
1267
1114
  __TYPE__: t.LiteralC<"FileLink">;
1268
1115
  }>, t.PartialC<{
@@ -1328,9 +1175,9 @@ export declare const GroupContent: t.ExactC<t.TypeC<{
1328
1175
  url: string;
1329
1176
  name: string;
1330
1177
  kind: string;
1178
+ size: string;
1331
1179
  } & {
1332
1180
  date?: string | null | undefined;
1333
- size?: string;
1334
1181
  } & {
1335
1182
  __TYPE__: "FileLink";
1336
1183
  } & {
@@ -1366,9 +1213,9 @@ export declare const GroupContent: t.ExactC<t.TypeC<{
1366
1213
  url: string;
1367
1214
  name: string;
1368
1215
  kind: string;
1216
+ size: string;
1369
1217
  } & {
1370
1218
  date?: string | null | undefined;
1371
- size?: string;
1372
1219
  } & {
1373
1220
  __TYPE__: "FileLink";
1374
1221
  } & {
@@ -1394,24 +1241,7 @@ export declare const GroupContent: t.ExactC<t.TypeC<{
1394
1241
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1395
1242
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
1396
1243
  type: t.LiteralC<"embed">;
1397
- data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1398
- embed_url: t.StringC;
1399
- type: t.StringC;
1400
- }>, t.PartialC<{
1401
- version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1402
- title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1403
- author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1404
- author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1405
- provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1406
- provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1407
- cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1408
- thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1409
- thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1410
- thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1411
- html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1412
- }>]>>, t.ExactC<t.TypeC<{
1413
- __TYPE__: t.LiteralC<"EmbedContent">;
1414
- }>>]>;
1244
+ data: t.Type<import("./nestable").EmbedContent, import("./nestable").EmbedContent, unknown>;
1415
1245
  }>, t.PartialC<{
1416
1246
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1417
1247
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GroupContent = exports.isGroupContent = exports.GroupContentType = exports.GroupLegacy = exports.GroupItemLegacy = exports.GroupItemContent = exports.GroupItemContentType = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const fp_ts_1 = require("fp-ts");
6
+ const Either_1 = require("fp-ts/lib/Either");
6
7
  const function_1 = require("fp-ts/lib/function");
7
8
  const t = tslib_1.__importStar(require("io-ts"));
8
9
  const LegacyContentCtx_1 = require("../LegacyContentCtx");
@@ -22,10 +23,9 @@ const GroupItemLegacy = (ctx) => {
22
23
  const result = (0, nestable_1.NestableLegacy)(itemCtx).decode(itemValue);
23
24
  if (!result)
24
25
  return acc;
25
- if (result._tag === "Right")
26
- return [...acc, [itemKey, result.right]];
27
- else
26
+ if ((0, Either_1.isLeft)(result))
28
27
  return acc;
28
+ return [...acc, [itemKey, result.right]];
29
29
  }, []);
30
30
  return {
31
31
  value: parsedItems,