@prismicio/types-internal 2.0.0-beta.0 → 2.1.0-alpha.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.
Files changed (166) hide show
  1. package/lib/common/WidgetKey.d.ts +1 -1
  2. package/lib/common/WidgetKey.js +1 -1
  3. package/lib/common/index.js +1 -1
  4. package/lib/content/Document.d.ts +20 -100
  5. package/lib/content/Document.js +1 -1
  6. package/lib/content/LegacyContentCtx.d.ts +2 -2
  7. package/lib/content/LegacyContentCtx.js +1 -1
  8. package/lib/content/fields/EmptyContent.d.ts +1 -1
  9. package/lib/content/fields/EmptyContent.js +1 -1
  10. package/lib/content/fields/GroupContent.d.ts +8 -28
  11. package/lib/content/fields/GroupContent.js +1 -1
  12. package/lib/content/fields/UIDContent.d.ts +1 -1
  13. package/lib/content/fields/UIDContent.js +1 -1
  14. package/lib/content/fields/WidgetContent.d.ts +18 -98
  15. package/lib/content/fields/WidgetContent.js +1 -1
  16. package/lib/content/fields/index.js +6 -6
  17. package/lib/content/fields/nestable/BooleanContent.d.ts +1 -1
  18. package/lib/content/fields/nestable/BooleanContent.js +1 -1
  19. package/lib/content/fields/nestable/EmbedContent.d.ts +2 -2
  20. package/lib/content/fields/nestable/EmbedContent.js +1 -1
  21. package/lib/content/fields/nestable/FieldContent/ColorContent.d.ts +1 -1
  22. package/lib/content/fields/nestable/FieldContent/ColorContent.js +2 -2
  23. package/lib/content/fields/nestable/FieldContent/DateContent.d.ts +1 -1
  24. package/lib/content/fields/nestable/FieldContent/DateContent.js +2 -2
  25. package/lib/content/fields/nestable/FieldContent/NumberContent.d.ts +1 -1
  26. package/lib/content/fields/nestable/FieldContent/NumberContent.js +2 -2
  27. package/lib/content/fields/nestable/FieldContent/RangeContent.d.ts +1 -1
  28. package/lib/content/fields/nestable/FieldContent/RangeContent.js +2 -2
  29. package/lib/content/fields/nestable/FieldContent/SelectContent.d.ts +1 -1
  30. package/lib/content/fields/nestable/FieldContent/SelectContent.js +2 -2
  31. package/lib/content/fields/nestable/FieldContent/TextContent.d.ts +1 -1
  32. package/lib/content/fields/nestable/FieldContent/TextContent.js +2 -2
  33. package/lib/content/fields/nestable/FieldContent/TimestampContent.d.ts +1 -1
  34. package/lib/content/fields/nestable/FieldContent/TimestampContent.js +2 -2
  35. package/lib/content/fields/nestable/FieldContent/index.d.ts +2 -2
  36. package/lib/content/fields/nestable/FieldContent/index.js +9 -9
  37. package/lib/content/fields/nestable/GeoPointContent.d.ts +1 -1
  38. package/lib/content/fields/nestable/GeoPointContent.js +1 -1
  39. package/lib/content/fields/nestable/ImageContent.d.ts +2 -2
  40. package/lib/content/fields/nestable/ImageContent.js +1 -1
  41. package/lib/content/fields/nestable/IntegrationFieldContent.d.ts +1 -1
  42. package/lib/content/fields/nestable/IntegrationFieldContent.js +1 -1
  43. package/lib/content/fields/nestable/LinkContent.d.ts +6 -6
  44. package/lib/content/fields/nestable/LinkContent.js +1 -1
  45. package/lib/content/fields/nestable/NestableContent.d.ts +4 -14
  46. package/lib/content/fields/nestable/NestableContent.js +1 -1
  47. package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +11 -31
  48. package/lib/content/fields/nestable/RichTextContent/Blocks.js +15 -11
  49. package/lib/content/fields/nestable/RichTextContent/index.d.ts +3 -13
  50. package/lib/content/fields/nestable/RichTextContent/index.js +3 -3
  51. package/lib/content/fields/nestable/SeparatorContent.d.ts +1 -1
  52. package/lib/content/fields/nestable/SeparatorContent.js +1 -1
  53. package/lib/content/fields/nestable/index.js +10 -10
  54. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +5 -25
  55. package/lib/content/fields/slices/Slice/CompositeSliceContent.js +1 -1
  56. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +2 -12
  57. package/lib/content/fields/slices/Slice/RepeatableContent.js +1 -1
  58. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +5 -25
  59. package/lib/content/fields/slices/Slice/SharedSliceContent.js +1 -1
  60. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +279 -27
  61. package/lib/content/fields/slices/Slice/SimpleSliceContent.js +6 -2
  62. package/lib/content/fields/slices/Slice/index.d.ts +285 -73
  63. package/lib/content/fields/slices/Slice/index.js +4 -4
  64. package/lib/content/fields/slices/SliceItem.d.ts +13 -73
  65. package/lib/content/fields/slices/SliceItem.js +1 -1
  66. package/lib/content/fields/slices/SlicesContent.d.ts +14 -74
  67. package/lib/content/fields/slices/SlicesContent.js +1 -1
  68. package/lib/content/fields/slices/index.js +3 -3
  69. package/lib/content/index.js +3 -3
  70. package/lib/content/utils.d.ts +2 -2
  71. package/lib/content/utils.js +2 -1
  72. package/lib/customtypes/CustomType.d.ts +210 -16
  73. package/lib/customtypes/CustomType.js +7 -2
  74. package/lib/customtypes/Section.d.ts +198 -16
  75. package/lib/customtypes/Section.js +1 -1
  76. package/lib/customtypes/diff/Changes.d.ts +4 -4
  77. package/lib/customtypes/diff/SharedSlice.d.ts +723 -3
  78. package/lib/customtypes/diff/Variation.d.ts +709 -3
  79. package/lib/customtypes/diff/index.js +3 -3
  80. package/lib/customtypes/index.js +4 -4
  81. package/lib/customtypes/widgets/Group.d.ts +56 -4
  82. package/lib/customtypes/widgets/Group.js +1 -1
  83. package/lib/customtypes/widgets/UID.d.ts +2 -2
  84. package/lib/customtypes/widgets/UID.js +1 -1
  85. package/lib/customtypes/widgets/Widget.d.ts +305 -19
  86. package/lib/customtypes/widgets/Widget.js +1 -1
  87. package/lib/customtypes/widgets/index.js +6 -6
  88. package/lib/customtypes/widgets/nestable/BooleanField.d.ts +2 -2
  89. package/lib/customtypes/widgets/nestable/BooleanField.js +1 -1
  90. package/lib/customtypes/widgets/nestable/Color.d.ts +2 -2
  91. package/lib/customtypes/widgets/nestable/Color.js +1 -1
  92. package/lib/customtypes/widgets/nestable/Date.d.ts +2 -2
  93. package/lib/customtypes/widgets/nestable/Date.js +1 -1
  94. package/lib/customtypes/widgets/nestable/Embed.d.ts +2 -2
  95. package/lib/customtypes/widgets/nestable/Embed.js +1 -1
  96. package/lib/customtypes/widgets/nestable/GeoPoint.d.ts +2 -2
  97. package/lib/customtypes/widgets/nestable/GeoPoint.js +1 -1
  98. package/lib/customtypes/widgets/nestable/Image.d.ts +3 -3
  99. package/lib/customtypes/widgets/nestable/Image.js +2 -2
  100. package/lib/customtypes/widgets/nestable/IntegrationField.d.ts +2 -2
  101. package/lib/customtypes/widgets/nestable/IntegrationField.js +1 -1
  102. package/lib/customtypes/widgets/nestable/Link/ContentRelationshipResolver.d.ts +29 -0
  103. package/lib/customtypes/widgets/nestable/Link/ContentRelationshipResolver.js +44 -0
  104. package/lib/customtypes/widgets/nestable/Link/index.d.ts +82 -0
  105. package/lib/customtypes/widgets/nestable/{Link.js → Link/index.js} +5 -3
  106. package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +29 -3
  107. package/lib/customtypes/widgets/nestable/NestableWidget.js +1 -1
  108. package/lib/customtypes/widgets/nestable/Number.d.ts +2 -2
  109. package/lib/customtypes/widgets/nestable/Number.js +1 -1
  110. package/lib/customtypes/widgets/nestable/Range.d.ts +2 -2
  111. package/lib/customtypes/widgets/nestable/Range.js +1 -1
  112. package/lib/customtypes/widgets/nestable/RichText.d.ts +3 -3
  113. package/lib/customtypes/widgets/nestable/RichText.js +2 -2
  114. package/lib/customtypes/widgets/nestable/Select.d.ts +2 -2
  115. package/lib/customtypes/widgets/nestable/Select.js +1 -1
  116. package/lib/customtypes/widgets/nestable/Separator.d.ts +2 -2
  117. package/lib/customtypes/widgets/nestable/Separator.js +1 -1
  118. package/lib/customtypes/widgets/nestable/Text.d.ts +2 -2
  119. package/lib/customtypes/widgets/nestable/Text.js +1 -1
  120. package/lib/customtypes/widgets/nestable/Timestamp.d.ts +2 -2
  121. package/lib/customtypes/widgets/nestable/Timestamp.js +1 -1
  122. package/lib/customtypes/widgets/nestable/index.js +16 -16
  123. package/lib/customtypes/widgets/shared/ImageConstraint.d.ts +1 -1
  124. package/lib/customtypes/widgets/shared/ImageConstraint.js +1 -1
  125. package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +56 -4
  126. package/lib/customtypes/widgets/slices/CompositeSlice.js +1 -1
  127. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +55 -3
  128. package/lib/customtypes/widgets/slices/LegacySlice.js +1 -1
  129. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +110 -6
  130. package/lib/customtypes/widgets/slices/SharedSlice.js +1 -1
  131. package/lib/customtypes/widgets/slices/SharedSliceRef.d.ts +1 -1
  132. package/lib/customtypes/widgets/slices/SharedSliceRef.js +1 -1
  133. package/lib/customtypes/widgets/slices/Slice.d.ts +2 -2
  134. package/lib/customtypes/widgets/slices/Slices.d.ts +497 -29
  135. package/lib/customtypes/widgets/slices/Slices.js +1 -1
  136. package/lib/customtypes/widgets/slices/SlicesTypes.d.ts +1 -1
  137. package/lib/customtypes/widgets/slices/SlicesTypes.js +1 -1
  138. package/lib/customtypes/widgets/slices/index.js +7 -7
  139. package/lib/utils/index.js +2 -2
  140. package/lib/validators/DateFromString.js +1 -1
  141. package/lib/validators/DateFromStringOrNumber.js +1 -1
  142. package/lib/validators/DateFromTsMs.js +1 -1
  143. package/lib/validators/IntFromNumber.d.ts +2 -2
  144. package/lib/validators/IntFromNumber.js +1 -1
  145. package/lib/validators/IntFromPixels.d.ts +2 -2
  146. package/lib/validators/IntFromPixels.js +1 -1
  147. package/lib/validators/NonEmptyString.js +1 -1
  148. package/lib/validators/NonEmptyStringOrNull.js +1 -1
  149. package/lib/validators/NumberOrNull.js +1 -1
  150. package/lib/validators/StringFromBoolean.d.ts +2 -2
  151. package/lib/validators/StringFromBoolean.js +1 -1
  152. package/lib/validators/StringFromNumber.d.ts +2 -2
  153. package/lib/validators/StringFromNumber.js +1 -1
  154. package/lib/validators/StringOrNull.js +1 -1
  155. package/lib/validators/TrimmedString.d.ts +2 -2
  156. package/lib/validators/TrimmedString.js +1 -1
  157. package/lib/validators/function.js +1 -1
  158. package/lib/validators/index.js +12 -12
  159. package/package.json +1 -1
  160. package/src/content/fields/nestable/RichTextContent/Blocks.ts +31 -23
  161. package/src/content/fields/nestable/RichTextContent/index.ts +1 -3
  162. package/src/content/fields/slices/Slice/SimpleSliceContent.ts +4 -1
  163. package/src/customtypes/CustomType.ts +6 -0
  164. package/src/customtypes/widgets/nestable/Link/ContentRelationshipResolver.ts +69 -0
  165. package/src/customtypes/widgets/nestable/{Link.ts → Link/index.ts} +5 -2
  166. package/lib/customtypes/widgets/nestable/Link.d.ts +0 -29
