@prismicio/types-internal 2.9.0-alpha.0 → 2.9.0-alpha.2

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 (42) hide show
  1. package/lib/content/Document.d.ts +19 -19
  2. package/lib/content/Document.js +11 -0
  3. package/lib/content/LegacyContentCtx.d.ts +2 -17
  4. package/lib/content/LegacyContentCtx.js +4 -1
  5. package/lib/content/fields/GroupContent.js +13 -0
  6. package/lib/content/fields/RepeatableContent.d.ts +4 -78
  7. package/lib/content/fields/RepeatableContent.js +10 -14
  8. package/lib/content/fields/WidgetContent.d.ts +18 -18
  9. package/lib/content/fields/index.d.ts +1 -0
  10. package/lib/content/fields/index.js +1 -0
  11. package/lib/content/fields/nestable/NestableContent.d.ts +6 -6
  12. package/lib/content/fields/nestable/NestableContent.js +5 -17
  13. package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +727 -0
  14. package/lib/content/fields/nestable/RichTextContent/TextBlock.js +80 -0
  15. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +6 -6
  16. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +1 -1
  17. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +6 -6
  18. package/lib/content/fields/slices/Slice/SharedSliceContent.js +20 -4
  19. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +5 -5
  20. package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +5 -5
  21. package/lib/content/fields/slices/Slice/index.d.ts +10 -10
  22. package/lib/content/fields/slices/SliceItem.d.ts +10 -10
  23. package/lib/content/fields/slices/SlicesContent.d.ts +15 -15
  24. package/lib/customtypes/widgets/Widget.d.ts +0 -15
  25. package/lib/customtypes/widgets/Widget.js +0 -15
  26. package/lib/customtypes/widgets/nestable/Link.d.ts +8 -0
  27. package/lib/customtypes/widgets/nestable/Link.js +6 -5
  28. package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +1 -2
  29. package/lib/customtypes/widgets/nestable/NestableWidget.js +1 -18
  30. package/lib/customtypes/widgets/slices/SliceWidget.d.ts +327 -0
  31. package/lib/customtypes/widgets/slices/SliceWidget.js +8 -0
  32. package/package.json +1 -1
  33. package/src/content/Document.ts +12 -0
  34. package/src/content/LegacyContentCtx.ts +4 -1
  35. package/src/content/fields/GroupContent.ts +13 -0
  36. package/src/content/fields/RepeatableContent.ts +29 -38
  37. package/src/content/fields/index.ts +1 -0
  38. package/src/content/fields/nestable/NestableContent.ts +6 -20
  39. package/src/content/fields/slices/Slice/SharedSliceContent.ts +18 -0
  40. package/src/customtypes/widgets/Widget.ts +0 -15
  41. package/src/customtypes/widgets/nestable/Link.ts +7 -5
  42. package/src/customtypes/widgets/nestable/NestableWidget.ts +16 -34
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TextBlockLegacy = exports.ParagraphBlock = exports.TextBlock = exports.ValidatedSpans = exports.SpanLegacy = exports.Span = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const Either_1 = require("fp-ts/lib/Either");
6
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
7
+ const io_ts_types_1 = require("io-ts-types");
8
+ const nestable_1 = require("../../../../customtypes/widgets/nestable");
9
+ const function_1 = require("../../../../validators/function");
10
+ const LinkContent_1 = require("../LinkContent");
11
+ const linkSpan = (linkCodec) => t.strict({
12
+ data: linkCodec,
13
+ start: t.number,
14
+ end: t.number,
15
+ type: t.literal(nestable_1.RichTextNodeType.hyperlink),
16
+ });
17
+ const labelSpan = t.strict({
18
+ data: (0, io_ts_types_1.withFallback)(t.string, ""),
19
+ start: t.number,
20
+ end: t.number,
21
+ type: t.literal("label"),
22
+ });
23
+ const basicSpan = t.strict({
24
+ start: t.number,
25
+ end: t.number,
26
+ type: t.keyof({
27
+ [nestable_1.RichTextNodeType.strong]: null,
28
+ [nestable_1.RichTextNodeType.em]: null,
29
+ "list-item": null, // legacy case that should not happen, we shouldn't support this in new page builder or migration API
30
+ }),
31
+ });
32
+ exports.Span = t.union([linkSpan(LinkContent_1.Link), labelSpan, basicSpan]);
33
+ exports.SpanLegacy = t.union([linkSpan(LinkContent_1.LinkLegacy), labelSpan, basicSpan]);
34
+ const ValidatedSpans = (spanCodec) => {
35
+ return new t.Type("ValidatedSpans", (spans) => Array.isArray(spans) && spans.every(spanCodec.is), (spans, c) => {
36
+ if (Array.isArray(spans)) {
37
+ const res = spans
38
+ .reduce((acc, maybeSpan) => {
39
+ const decodedSpan = spanCodec.decode(maybeSpan);
40
+ if ((0, Either_1.isLeft)(decodedSpan))
41
+ return acc;
42
+ return [...acc, decodedSpan.right];
43
+ }, [])
44
+ .sort((m1, m2) => m1.start - m2.start);
45
+ return t.success(res);
46
+ }
47
+ else
48
+ return t.failure(spans, c);
49
+ }, (m) => {
50
+ return m.reduce((acc, meta) => {
51
+ const encoded = spanCodec.encode(meta);
52
+ return [...acc, encoded];
53
+ }, []);
54
+ });
55
+ };
56
+ exports.ValidatedSpans = ValidatedSpans;
57
+ const TextBlockCodec = (spanCodec, nodeFilter) => t.exact(t.intersection([
58
+ t.type({
59
+ type: nodeFilter
60
+ ? (0, function_1.refineType)(nestable_1.RichTextNodeTypeCodec, `string which isn't ${nestable_1.RichTextNodeType.image} ${nestable_1.RichTextNodeType.embed}`, nodeFilter)
61
+ : nestable_1.RichTextNodeTypeCodec,
62
+ content: t.intersection([
63
+ t.type({
64
+ text: t.string,
65
+ }),
66
+ t.partial({
67
+ spans: (0, exports.ValidatedSpans)(spanCodec),
68
+ }),
69
+ ]),
70
+ }),
71
+ t.partial({
72
+ label: t.string,
73
+ direction: t.string,
74
+ }),
75
+ ]));
76
+ /* These Text block will decode codec A and encode from codec B to A */
77
+ exports.TextBlock = TextBlockCodec(exports.Span, (nodeType) => nodeType !== nestable_1.RichTextNodeType.image && nodeType !== nestable_1.RichTextNodeType.embed);
78
+ /** A paragraph Text block. Paragraphs may contain spans. */
79
+ exports.ParagraphBlock = TextBlockCodec(exports.Span, (nodeType) => nodeType === nestable_1.RichTextNodeType.paragraph);
80
+ exports.TextBlockLegacy = TextBlockCodec(exports.SpanLegacy);
@@ -189,7 +189,7 @@ export declare const isCompositeSliceContent: (u: unknown) => u is {
189
189
  });
