@prismicio/types-internal 2.0.0-alpha.1 → 2.0.0-alpha.3
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.
- package/lib/common/WidgetKey.d.ts +1 -1
- package/lib/common/WidgetKey.js +1 -1
- package/lib/common/index.js +1 -1
- package/lib/content/Document.d.ts +4 -4
- package/lib/content/Document.js +1 -1
- package/lib/content/LegacyContentCtx.d.ts +2 -2
- package/lib/content/LegacyContentCtx.js +1 -1
- package/lib/content/fields/EmptyContent.d.ts +1 -1
- package/lib/content/fields/EmptyContent.js +1 -1
- package/lib/content/fields/GroupContent.d.ts +4 -4
- package/lib/content/fields/GroupContent.js +1 -1
- package/lib/content/fields/UIDContent.d.ts +1 -1
- package/lib/content/fields/UIDContent.js +1 -1
- package/lib/content/fields/WidgetContent.d.ts +2 -2
- package/lib/content/fields/WidgetContent.js +1 -1
- package/lib/content/fields/index.js +5 -5
- package/lib/content/fields/nestable/BooleanContent.d.ts +1 -1
- package/lib/content/fields/nestable/BooleanContent.js +1 -1
- package/lib/content/fields/nestable/EmbedContent.d.ts +2 -2
- package/lib/content/fields/nestable/EmbedContent.js +1 -1
- package/lib/content/fields/nestable/FieldContent/ColorContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/ColorContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/DateContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/DateContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/NumberContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/NumberContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/RangeContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/RangeContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/SelectContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/SelectContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/TextContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/TextContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/TimestampContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/TimestampContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/index.d.ts +2 -2
- package/lib/content/fields/nestable/FieldContent/index.js +9 -9
- package/lib/content/fields/nestable/GeoPointContent.d.ts +1 -1
- package/lib/content/fields/nestable/GeoPointContent.js +1 -1
- package/lib/content/fields/nestable/ImageContent.d.ts +2 -2
- package/lib/content/fields/nestable/ImageContent.js +1 -1
- package/lib/content/fields/nestable/IntegrationFieldContent.d.ts +1 -1
- package/lib/content/fields/nestable/IntegrationFieldContent.js +1 -1
- package/lib/content/fields/nestable/LinkContent.d.ts +6 -6
- package/lib/content/fields/nestable/LinkContent.js +1 -1
- package/lib/content/fields/nestable/NestableContent.d.ts +2 -2
- package/lib/content/fields/nestable/NestableContent.js +1 -1
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +7 -7
- package/lib/content/fields/nestable/RichTextContent/Blocks.js +2 -2
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +1 -1
- package/lib/content/fields/nestable/RichTextContent/index.js +2 -2
- package/lib/content/fields/nestable/SeparatorContent.d.ts +1 -1
- package/lib/content/fields/nestable/SeparatorContent.js +1 -1
- package/lib/content/fields/nestable/index.js +10 -10
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +1 -1
- package/lib/content/fields/slices/Slice/CompositeSliceContent.js +1 -1
- package/lib/content/fields/slices/Slice/RepeatableContent.js +1 -1
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +1 -1
- package/lib/content/fields/slices/Slice/SharedSliceContent.js +1 -1
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +1 -1
- package/lib/content/fields/slices/Slice/SimpleSliceContent.js +1 -1
- package/lib/content/fields/slices/Slice/index.d.ts +1 -1
- package/lib/content/fields/slices/Slice/index.js +1 -1
- package/lib/content/fields/slices/SliceItem.d.ts +1 -1
- package/lib/content/fields/slices/SliceItem.js +1 -1
- package/lib/content/fields/slices/SlicesContent.d.ts +2 -2
- package/lib/content/fields/slices/SlicesContent.js +1 -1
- package/lib/content/fields/slices/index.js +5 -5
- package/lib/content/index.js +3 -3
- package/lib/content/utils.d.ts +2 -2
- package/lib/content/utils.js +2 -4
- package/lib/customtypes/CustomType.d.ts +2 -2
- package/lib/customtypes/CustomType.js +1 -1
- package/lib/customtypes/Section.d.ts +2 -2
- package/lib/customtypes/Section.js +1 -1
- package/lib/customtypes/diff/Changes.d.ts +4 -4
- package/lib/customtypes/diff/SharedSlice.d.ts +3 -671
- package/lib/customtypes/diff/Variation.d.ts +3 -657
- package/lib/customtypes/diff/index.js +3 -3
- package/lib/customtypes/index.js +4 -4
- package/lib/customtypes/widgets/Group.d.ts +1 -1
- package/lib/customtypes/widgets/Group.js +1 -1
- package/lib/customtypes/widgets/UID.d.ts +1 -1
- package/lib/customtypes/widgets/UID.js +1 -1
- package/lib/customtypes/widgets/Widget.d.ts +3 -3
- package/lib/customtypes/widgets/Widget.js +3 -3
- package/lib/customtypes/widgets/index.js +6 -6
- package/lib/customtypes/widgets/nestable/BooleanField.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/BooleanField.js +1 -1
- package/lib/customtypes/widgets/nestable/Color.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Color.js +1 -1
- package/lib/customtypes/widgets/nestable/Date.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Date.js +1 -1
- package/lib/customtypes/widgets/nestable/Embed.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Embed.js +1 -1
- package/lib/customtypes/widgets/nestable/GeoPoint.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/GeoPoint.js +1 -1
- package/lib/customtypes/widgets/nestable/Image.d.ts +3 -3
- package/lib/customtypes/widgets/nestable/Image.js +2 -2
- package/lib/customtypes/widgets/nestable/IntegrationField.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/IntegrationField.js +1 -1
- package/lib/customtypes/widgets/nestable/Link.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Link.js +1 -1
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/NestableWidget.js +1 -1
- package/lib/customtypes/widgets/nestable/Number.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Number.js +1 -1
- package/lib/customtypes/widgets/nestable/Range.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Range.js +1 -1
- package/lib/customtypes/widgets/nestable/RichText.d.ts +3 -3
- package/lib/customtypes/widgets/nestable/RichText.js +2 -2
- package/lib/customtypes/widgets/nestable/Select.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Select.js +1 -1
- package/lib/customtypes/widgets/nestable/Separator.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Separator.js +1 -1
- package/lib/customtypes/widgets/nestable/Text.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Text.js +1 -1
- package/lib/customtypes/widgets/nestable/Timestamp.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Timestamp.js +1 -1
- package/lib/customtypes/widgets/nestable/index.js +16 -16
- package/lib/customtypes/widgets/shared/ImageConstraint.d.ts +1 -1
- package/lib/customtypes/widgets/shared/ImageConstraint.js +1 -1
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +1 -1
- package/lib/customtypes/widgets/slices/CompositeSlice.js +1 -1
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +1 -1
- package/lib/customtypes/widgets/slices/LegacySlice.js +2 -2
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +2 -2
- package/lib/customtypes/widgets/slices/SharedSlice.js +1 -1
- package/lib/customtypes/widgets/slices/SharedSliceRef.d.ts +1 -1
- package/lib/customtypes/widgets/slices/SharedSliceRef.js +1 -1
- package/lib/customtypes/widgets/slices/Slice.d.ts +2 -2
- package/lib/customtypes/widgets/slices/Slices.d.ts +5 -5
- package/lib/customtypes/widgets/slices/Slices.js +4 -4
- package/lib/customtypes/widgets/slices/SlicesTypes.d.ts +1 -1
- package/lib/customtypes/widgets/slices/SlicesTypes.js +1 -1
- package/lib/customtypes/widgets/slices/index.js +6 -6
- package/lib/utils/index.js +2 -2
- package/lib/validators/DateFromString.js +1 -1
- package/lib/validators/DateFromStringOrNumber.js +1 -1
- package/lib/validators/DateFromTsMs.js +1 -1
- package/lib/validators/IntFromNumber.d.ts +2 -2
- package/lib/validators/IntFromNumber.js +1 -1
- package/lib/validators/IntFromPixels.d.ts +2 -2
- package/lib/validators/IntFromPixels.js +1 -1
- package/lib/validators/NonEmptyString.js +1 -1
- package/lib/validators/NonEmptyStringOrNull.js +1 -1
- package/lib/validators/NumberOrNull.js +1 -1
- package/lib/validators/StringFromBoolean.d.ts +2 -2
- package/lib/validators/StringFromBoolean.js +1 -1
- package/lib/validators/StringFromNumber.d.ts +2 -2
- package/lib/validators/StringFromNumber.js +1 -1
- package/lib/validators/StringOrNull.js +1 -1
- package/lib/validators/TrimmedString.d.ts +2 -2
- package/lib/validators/TrimmedString.js +1 -1
- package/lib/validators/function.js +1 -1
- package/lib/validators/index.js +12 -12
- package/package.json +1 -1
- package/lib/content/CustomType.d.ts +0 -2972
- package/lib/content/CustomType.js +0 -15
- package/lib/content/fields/nestable/FieldContent.d.ts +0 -32
- package/lib/content/fields/nestable/FieldContent.js +0 -37
- package/lib/content/fields/nestable/Image.d.ts +0 -103
- package/lib/content/fields/nestable/Image.js +0 -13
- package/lib/content/fields/nestable/RichTextContent.d.ts +0 -376
- package/lib/content/fields/nestable/RichTextContent.js +0 -16
- package/lib/content/fields/slices/CompositeSliceContent.d.ts +0 -677
- package/lib/content/fields/slices/CompositeSliceContent.js +0 -14
- package/lib/content/fields/slices/RepeatableContent.d.ts +0 -338
- package/lib/content/fields/slices/RepeatableContent.js +0 -16
- package/lib/content/fields/slices/SharedSliceContent.d.ts +0 -678
- package/lib/content/fields/slices/SharedSliceContent.js +0 -15
- package/lib/content/fields/slices/SimpleSliceContent.d.ts +0 -675
- package/lib/content/fields/slices/SimpleSliceContent.js +0 -8
- package/lib/customtypes/Comparators/Changes.d.ts +0 -17
- package/lib/customtypes/Comparators/Changes.js +0 -9
- package/lib/customtypes/Comparators/SharedSlice.d.ts +0 -679
- package/lib/customtypes/Comparators/SharedSlice.js +0 -55
- package/lib/customtypes/Comparators/Variation.d.ts +0 -662
- package/lib/customtypes/Comparators/Variation.js +0 -75
- package/lib/customtypes/Comparators/index.d.ts +0 -3
- package/lib/customtypes/Comparators/index.js +0 -6
- package/lib/customtypes/Format.d.ts +0 -4
- package/lib/customtypes/Format.js +0 -8
- package/lib/customtypes/comp/Changes.d.ts +0 -17
- package/lib/customtypes/comp/Changes.js +0 -9
- package/lib/customtypes/comp/SharedSlice.d.ts +0 -679
- package/lib/customtypes/comp/SharedSlice.js +0 -55
- package/lib/customtypes/comp/Variation.d.ts +0 -662
- package/lib/customtypes/comp/Variation.js +0 -76
- package/lib/customtypes/comp/index.d.ts +0 -3
- package/lib/customtypes/comp/index.js +0 -6
- package/lib/customtypes/utils/Comparator.d.ts +0 -1353
- package/lib/customtypes/utils/Comparator.js +0 -59
- package/lib/customtypes/utils/index.d.ts +0 -1
- package/lib/customtypes/utils/index.js +0 -4
- package/lib/customtypes/widgets/WidgetTypes.d.ts +0 -22
- package/lib/customtypes/widgets/WidgetTypes.js +0 -25
- package/lib/documents/DocumentData.d.ts +0 -6
- package/lib/documents/DocumentData.js +0 -15
- package/lib/documents/index.d.ts +0 -2
- package/lib/documents/index.js +0 -7
- package/lib/documents/widgets/EmptyContent.d.ts +0 -8
- package/lib/documents/widgets/EmptyContent.js +0 -9
- package/lib/documents/widgets/GroupContent.d.ts +0 -16
- package/lib/documents/widgets/GroupContent.js +0 -60
- package/lib/documents/widgets/SimpleWidgetContent.d.ts +0 -20
- package/lib/documents/widgets/SimpleWidgetContent.js +0 -75
- package/lib/documents/widgets/StaticWidgetContent.d.ts +0 -10
- package/lib/documents/widgets/StaticWidgetContent.js +0 -26
- package/lib/documents/widgets/UIDContent.d.ts +0 -7
- package/lib/documents/widgets/UIDContent.js +0 -10
- package/lib/documents/widgets/index.d.ts +0 -38
- package/lib/documents/widgets/index.js +0 -40
- package/lib/documents/widgets/nestable/BooleanContent.d.ts +0 -8
- package/lib/documents/widgets/nestable/BooleanContent.js +0 -11
- package/lib/documents/widgets/nestable/EmbedContent.d.ts +0 -42
- package/lib/documents/widgets/nestable/EmbedContent.js +0 -35
- package/lib/documents/widgets/nestable/FieldContent.d.ts +0 -13
- package/lib/documents/widgets/nestable/FieldContent.js +0 -37
- package/lib/documents/widgets/nestable/GeoPointContent.d.ts +0 -17
- package/lib/documents/widgets/nestable/GeoPointContent.js +0 -13
- package/lib/documents/widgets/nestable/ImageContent.d.ts +0 -127
- package/lib/documents/widgets/nestable/ImageContent.js +0 -41
- package/lib/documents/widgets/nestable/IntegrationFieldsContent.d.ts +0 -8
- package/lib/documents/widgets/nestable/IntegrationFieldsContent.js +0 -16
- package/lib/documents/widgets/nestable/Link/DocumentLink.d.ts +0 -12
- package/lib/documents/widgets/nestable/Link/DocumentLink.js +0 -13
- package/lib/documents/widgets/nestable/Link/ExternalLink.d.ts +0 -24
- package/lib/documents/widgets/nestable/Link/ExternalLink.js +0 -24
- package/lib/documents/widgets/nestable/Link/FileLink.d.ts +0 -22
- package/lib/documents/widgets/nestable/Link/FileLink.js +0 -25
- package/lib/documents/widgets/nestable/Link/ImageLink.d.ts +0 -28
- package/lib/documents/widgets/nestable/Link/ImageLink.js +0 -26
- package/lib/documents/widgets/nestable/Link/LinkContent.d.ts +0 -42
- package/lib/documents/widgets/nestable/Link/LinkContent.js +0 -17
- package/lib/documents/widgets/nestable/Link/index.d.ts +0 -90
- package/lib/documents/widgets/nestable/Link/index.js +0 -35
- package/lib/documents/widgets/nestable/SeparatorContent.d.ts +0 -11
- package/lib/documents/widgets/nestable/SeparatorContent.js +0 -15
- package/lib/documents/widgets/nestable/StructuredTextContent/Block.d.ts +0 -314
- package/lib/documents/widgets/nestable/StructuredTextContent/Block.js +0 -98
- package/lib/documents/widgets/nestable/StructuredTextContent/index.d.ts +0 -9
- package/lib/documents/widgets/nestable/StructuredTextContent/index.js +0 -14
- package/lib/documents/widgets/nestable/index.d.ts +0 -26
- package/lib/documents/widgets/nestable/index.js +0 -39
- package/lib/documents/widgets/slices/CompositeSliceContent.d.ts +0 -14
- package/lib/documents/widgets/slices/CompositeSliceContent.js +0 -52
- package/lib/documents/widgets/slices/SharedSliceContent.d.ts +0 -15
- package/lib/documents/widgets/slices/SharedSliceContent.js +0 -63
- package/lib/documents/widgets/slices/SimpleSliceContent.d.ts +0 -6
- package/lib/documents/widgets/slices/SimpleSliceContent.js +0 -6
- package/lib/documents/widgets/slices/SliceWidgetContent.d.ts +0 -8
- package/lib/documents/widgets/slices/SliceWidgetContent.js +0 -26
- package/lib/documents/widgets/slices/SlicesContent.d.ts +0 -17
- package/lib/documents/widgets/slices/SlicesContent.js +0 -52
- package/lib/documents/widgets/slices/index.d.ts +0 -5
- package/lib/documents/widgets/slices/index.js +0 -8
- package/lib/index.d.ts +0 -3
- package/lib/index.js +0 -7
|
@@ -24,7 +24,7 @@ export declare const Meta: t.ExactC<t.IntersectionC<[t.PartialC<{
|
|
|
24
24
|
rtl: null;
|
|
25
25
|
}>, t.LiteralC<"label">]>;
|
|
26
26
|
}>]>>;
|
|
27
|
-
export
|
|
27
|
+
export type Meta = t.TypeOf<typeof Meta>;
|
|
28
28
|
export declare const Span: t.ExactC<t.IntersectionC<[t.PartialC<{
|
|
29
29
|
data: t.UnknownC;
|
|
30
30
|
}>, t.TypeC<{
|
|
@@ -49,7 +49,7 @@ export declare const Span: t.ExactC<t.IntersectionC<[t.PartialC<{
|
|
|
49
49
|
rtl: null;
|
|
50
50
|
}>, t.LiteralC<"label">]>;
|
|
51
51
|
}>]>>;
|
|
52
|
-
export
|
|
52
|
+
export type Span = Meta;
|
|
53
53
|
export declare const ValidatedMetas: (linkCodec: LinkCodec) => t.Type<({
|
|
54
54
|
data?: unknown;
|
|
55
55
|
} & {
|
|
@@ -170,7 +170,7 @@ export declare const ImageBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
170
170
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
171
171
|
direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
172
172
|
}>]>>;
|
|
173
|
-
export
|
|
173
|
+
export type ImageBlock = t.TypeOf<typeof ImageBlock>;
|
|
174
174
|
export declare function checkImageBlock(block: Block): block is ImageBlock;
|
|
175
175
|
export declare const EmbedBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
176
176
|
type: t.LiteralC<"embed">;
|
|
@@ -196,9 +196,9 @@ export declare const EmbedBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
196
196
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
197
197
|
direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
198
198
|
}>]>>;
|
|
199
|
-
export
|
|
199
|
+
export type EmbedBlock = t.TypeOf<typeof EmbedBlock>;
|
|
200
200
|
export declare function checkEmbedBlock(block: Block): block is EmbedBlock;
|
|
201
|
-
|
|
201
|
+
type LinkCodec = typeof Link | typeof LinkLegacy;
|
|
202
202
|
export declare const TextBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
203
203
|
type: t.Type<"paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
|
|
204
204
|
content: t.IntersectionC<[t.TypeC<{
|
|
@@ -222,7 +222,7 @@ export declare const TextBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
222
222
|
label: t.StringC;
|
|
223
223
|
direction: t.StringC;
|
|
224
224
|
}>]>>;
|
|
225
|
-
export
|
|
225
|
+
export type TextBlock = t.TypeOf<typeof TextBlock>;
|
|
226
226
|
export declare const BlockLegacy: t.Type<({
|
|
227
227
|
type: "image";
|
|
228
228
|
data: {
|
|
@@ -590,5 +590,5 @@ export declare const Block: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
590
590
|
label: t.StringC;
|
|
591
591
|
direction: t.StringC;
|
|
592
592
|
}>]>>]>;
|
|
593
|
-
export
|
|
593
|
+
export type Block = t.TypeOf<typeof Block>;
|
|
594
594
|
export {};
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Block = exports.BlockLegacy = exports.TextBlock = exports.checkEmbedBlock = exports.EmbedBlock = exports.checkImageBlock = exports.ImageBlock = exports.ValidatedMetas = exports.Span = exports.Meta = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
|
-
const E =
|
|
6
|
+
const E = tslib_1.__importStar(require("fp-ts/lib/Either"));
|
|
7
7
|
const function_1 = require("fp-ts/lib/function");
|
|
8
|
-
const t =
|
|
8
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
9
9
|
const nestable_1 = require("../../../../customtypes/widgets/nestable");
|
|
10
10
|
const validators_1 = require("../../../../validators");
|
|
11
11
|
const function_2 = require("../../../../validators/function");
|
|
@@ -267,7 +267,7 @@ export declare const RichTextContent: t.ExactC<t.TypeC<{
|
|
|
267
267
|
direction: t.StringC;
|
|
268
268
|
}>]>>]>>;
|
|
269
269
|
}>>;
|
|
270
|
-
export
|
|
270
|
+
export type RichTextContent = t.TypeOf<typeof RichTextContent>;
|
|
271
271
|
export * from "./Blocks";
|
|
272
272
|
export declare const RichTextLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
273
273
|
__TYPE__: "StructuredTextContent";
|
|
@@ -4,7 +4,7 @@ exports.RichTextLegacy = exports.RichTextContent = exports.isRichTextContent = e
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const utils_1 = require("../../../utils");
|
|
9
9
|
const Blocks_1 = require("./Blocks");
|
|
10
10
|
exports.RichTextContentType = "StructuredTextContent";
|
|
@@ -15,7 +15,7 @@ exports.RichTextContent = t.strict({
|
|
|
15
15
|
__TYPE__: t.literal(exports.RichTextContentType),
|
|
16
16
|
value: t.array(Blocks_1.Block),
|
|
17
17
|
});
|
|
18
|
-
|
|
18
|
+
tslib_1.__exportStar(require("./Blocks"), exports);
|
|
19
19
|
const RichTextLegacy = (ctx) => new t.Type("RichTextLegacy", exports.isRichTextContent, (u) => {
|
|
20
20
|
return (0, function_1.pipe)(legacyReader.decode(u), fp_ts_1.either.map((r) => exports.RichTextContent.encode({ value: r, __TYPE__: exports.RichTextContentType })));
|
|
21
21
|
}, (r) => {
|
|
@@ -10,4 +10,4 @@ export declare const SeparatorLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
10
10
|
export declare const SeparatorContent: t.ExactC<t.TypeC<{
|
|
11
11
|
__TYPE__: t.LiteralC<"SeparatorContent">;
|
|
12
12
|
}>>;
|
|
13
|
-
export
|
|
13
|
+
export type SeparatorContent = t.TypeOf<typeof SeparatorContent>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SeparatorContent = exports.SeparatorLegacy = exports.isSeparatorContent = exports.SeparatorContentType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t =
|
|
5
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
6
|
const utils_1 = require("../../utils");
|
|
7
7
|
exports.SeparatorContentType = "SeparatorContent";
|
|
8
8
|
const isSeparatorContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.SeparatorContentType;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./BooleanContent"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./EmbedContent"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./FieldContent"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./GeoPointContent"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./ImageContent"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./IntegrationFieldContent"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./LinkContent"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./NestableContent"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./RichTextContent"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./SeparatorContent"), exports);
|
|
@@ -1706,4 +1706,4 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
|
|
|
1706
1706
|
}>>]>]>>;
|
|
1707
1707
|
}>>>;
|
|
1708
1708
|
}>>;
|
|
1709
|
-
export
|
|
1709
|
+
export type CompositeSliceContent = t.TypeOf<typeof CompositeSliceContent>;
|
|
@@ -4,7 +4,7 @@ exports.CompositeSliceContent = exports.CompositeSliceLegacy = exports.isComposi
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const LegacyContentCtx_1 = require("../../../LegacyContentCtx");
|
|
9
9
|
const utils_1 = require("../../../utils");
|
|
10
10
|
const nestable_1 = require("../../nestable");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RepeatableWidgets = exports.RepeatableWidgetsLegacy = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t =
|
|
5
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
6
|
const GroupContent_1 = require("../../GroupContent");
|
|
7
7
|
const nestable_1 = require("../../nestable");
|
|
8
8
|
const RepeatableWidgetsLegacy = (ctx) => {
|
|
@@ -4,7 +4,7 @@ exports.SharedSliceContent = exports.SharedSliceLegacy = exports.isSharedSliceCo
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const io_ts_types_1 = require("io-ts-types");
|
|
9
9
|
const LegacyContentCtx_1 = require("../../../LegacyContentCtx");
|
|
10
10
|
const utils_1 = require("../../../utils");
|
|
@@ -623,7 +623,7 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
623
623
|
}>>]>]>>;
|
|
624
624
|
}>>>;
|
|
625
625
|
}>>]>;
|
|
626
|
-
export
|
|
626
|
+
export type SimpleSliceContent = t.TypeOf<typeof SimpleSliceContent>;
|
|
627
627
|
export declare const isSimpleSliceContent: (u: unknown) => u is {
|
|
628
628
|
__TYPE__: "BooleanContent";
|
|
629
629
|
value: boolean;
|
|
@@ -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 =
|
|
5
|
+
const t = 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]);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SliceContent = exports.SliceLegacy = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t =
|
|
5
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
6
|
const CompositeSliceContent_1 = require("./CompositeSliceContent");
|
|
7
7
|
const SharedSliceContent_1 = require("./SharedSliceContent");
|
|
8
8
|
const SimpleSliceContent_1 = require("./SimpleSliceContent");
|
|
@@ -1875,7 +1875,7 @@ export declare const SliceItemContent: t.TypeC<{
|
|
|
1875
1875
|
}>>>;
|
|
1876
1876
|
}>>]>]>;
|
|
1877
1877
|
}>;
|
|
1878
|
-
export
|
|
1878
|
+
export type SliceItemContent = t.TypeOf<typeof SliceItemContent>;
|
|
1879
1879
|
export declare const SlicesItemLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
1880
1880
|
key: string;
|
|
1881
1881
|
name: string;
|
|
@@ -4,7 +4,7 @@ exports.SlicesItemLegacy = exports.SliceItemContent = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const function_2 = require("../../../validators/function");
|
|
9
9
|
const LegacyContentCtx_1 = require("../../LegacyContentCtx");
|
|
10
10
|
const Slice_1 = require("./Slice");
|
|
@@ -1619,7 +1619,7 @@ export declare const isSlicesContent: (u: unknown) => u is {
|
|
|
1619
1619
|
};
|
|
1620
1620
|
}[];
|
|
1621
1621
|
};
|
|
1622
|
-
|
|
1622
|
+
type SlicesLegacy = Array<unknown>;
|
|
1623
1623
|
export declare const SlicesLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
1624
1624
|
__TYPE__: "SliceContentType";
|
|
1625
1625
|
value: {
|
|
@@ -5116,5 +5116,5 @@ export declare const SlicesContent: t.TypeC<{
|
|
|
5116
5116
|
}>>]>]>;
|
|
5117
5117
|
}>>;
|
|
5118
5118
|
}>;
|
|
5119
|
-
export
|
|
5119
|
+
export type SlicesContent = t.TypeOf<typeof SlicesContent>;
|
|
5120
5120
|
export {};
|
|
@@ -4,7 +4,7 @@ exports.SlicesContent = exports.SlicesLegacy = exports.isSlicesContent = exports
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const utils_1 = require("../../utils");
|
|
9
9
|
const SliceItem_1 = require("./SliceItem");
|
|
10
10
|
exports.SlicesContentType = "SliceContentType";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./Slice/CompositeSliceContent"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./Slice/SharedSliceContent"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./Slice/SimpleSliceContent"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./SliceItem"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./SlicesContent"), exports);
|
package/lib/content/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./Document"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./fields"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./LegacyContentCtx"), exports);
|
package/lib/content/utils.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FieldType } from "./fields";
|
|
2
|
-
|
|
2
|
+
type WithFieldType = WithContentType & {
|
|
3
3
|
type: FieldType;
|
|
4
4
|
};
|
|
5
5
|
export declare function hasFieldContentType(obj: unknown): obj is WithFieldType;
|
|
6
|
-
|
|
6
|
+
type WithContentType = {
|
|
7
7
|
__TYPE__: string;
|
|
8
8
|
};
|
|
9
9
|
export declare function hasContentType(obj: unknown): obj is WithContentType;
|
package/lib/content/utils.js
CHANGED
|
@@ -3,17 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.hasContentType = exports.hasFieldContentType = void 0;
|
|
4
4
|
const fields_1 = require("./fields");
|
|
5
5
|
function hasFieldContentType(obj) {
|
|
6
|
-
var _a;
|
|
7
6
|
return (hasContentType(obj) &&
|
|
8
7
|
obj.__TYPE__ === fields_1.FieldContentType &&
|
|
9
|
-
(
|
|
8
|
+
(obj === null || obj === void 0 ? void 0 : obj.type) !== undefined &&
|
|
10
9
|
typeof obj.type === "string" &&
|
|
11
10
|
fields_1.FieldType.decode(obj.type)._tag === "Right");
|
|
12
11
|
}
|
|
13
12
|
exports.hasFieldContentType = hasFieldContentType;
|
|
14
13
|
function hasContentType(obj) {
|
|
15
|
-
|
|
16
|
-
return (((_a = obj) === null || _a === void 0 ? void 0 : _a.__TYPE__) !== undefined &&
|
|
14
|
+
return ((obj === null || obj === void 0 ? void 0 : obj.__TYPE__) !== undefined &&
|
|
17
15
|
typeof obj.__TYPE__ === "string");
|
|
18
16
|
}
|
|
19
17
|
exports.hasContentType = hasContentType;
|
|
@@ -1357,7 +1357,7 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
1357
1357
|
}>, t.PartialC<{
|
|
1358
1358
|
hash: t.StringC;
|
|
1359
1359
|
}>]>>;
|
|
1360
|
-
export
|
|
1360
|
+
export type StaticCustomType = t.TypeOf<typeof StaticCustomType>;
|
|
1361
1361
|
export declare const CustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
1362
1362
|
id: t.StringC;
|
|
1363
1363
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
@@ -2375,7 +2375,7 @@ export declare const CustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
2375
2375
|
}>, t.PartialC<{
|
|
2376
2376
|
hash: t.StringC;
|
|
2377
2377
|
}>]>>;
|
|
2378
|
-
export
|
|
2378
|
+
export type CustomType = t.TypeOf<typeof CustomType>;
|
|
2379
2379
|
export declare function flattenWidgets(customType: CustomType): Array<[string, DynamicWidget]>;
|
|
2380
2380
|
export declare function toStatic(customType: CustomType, sharedSlices: Map<string, SharedSlice>): StaticCustomType;
|
|
2381
2381
|
export declare function validateSlices(customType: CustomType, sharedSlices: Map<string, SharedSlice>): Either<CustomTypeSlicesError, CustomType>;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.filterMissingSharedSlices = exports.collectWidgets = exports.validateSlices = exports.toStatic = exports.flattenWidgets = exports.CustomType = exports.StaticCustomType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Either_1 = require("fp-ts/lib/Either");
|
|
6
|
-
const t =
|
|
6
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
7
7
|
const withFallback_1 = require("io-ts-types/lib/withFallback");
|
|
8
8
|
const validators_1 = require("../validators");
|
|
9
9
|
const Section_1 = require("./Section");
|
|
@@ -1341,7 +1341,7 @@ export declare const StaticSection: t.RecordC<t.Type<string, string, unknown>, t
|
|
|
1341
1341
|
placeholder?: string;
|
|
1342
1342
|
};
|
|
1343
1343
|
}), unknown, unknown>>;
|
|
1344
|
-
export
|
|
1344
|
+
export type StaticSection = t.TypeOf<typeof StaticSection>;
|
|
1345
1345
|
export declare const DynamicSection: t.RecordC<t.Type<string, string, unknown>, t.Type<({
|
|
1346
1346
|
type: "Boolean";
|
|
1347
1347
|
} & {
|
|
@@ -2349,7 +2349,7 @@ export declare const DynamicSection: t.RecordC<t.Type<string, string, unknown>,
|
|
|
2349
2349
|
placeholder?: string;
|
|
2350
2350
|
};
|
|
2351
2351
|
}), unknown, unknown>>;
|
|
2352
|
-
export
|
|
2352
|
+
export type DynamicSection = t.TypeOf<typeof DynamicSection>;
|
|
2353
2353
|
export declare const Sections: {
|
|
2354
2354
|
toStatic(dynamic: DynamicSection, sharedSlices: Map<string, SharedSlice>): StaticSection;
|
|
2355
2355
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Sections = exports.DynamicSection = exports.StaticSection = exports.sectionReader = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t =
|
|
5
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
6
|
const common_1 = require("../common");
|
|
7
7
|
const Widget_1 = require("./widgets/Widget");
|
|
8
8
|
function sectionReader(codec) {
|
|
@@ -3,15 +3,15 @@ export declare enum DiffOperation {
|
|
|
3
3
|
Removed = "removed",
|
|
4
4
|
Updated = "updated"
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type AddChange<A> = {
|
|
7
7
|
op: DiffOperation.Added;
|
|
8
8
|
value: A;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type RemovedChange = {
|
|
11
11
|
op: DiffOperation.Removed;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type UpdatedChange<A> = {
|
|
14
14
|
op: DiffOperation.Updated;
|
|
15
15
|
value: A;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type DiffChange<A, U> = AddChange<A> | UpdatedChange<U> | RemovedChange;
|