@@ -219,8 +219,6 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
219
219
  title?: string;
220
220
  } | null | undefined;
221
221
  }), ({
222
- __TYPE__: "ImageLink";
223
- } & {
224
222
  id: string;
225
223
  url: string;
226
224
  height: string;
@@ -238,17 +236,9 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
238
236
  size: string;
239
237
  } & {
240
238
  date?: string | null | undefined;
241
- } & {
242
- __TYPE__: "FileLink";
243
- } & {
244
- size?: string;
245
- }) | ({
246
- __TYPE__: "DocumentLink";
247
- } & {
239
+ }) | {
248
240
  id: string;
249
- }) | ({
250
- __TYPE__: "ExternalLink";
251
- } & {
241
+ } | ({
252
242
  url: string;
253
243
  } & {
254
244
  kind?: "web";
@@ -533,8 +523,6 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
533
523
  title?: string;
534
524
  } | null | undefined;
535
525
  }), ({
536
- __TYPE__: "ImageLink";
537
- } & {
538
526
  id: string;
539
527
  url: string;
540
528
  height: string;
@@ -552,17 +540,9 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
552
540
  size: string;
553
541
  } & {
554
542
  date?: string | null | undefined;
555
- } & {
556
- __TYPE__: "FileLink";
557
- } & {
558
- size?: string;
559
- }) | ({
560
- __TYPE__: "DocumentLink";
561
- } & {
543
+ }) | {
562
544
  id: string;
563
- }) | ({
564
- __TYPE__: "ExternalLink";
565
- } & {
545
+ } | ({
566
546
  url: string;
567
547
  } & {
568
548
  kind?: "web";
@@ -627,7 +607,7 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
627
607
  }>>]>]>>;