190
190
  } | {
191
191
  __TYPE__: "RepeatableContent";
192
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
192
+ type: "Link";
193
193
  value: {
194
194
  __TYPE__: "LinkContent";
195
195
  value: ({
@@ -600,7 +600,7 @@ export declare const isCompositeSliceContent: (u: unknown) => u is {
600
600
  });
601
601
  } | {
602
602
  __TYPE__: "RepeatableContent";
603
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
603
+ type: "Link";
604
604
  value: {
605
605
  __TYPE__: "LinkContent";
606
606
  value: ({
@@ -1013,7 +1013,7 @@ export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
1013
1013
  });
1014
1014
  } | {
1015
1015
  __TYPE__: "RepeatableContent";
1016
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
1016
+ type: "Link";
1017
1017
  value: {
1018
1018
  __TYPE__: "LinkContent";
1019
1019
  value: ({
@@ -1424,7 +1424,7 @@ export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
1424
1424
  });
1425
1425
  } | {
1426
1426
  __TYPE__: "RepeatableContent";
1427
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
1427
+ type: "Link";
1428
1428
  value: {
1429
1429
  __TYPE__: "LinkContent";
1430
1430
  value: ({
@@ -2082,7 +2082,7 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
2082
2082
  __TYPE__: t.LiteralC<"SeparatorContent">;
2083
2083
  }>>, t.ExactC<t.TypeC<{
2084
2084
  __TYPE__: t.LiteralC<"RepeatableContent">;
2085
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
2085
+ type: t.LiteralC<"Link">;
2086
2086
  value: t.ArrayC<t.ExactC<t.TypeC<{
2087
2087
  __TYPE__: t.LiteralC<"LinkContent">;
2088
2088
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -2580,7 +2580,7 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
2580
2580
  __TYPE__: t.LiteralC<"SeparatorContent">;
2581
2581
  }>>, t.ExactC<t.TypeC<{
2582
2582
  __TYPE__: t.LiteralC<"RepeatableContent">;
2583
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
2583
+ type: t.LiteralC<"Link">;
2584
2584
  value: t.ArrayC<t.ExactC<t.TypeC<{
2585
2585
  __TYPE__: t.LiteralC<"LinkContent">;
2586
2586
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -429,7 +429,7 @@ export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.TypeC<{
429
429
  __TYPE__: t.LiteralC<"SeparatorContent">;
430
430
  }>>, t.ExactC<t.TypeC<{
431
431
  __TYPE__: t.LiteralC<"RepeatableContent">;
432
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
432
+ type: t.LiteralC<"Link">;
433
433
  value: t.ArrayC<t.ExactC<t.TypeC<{
434
434
  __TYPE__: t.LiteralC<"LinkContent">;
435
435
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -190,7 +190,7 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
190
190
  });
191
191
  } | {
192
192
  __TYPE__: "RepeatableContent";
193
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
193
+ type: "Link";
194
194
  value: {
195
195
  __TYPE__: "LinkContent";
196
196
  value: ({
@@ -601,7 +601,7 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
601
601
  });
602
602
  } | {
603
603
  __TYPE__: "RepeatableContent";
604
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
604
+ type: "Link";
605
605
  value: {
606
606
  __TYPE__: "LinkContent";
607
607
  value: ({
@@ -1015,7 +1015,7 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
1015
1015
  });
1016
1016
  } | {
1017
1017
  __TYPE__: "RepeatableContent";
1018
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
1018
+ type: "Link";
1019
1019
  value: {
1020
1020
  __TYPE__: "LinkContent";
1021
1021
  value: ({
@@ -1426,7 +1426,7 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
1426
1426
  });
1427
1427
  } | {
1428
1428
  __TYPE__: "RepeatableContent";
1429
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
1429
+ type: "Link";
1430
1430
  value: {
1431
1431
  __TYPE__: "LinkContent";
1432
1432
  value: ({
@@ -2086,7 +2086,7 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
2086
2086
  __TYPE__: t.LiteralC<"SeparatorContent">;
2087
2087
  }>>, t.ExactC<t.TypeC<{
2088
2088
  __TYPE__: t.LiteralC<"RepeatableContent">;
2089
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
2089
+ type: t.LiteralC<"Link">;
2090
2090
  value: t.ArrayC<t.ExactC<t.TypeC<{
2091
2091
  __TYPE__: t.LiteralC<"LinkContent">;
2092
2092
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -2584,7 +2584,7 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
2584
2584
  __TYPE__: t.LiteralC<"SeparatorContent">;
2585
2585
  }>>, t.ExactC<t.TypeC<{
2586
2586
  __TYPE__: t.LiteralC<"RepeatableContent">;
2587
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
2587
+ type: t.LiteralC<"Link">;
2588
2588
  value: t.ArrayC<t.ExactC<t.TypeC<{
2589
2589
  __TYPE__: t.LiteralC<"LinkContent">;
2590
2590
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -12,8 +12,9 @@ const LegacyContentCtx_1 = require("../../../LegacyContentCtx");
12
12
  const utils_1 = require("../../../utils");
13
13
  const GroupContent_1 = require("../../GroupContent");
14
14
  const nestable_1 = require("../../nestable");
15
+ const RepeatableContent_1 = require("../../RepeatableContent");
15
16
  const withDefaultValues_1 = require("../../withDefaultValues");
16
- const RepeatableContent_1 = require("./RepeatableContent");
17
+ const RepeatableContent_2 = require("./RepeatableContent");
17
18
  const SlicePrimaryContent_1 = require("./SlicePrimaryContent");
18
19
  exports.SharedSliceContentType = "SharedSliceContent";
19
20
  const isSharedSliceContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.SharedSliceContentType;
@@ -31,7 +32,7 @@ const SharedSliceLegacy = (ctx) => {
31
32
  "variations",
32
33
  parsedSlice.variation,
33
34
  ]);
34
- const result = (0, RepeatableContent_1.RepeatableWidgetsLegacy)(itemsCtx).decode(parsedSlice.items);
35
+ const result = (0, RepeatableContent_2.RepeatableWidgetsLegacy)(itemsCtx).decode(parsedSlice.items);
35
36
  if (!result || (0, Either_1.isLeft)(result))
36
37
  return;
37
38
  return result.right;
@@ -76,7 +77,7 @@ const SharedSliceLegacy = (ctx) => {
76
77
  "variations",
77
78
  s.variation,
78
79
  ]);
79
- const result = (0, RepeatableContent_1.RepeatableWidgetsLegacy)(itemsCtx).encode(s.items);
80
+ const result = (0, RepeatableContent_2.RepeatableWidgetsLegacy)(itemsCtx).encode(s.items);
80
81
  return result;
81
82
  })() || [];
82
83
  return {
@@ -98,7 +99,7 @@ exports.SharedSliceContent = t.strict({
98
99
  __TYPE__: t.literal(exports.SharedSliceContentType),
99
100
  variation: t.string,
100
101
  primary: t.record(t.string, SlicePrimaryContent_1.SlicePrimaryContent),
101
- items: RepeatableContent_1.RepeatableWidgets,
102
+ items: RepeatableContent_2.RepeatableWidgets,
102
103
  });
103
104
  function sharedSliceContentWithDefaultValues(customType, content) {
104
105
  var _a, _b;
@@ -120,6 +121,7 @@ function traverseSharedSliceContent({ path, sliceKey, sliceName, model, content,
120
121
  var _a, _b;
121
122
  const fieldDef = (_b = (_a = model === null || model === void 0 ? void 0 : model.fields) === null || _a === void 0 ? void 0 : _a.primary) === null || _b === void 0 ? void 0 : _b[fieldKey];
122
123
  const transformedField = (() => {
124
+ var _a;
123
125
  if ((0, GroupContent_1.isGroupContent)(fieldContent)) {
124
126
  return (0, GroupContent_1.traverseGroupContent)({
125
127
  path: path.concat([
@@ -132,6 +134,20 @@ function traverseSharedSliceContent({ path, sliceKey, sliceName, model, content,
132
134
  model: (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.type) === customtypes_1.GroupFieldType ? fieldDef : undefined,
133
135
  })(transformWidget);
134
136
  }
137
+ else if ((0, RepeatableContent_1.isRepeatableContent)(fieldContent)) {
138
+ return (0, RepeatableContent_1.traverseRepeatableContent)({
139
+ path: path.concat([
140
+ { key: "primary", type: "primary" },
141
+ { key: fieldKey, type: "Widget" },
142
+ ]),
143
+ key: fieldKey,
144
+ apiId: fieldKey,
145
+ content: fieldContent,
146
+ model: (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.type) === "Link" && ((_a = fieldDef.config) === null || _a === void 0 ? void 0 : _a.repeat)
147
+ ? fieldDef
148
+ : undefined,
149
+ })(transformWidget);
150
+ }
135
151
  else if ((0, nestable_1.isNestableContent)(fieldContent)) {
136
152
  return transformWidget({
137
153
  path: path.concat([
@@ -427,7 +427,7 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
427
427
  __TYPE__: t.LiteralC<"SeparatorContent">;
428
428
  }>>, t.ExactC<t.TypeC<{
429
429
  __TYPE__: t.LiteralC<"RepeatableContent">;
430
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
430
+ type: t.LiteralC<"Link">;
431
431
  value: t.ArrayC<t.ExactC<t.TypeC<{
432
432
  __TYPE__: t.LiteralC<"LinkContent">;
433
433
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -683,7 +683,7 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
683
683
  });
684
684
  } | {
685
685
  __TYPE__: "RepeatableContent";
686
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
686
+ type: "Link";
687
687
  value: {
688
688
  __TYPE__: "LinkContent";
689
689
  value: ({
@@ -910,7 +910,7 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
910
910
  __TYPE__: "SeparatorContent";
911
911
  };
912
912
  export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
913
- decode: ((value: unknown) => import("fp-ts/lib/Either").Right<{
913
+ decode: ((value: unknown) => import("fp-ts/lib/Either").Left<t.Errors> | import("fp-ts/lib/Either").Right<{
914
914
  type: string;
915
915
  __TYPE__: "EmptyContent";
916
916
  }> | import("fp-ts/lib/Either").Right<{
@@ -1090,9 +1090,9 @@ export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
1090
1090
  } & {
1091
1091
  text: string;
1092
1092
  });
1093
- }> | t.Validation<{
1093
+ }> | import("fp-ts/lib/Either").Right<{
1094
1094
  __TYPE__: "RepeatableContent";
1095
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
1095
+ type: "Link";
1096
1096
  value: {
1097
1097
  __TYPE__: "LinkContent";
1098
1098
  value: ({
@@ -424,7 +424,7 @@ export declare const SlicePrimaryContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
424
424
  __TYPE__: t.LiteralC<"SeparatorContent">;
425
425
  }>>, t.ExactC<t.TypeC<{
426
426
  __TYPE__: t.LiteralC<"RepeatableContent">;
427
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
427
+ type: t.LiteralC<"Link">;
428
428
  value: t.ArrayC<t.ExactC<t.TypeC<{
429
429
  __TYPE__: t.LiteralC<"LinkContent">;
430
430
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -500,7 +500,7 @@ export declare const SlicePrimaryContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
500
500
  export declare type SlicePrimaryContent = t.TypeOf<typeof SlicePrimaryContent>;
501
501
  export declare type SlicePrimaryContentType = SlicePrimaryContent["__TYPE__"];
502
502
  export declare const SlicePrimaryLegacy: (ctx: LegacyContentCtx) => {
503
- decode(value: unknown): import("fp-ts/lib/Either").Left<t.Errors> | import("fp-ts/lib/Either").Right<{
503
+ decode(value: unknown): import("fp-ts/lib/Either").Right<{
504
504
  type: string;
505
505
  __TYPE__: "EmptyContent";
506
506
  }> | import("fp-ts/lib/Either").Right<{
@@ -682,7 +682,7 @@ export declare const SlicePrimaryLegacy: (ctx: LegacyContentCtx) => {
682
682
  });
683
683
  }> | import("fp-ts/lib/Either").Right<{
684
684
  __TYPE__: "RepeatableContent";
685
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
685
+ type: "Link";
686
686
  value: {
687
687
  __TYPE__: "LinkContent";
688
688
  value: ({
@@ -907,7 +907,7 @@ export declare const SlicePrimaryLegacy: (ctx: LegacyContentCtx) => {
907
907
  }))[];
908
908
  }> | import("fp-ts/lib/Either").Right<{
909
909
  __TYPE__: "SeparatorContent";
910
- }> | import("fp-ts/lib/Either").Right<GroupContent> | undefined;
910
+ }> | t.Validation<GroupContent> | undefined;
911
911
  encode(value: SlicePrimaryContent): import("../../../LegacyContentCtx").WithTypes<unknown> | undefined;
912
912
  };
913
913
  export declare const isSlicePrimaryContent: (u: unknown) => u is {
@@ -1092,7 +1092,7 @@ export declare const isSlicePrimaryContent: (u: unknown) => u is {
1092
1092
  });
1093
1093
  } | {
1094
1094
  __TYPE__: "RepeatableContent";
1095
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
1095
+ type: "Link";
1096
1096
  value: {
1097
1097
  __TYPE__: "LinkContent";
1098
1098
  value: ({
@@ -183,7 +183,7 @@ export declare const SliceLegacy: (ctx: LegacyContentCtx) => {
183
183
  });
184
184
  }> | import("fp-ts/lib/Either").Right<{
185
185
  __TYPE__: "RepeatableContent";
186
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
186
+ type: "Link";
187
187
  value: {
188
188
  __TYPE__: "LinkContent";
189
189
  value: ({
@@ -593,7 +593,7 @@ export declare const SliceLegacy: (ctx: LegacyContentCtx) => {
593
593
  });
594
594
  } | {
595
595
  __TYPE__: "RepeatableContent";
596
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
596
+ type: "Link";
597
597
  value: {
598
598
  __TYPE__: "LinkContent";
599
599
  value: ({
@@ -1004,7 +1004,7 @@ export declare const SliceLegacy: (ctx: LegacyContentCtx) => {
1004
1004
  });
1005
1005
  } | {
1006
1006
  __TYPE__: "RepeatableContent";
1007
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
1007
+ type: "Link";
1008
1008
  value: {
1009
1009
  __TYPE__: "LinkContent";
1010
1010
  value: ({
@@ -1417,7 +1417,7 @@ export declare const SliceLegacy: (ctx: LegacyContentCtx) => {
1417
1417
  });
1418
1418
  } | {
1419
1419
  __TYPE__: "RepeatableContent";
1420
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
1420
+ type: "Link";
1421
1421
  value: {
1422
1422
  __TYPE__: "LinkContent";
1423
1423
  value: ({
@@ -1828,7 +1828,7 @@ export declare const SliceLegacy: (ctx: LegacyContentCtx) => {
1828
1828
  });
1829
1829
  } | {
1830
1830
  __TYPE__: "RepeatableContent";
1831
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
1831
+ type: "Link";
1832
1832
  value: {
1833
1833
  __TYPE__: "LinkContent";
1834
1834
  value: ({
@@ -2483,7 +2483,7 @@ export declare const SliceContent: t.UnionC<[t.ExactC<t.TypeC<{
2483
2483
  __TYPE__: t.LiteralC<"SeparatorContent">;
2484
2484
  }>>, t.ExactC<t.TypeC<{
2485
2485
  __TYPE__: t.LiteralC<"RepeatableContent">;
2486
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
2486
+ type: t.LiteralC<"Link">;
2487
2487
  value: t.ArrayC<t.ExactC<t.TypeC<{
2488
2488
  __TYPE__: t.LiteralC<"LinkContent">;
2489
2489
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -2981,7 +2981,7 @@ export declare const SliceContent: t.UnionC<[t.ExactC<t.TypeC<{
2981
2981
  __TYPE__: t.LiteralC<"SeparatorContent">;
2982
2982
  }>>, t.ExactC<t.TypeC<{
2983
2983
  __TYPE__: t.LiteralC<"RepeatableContent">;
2984
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
2984
+ type: t.LiteralC<"Link">;
2985
2985
  value: t.ArrayC<t.ExactC<t.TypeC<{
2986
2986
  __TYPE__: t.LiteralC<"LinkContent">;
2987
2987
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -3481,7 +3481,7 @@ export declare const SliceContent: t.UnionC<[t.ExactC<t.TypeC<{
3481
3481
  __TYPE__: t.LiteralC<"SeparatorContent">;
3482
3482
  }>>, t.ExactC<t.TypeC<{
3483
3483
  __TYPE__: t.LiteralC<"RepeatableContent">;
3484
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
3484
+ type: t.LiteralC<"Link">;
3485
3485
  value: t.ArrayC<t.ExactC<t.TypeC<{
3486
3486
  __TYPE__: t.LiteralC<"LinkContent">;
3487
3487
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -3979,7 +3979,7 @@ export declare const SliceContent: t.UnionC<[t.ExactC<t.TypeC<{
3979
3979
  __TYPE__: t.LiteralC<"SeparatorContent">;
3980
3980
  }>>, t.ExactC<t.TypeC<{
3981
3981
  __TYPE__: t.LiteralC<"RepeatableContent">;
3982
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
3982
+ type: t.LiteralC<"Link">;
3983
3983
  value: t.ArrayC<t.ExactC<t.TypeC<{
3984
3984
  __TYPE__: t.LiteralC<"LinkContent">;
3985
3985
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -4476,7 +4476,7 @@ export declare const SliceContent: t.UnionC<[t.ExactC<t.TypeC<{
4476
4476
  __TYPE__: t.LiteralC<"SeparatorContent">;
4477
4477
  }>>, t.ExactC<t.TypeC<{
4478
4478
  __TYPE__: t.LiteralC<"RepeatableContent">;
4479
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
4479
+ type: t.LiteralC<"Link">;
4480
4480
  value: t.ArrayC<t.ExactC<t.TypeC<{
4481
4481
  __TYPE__: t.LiteralC<"LinkContent">;
4482
4482
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -435,7 +435,7 @@ export declare const SliceItemContent: t.TypeC<{
435
435
  __TYPE__: t.LiteralC<"SeparatorContent">;
436
436
  }>>, t.ExactC<t.TypeC<{
437
437
  __TYPE__: t.LiteralC<"RepeatableContent">;
438
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
438
+ type: t.LiteralC<"Link">;
439
439
  value: t.ArrayC<t.ExactC<t.TypeC<{
440
440
  __TYPE__: t.LiteralC<"LinkContent">;
441
441
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -933,7 +933,7 @@ export declare const SliceItemContent: t.TypeC<{
933
933
  __TYPE__: t.LiteralC<"SeparatorContent">;
934
934
  }>>, t.ExactC<t.TypeC<{
935
935
  __TYPE__: t.LiteralC<"RepeatableContent">;
936
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
936
+ type: t.LiteralC<"Link">;
937
937
  value: t.ArrayC<t.ExactC<t.TypeC<{
938
938
  __TYPE__: t.LiteralC<"LinkContent">;
939
939
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -1433,7 +1433,7 @@ export declare const SliceItemContent: t.TypeC<{
1433
1433
  __TYPE__: t.LiteralC<"SeparatorContent">;
1434
1434
  }>>, t.ExactC<t.TypeC<{
1435
1435
  __TYPE__: t.LiteralC<"RepeatableContent">;
1436
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
1436
+ type: t.LiteralC<"Link">;
1437
1437
  value: t.ArrayC<t.ExactC<t.TypeC<{
1438
1438
  __TYPE__: t.LiteralC<"LinkContent">;
1439
1439
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -1931,7 +1931,7 @@ export declare const SliceItemContent: t.TypeC<{
1931
1931
  __TYPE__: t.LiteralC<"SeparatorContent">;
1932
1932
  }>>, t.ExactC<t.TypeC<{
1933
1933
  __TYPE__: t.LiteralC<"RepeatableContent">;
1934
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
1934
+ type: t.LiteralC<"Link">;
1935
1935
  value: t.ArrayC<t.ExactC<t.TypeC<{
1936
1936
  __TYPE__: t.LiteralC<"LinkContent">;
1937
1937
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -2428,7 +2428,7 @@ export declare const SliceItemContent: t.TypeC<{
2428
2428
  __TYPE__: t.LiteralC<"SeparatorContent">;
2429
2429
  }>>, t.ExactC<t.TypeC<{
2430
2430
  __TYPE__: t.LiteralC<"RepeatableContent">;
2431
- type: t.UnionC<[t.LiteralC<"Color">, t.LiteralC<"Boolean">, t.LiteralC<"Embed">, t.LiteralC<"GeoPoint">, t.LiteralC<"Date">, t.LiteralC<"Number">, t.LiteralC<"Range">, t.LiteralC<"StructuredText">, t.LiteralC<"Select">, t.LiteralC<"Separator">, t.LiteralC<"Text">, t.LiteralC<"Timestamp">, t.LiteralC<"Link">, t.LiteralC<"Image">, t.LiteralC<"IntegrationFields">]>;
2431
+ type: t.LiteralC<"Link">;
2432
2432
  value: t.ArrayC<t.ExactC<t.TypeC<{
2433
2433
  __TYPE__: t.LiteralC<"LinkContent">;
2434
2434
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
@@ -2702,7 +2702,7 @@ export declare const SlicesItemLegacy: (ctx: LegacyContentCtx) => t.Type<{
2702
2702
  });
2703
2703
  } | {
2704
2704
  __TYPE__: "RepeatableContent";
2705
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
2705
+ type: "Link";
2706
2706
  value: {
2707
2707
  __TYPE__: "LinkContent";
2708
2708
  value: ({
@@ -3112,7 +3112,7 @@ export declare const SlicesItemLegacy: (ctx: LegacyContentCtx) => t.Type<{
3112
3112
  });
3113
3113
  } | {
3114
3114
  __TYPE__: "RepeatableContent";
3115
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
3115
+ type: "Link";
3116
3116
  value: {
3117
3117
  __TYPE__: "LinkContent";
3118
3118
  value: ({
@@ -3523,7 +3523,7 @@ export declare const SlicesItemLegacy: (ctx: LegacyContentCtx) => t.Type<{
3523
3523
  });
3524
3524
  } | {
3525
3525
  __TYPE__: "RepeatableContent";
3526
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
3526
+ type: "Link";
3527
3527
  value: {
3528
3528
  __TYPE__: "LinkContent";
3529
3529
  value: ({
@@ -3936,7 +3936,7 @@ export declare const SlicesItemLegacy: (ctx: LegacyContentCtx) => t.Type<{
3936
3936
  });
3937
3937
  } | {
3938
3938
  __TYPE__: "RepeatableContent";
3939
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
3939
+ type: "Link";
3940
3940
  value: {
3941
3941
  __TYPE__: "LinkContent";
3942
3942
  value: ({
@@ -4347,7 +4347,7 @@ export declare const SlicesItemLegacy: (ctx: LegacyContentCtx) => t.Type<{
4347
4347
  });
4348
4348
  } | {
4349
4349
  __TYPE__: "RepeatableContent";
4350
- type: "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp";
4350
+ type: "Link";
4351
4351
  value: {
4352
4352
  __TYPE__: "LinkContent";
4353
4353
  value: ({