628
608
  }>>>;
629
609
  }>>]>;
630
- export type SimpleSliceContent = t.TypeOf<typeof SimpleSliceContent>;
610
+ export declare type SimpleSliceContent = t.TypeOf<typeof SimpleSliceContent>;
631
611
  export declare const isSimpleSliceContent: (u: unknown) => u is {
632
612
  type: string;
633
613
  __TYPE__: "EmptyContent";
@@ -1168,7 +1148,7 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
1168
1148
  }[];
1169
1149
  };
1170
1150
  export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
1171
- decode: (value: unknown) => import("fp-ts/lib/Either").Left<t.Errors> | import("fp-ts/lib/Either").Right<{
1151
+ decode: ((value: unknown) => import("fp-ts/lib/Either").Left<t.Errors> | import("fp-ts/lib/Either").Right<{
1172
1152
  type: string;
1173
1153
  __TYPE__: "EmptyContent";
1174
1154
  }> | import("fp-ts/lib/Either").Right<{
@@ -1434,6 +1414,278 @@ export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
1434
1414
  }))[];
1435
1415
  }> | import("fp-ts/lib/Either").Right<{
1436
1416
  __TYPE__: "SeparatorContent";
1437
- }> | undefined;
1417
+ }> | undefined) | ((i: unknown) => t.Validation<{
1418
+ __TYPE__: "GroupContentType";
1419
+ value: {
1420
+ __TYPE__: "GroupItemContent";
1421
+ value: [string, {
1422
+ type: string;
1423
+ __TYPE__: "EmptyContent";
1424
+ } | {
1425
+ __TYPE__: "BooleanContent";
1426
+ value: boolean;
1427
+ } | ({
1428
+ embed_url: string;
1429
+ type: string;
1430
+ } & {
1431
+ version?: string | number | null;
1432
+ title?: string | null | undefined;
1433
+ author_name?: string | null | undefined;
1434
+ author_url?: string | null | undefined;
1435
+ provider_name?: string | null | undefined;
1436
+ provider_url?: string | null | undefined;
1437
+ cache_age?: string | number | null;
1438
+ thumbnail_url?: string | null | undefined;
1439
+ thumbnail_width?: number | null | undefined;
1440
+ thumbnail_height?: number | null | undefined;
1441
+ html?: string | null | undefined;
1442
+ } & {
1443
+ __TYPE__: "EmbedContent";
1444
+ all: unknown;
1445
+ }) | {
1446
+ type: "Color";
1447
+ value: string;
1448
+ __TYPE__: "FieldContent";
1449
+ } | {
1450
+ type: "Date";
1451
+ value: string;
1452
+ __TYPE__: "FieldContent";
1453
+ } | {
1454
+ type: "Number";
1455
+ value: string;
1456
+ __TYPE__: "FieldContent";
1457
+ } | {
1458
+ type: "Range";
1459
+ value: string;
1460
+ __TYPE__: "FieldContent";
1461
+ } | {
1462
+ type: "Select";
1463
+ value: string;
1464
+ __TYPE__: "FieldContent";
1465
+ } | {
1466
+ type: "Text";
1467
+ value: string;
1468
+ __TYPE__: "FieldContent";
1469
+ } | {
1470
+ type: "Timestamp";
1471
+ value: string;
1472
+ __TYPE__: "FieldContent";
1473
+ } | ({
1474
+ position: {
1475
+ lat: number;
1476
+ lng: number;
1477
+ };
1478
+ } & {
1479
+ __TYPE__: "GeoPointContent";
1480
+ }) | ({
1481
+ origin: {
1482
+ id: string;
1483
+ url: string;
1484
+ width: number;
1485
+ height: number;
1486
+ };
1487
+ width: number;
1488
+ height: number;
1489
+ edit: {
1490
+ zoom: number;
1491
+ crop: {
1492
+ x: number;
1493
+ y: number;
1494
+ };
1495
+ background: string;
1496
+ };
1497
+ } & {
1498
+ url?: string;
1499
+ credits?: string | null;
1500
+ alt?: string | null;
1501
+ provider?: string | null | undefined;
1502
+ } & {
1503
+ thumbnails?: {
1504
+ [x: string]: {
1505
+ origin: {
1506
+ id: string;
1507
+ url: string;
1508
+ width: number;
1509
+ height: number;
1510
+ };
1511
+ width: number;
1512
+ height: number;
1513
+ edit: {
1514
+ zoom: number;
1515
+ crop: {
1516
+ x: number;
1517
+ y: number;
1518
+ };
1519
+ background: string;
1520
+ };
1521
+ } & {
1522
+ url?: string;
1523
+ credits?: string | null;
1524
+ alt?: string | null;
1525
+ provider?: string | null | undefined;
1526
+ };
1527
+ };
1528
+ } & {
1529
+ __TYPE__: "ImageContent";
1530
+ }) | {
1531
+ __TYPE__: "IntegrationFieldsContent";
1532
+ value: string;
1533
+ } | {
1534
+ __TYPE__: "LinkContent";
1535
+ value: ({
1536
+ __TYPE__: "ImageLink";
1537
+ } & {
1538
+ id: string;
1539
+ url: string;
1540
+ height: string;
1541
+ width: string;
1542
+ size: string;
1543
+ name: string;
1544
+ kind: string;
1545
+ } & {
1546
+ date?: string | null | undefined;
1547
+ }) | ({
1548
+ id: string;
1549
+ url: string;
1550
+ name: string;
1551
+ kind: string;
1552
+ size: string;
1553
+ } & {
1554
+ date?: string | null | undefined;
1555
+ } & {
1556
+ __TYPE__: "FileLink";
1557
+ } & {
1558
+ size?: string;
1559
+ }) | ({
1560
+ __TYPE__: "DocumentLink";
1561
+ } & {
1562
+ id: string;
1563
+ }) | ({
1564
+ __TYPE__: "ExternalLink";
1565
+ } & {
1566
+ url: string;
1567
+ } & {
1568
+ kind?: "web";
1569
+ target?: string | null | undefined;
1570
+ preview?: {
1571
+ title?: string;
1572
+ } | null | undefined;
1573
+ });
1574
+ } | {
1575
+ __TYPE__: "StructuredTextContent";
1576
+ value: (({
1577
+ type: "image";
1578
+ data: {
1579
+ origin: {
1580
+ id: string;
1581
+ url: string;
1582
+ width: number;
1583
+ height: number;
1584
+ };
1585
+ width: number;
1586
+ height: number;
1587
+ edit: {
1588
+ zoom: number;
1589
+ crop: {
1590
+ x: number;
1591
+ y: number;
1592
+ };
1593
+ background: string;
1594
+ };
1595
+ } & {
1596
+ url?: string;
1597
+ credits?: string | null;
1598
+ alt?: string | null;
1599
+ provider?: string | null | undefined;
1600
+ } & {
1601
+ linkTo?: ({
1602
+ __TYPE__: "ImageLink";
1603
+ } & {
1604
+ id: string;
1605
+ url: string;
1606
+ height: string;
1607
+ width: string;
1608
+ size: string;
1609
+ name: string;
1610
+ kind: string;
1611
+ } & {
1612
+ date?: string | null | undefined;
1613
+ }) | ({
1614
+ id: string;
1615
+ url: string;
1616
+ name: string;
1617
+ kind: string;
1618
+ size: string;
1619
+ } & {
1620
+ date?: string | null | undefined;
1621
+ } & {
1622
+ __TYPE__: "FileLink";
1623
+ } & {
1624
+ size?: string;
1625
+ }) | ({
1626
+ __TYPE__: "DocumentLink";
1627
+ } & {
1628
+ id: string;
1629
+ }) | ({
1630
+ __TYPE__: "ExternalLink";
1631
+ } & {
1632
+ url: string;
1633
+ } & {
1634
+ kind?: "web";
1635
+ target?: string | null | undefined;
1636
+ preview?: {
1637
+ title?: string;
1638
+ } | null | undefined;
1639
+ }) | null | undefined;
1640
+ };
1641
+ } & {
1642
+ label?: string | null | undefined;
1643
+ direction?: string | null | undefined;
1644
+ }) | ({
1645
+ type: "embed";
1646
+ data: {
1647
+ embed_url: string;
1648
+ type: string;
1649
+ } & {
1650
+ version?: string | number | null;
1651
+ title?: string | null | undefined;
1652
+ author_name?: string | null | undefined;
1653
+ author_url?: string | null | undefined;
1654
+ provider_name?: string | null | undefined;
1655
+ provider_url?: string | null | undefined;
1656
+ cache_age?: string | number | null;
1657
+ thumbnail_url?: string | null | undefined;
1658
+ thumbnail_width?: number | null | undefined;
1659
+ thumbnail_height?: number | null | undefined;
1660
+ html?: string | null | undefined;
1661
+ } & {
1662
+ __TYPE__: "EmbedContent";
1663
+ all: unknown;
1664
+ };
1665
+ } & {
1666
+ label?: string | null | undefined;
1667
+ direction?: string | null | undefined;
1668
+ }) | ({
1669
+ type: "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
1670
+ content: {
1671
+ text: string;
1672
+ } & {
1673
+ spans?: ({
1674
+ data?: unknown;
1675
+ } & {
1676
+ start: number;
1677
+ end: number;
1678
+ type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
1679
+ })[];
1680
+ };
1681
+ } & {
1682
+ label?: string;
1683
+ direction?: string;
1684
+ }))[];
1685
+ } | {
1686
+ __TYPE__: "SeparatorContent";
1687
+ }][];
1688
+ }[];
1689
+ }>);
1438
1690
  encode: (value: SimpleSliceContent) => import("../../../LegacyContentCtx").WithTypes<unknown> | undefined;
1439
1691
  };
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SimpleSliceLegacy = exports.isSimpleSliceContent = exports.SimpleSliceContent = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const t = tslib_1.__importStar(require("io-ts"));
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
6
  const GroupContent_1 = require("../../GroupContent");
7
7
  const nestable_1 = require("../../nestable");
8
8
  exports.SimpleSliceContent = t.union([nestable_1.NestableContent, GroupContent_1.GroupContent]);
@@ -10,7 +10,11 @@ const isSimpleSliceContent = (u) => (0, nestable_1.isNestableContent)(u) || (0,
10
10
  exports.isSimpleSliceContent = isSimpleSliceContent;
11
11
  const SimpleSliceLegacy = (ctx) => {
12
12
  return {
13
- decode: ((0, nestable_1.NestableLegacy)(ctx) || (0, GroupContent_1.GroupLegacy)(ctx)).decode.bind(null),
13
+ decode: (() => {
14
+ if (ctx.fieldType === "Group")
15
+ return (0, GroupContent_1.GroupLegacy)(ctx).decode.bind(null);
16
+ return (0, nestable_1.NestableLegacy)(ctx).decode.bind(null);
17
+ })(),
14
18
  encode: (value) => {
15
19
  switch (value.__TYPE__) {
16
20
  case "GroupContentType":