Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@prismicio/types-internal

Package Overview
Dependencies
Maintainers
19
Versions
166
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prismicio/types-internal - npm Package Compare versions

Comparing version 0.3.1-beta.1 to 1.0.0-alpha.0

lib/customtypes/Format.d.ts

3

lib/customtypes/Section.js

@@ -6,6 +6,5 @@ "use strict";

const t = (0, tslib_1.__importStar)(require("io-ts"));
const widgets_1 = require("../documents/widgets");
const Widget_1 = require("./widgets/Widget");
function sectionReader(codec) {
return t.record(widgets_1.WidgetKey, codec); // WidgetId -> Widget Data
return t.record(t.string, codec);
}

@@ -12,0 +11,0 @@ exports.sectionReader = sectionReader;

import * as t from "io-ts";
import WidgetTypes from "./WidgetTypes";
declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Group>;
type: t.LiteralC<"Group">;
}>, t.PartialC<{

@@ -12,4 +11,4 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

repeat: t.BooleanC;
fields: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Color>;
fields: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<"Color">;
}>, t.PartialC<{

@@ -22,3 +21,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.BooleanField>;
type: t.LiteralC<"Boolean">;
}>, t.PartialC<{

@@ -32,3 +31,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Embed>;
type: t.LiteralC<"Embed">;
}>, t.PartialC<{

@@ -42,3 +41,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.GeoPoint>;
type: t.LiteralC<"GeoPoint">;
}>, t.PartialC<{

@@ -50,3 +49,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Date>;
type: t.LiteralC<"Date">;
}>, t.PartialC<{

@@ -60,3 +59,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Number>;
type: t.LiteralC<"Number">;
}>, t.PartialC<{

@@ -72,3 +71,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Range>;
type: t.LiteralC<"Range">;
}>, t.PartialC<{

@@ -84,3 +83,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.RichText>;
type: t.LiteralC<"StructuredText">;
}>, t.PartialC<{

@@ -98,7 +97,7 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
labels: t.Type<string[], object, unknown>;
labels: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Select>;
type: t.LiteralC<"Select">;
}>, t.PartialC<{

@@ -110,6 +109,6 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

default_value: t.StringC;
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Separator>;
type: t.LiteralC<"Separator">;
}>, t.PartialC<{

@@ -120,3 +119,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Text>;
type: t.LiteralC<"Text">;
}>, t.PartialC<{

@@ -130,3 +129,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Timestamp>;
type: t.LiteralC<"Timestamp">;
}>, t.PartialC<{

@@ -140,3 +139,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Link>;
type: t.LiteralC<"Link">;
}>, t.PartialC<{

@@ -149,9 +148,9 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ArrayC<t.StringC>;
masks: t.Type<string[], object, unknown>;
tags: t.Type<string[], object, unknown>;
customtypes: t.ReadonlyArrayC<t.StringC>;
masks: t.Type<readonly string[], object, unknown>;
tags: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Image>;
type: t.LiteralC<"Image">;
}>, t.PartialC<{

@@ -166,3 +165,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
name: t.StringC;

@@ -175,3 +174,3 @@ }>, t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.IntegrationField>;
type: t.LiteralC<"IntegrationFields">;
}>, t.PartialC<{

@@ -178,0 +177,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

@@ -5,3 +5,2 @@ "use strict";

const t = (0, tslib_1.__importStar)(require("io-ts"));
const widgets_1 = require("../../documents/widgets");
const validators_1 = require("../../validators");

@@ -13,3 +12,3 @@ const NestableWidget_1 = (0, tslib_1.__importDefault)(require("./nestable/NestableWidget"));

repeat: t.boolean,
fields: t.record(widgets_1.WidgetKey, NestableWidget_1.default),
fields: t.record(t.string, NestableWidget_1.default),
}));

@@ -16,0 +15,0 @@ const Group = t.exact(t.intersection([

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const BooleanField: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.BooleanField>;
type: t.LiteralC<"Boolean">;
}>, t.PartialC<{

@@ -6,0 +5,0 @@ config: t.ExactC<t.PartialC<{

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const Color: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Color>;
type: t.LiteralC<"Color">;
}>, t.PartialC<{

@@ -6,0 +5,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const Date: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Date>;
type: t.LiteralC<"Date">;
}>, t.PartialC<{

@@ -6,0 +5,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const Embed: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Embed>;
type: t.LiteralC<"Embed">;
}>, t.PartialC<{

@@ -6,0 +5,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const GeoPoint: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.GeoPoint>;
type: t.LiteralC<"GeoPoint">;
}>, t.PartialC<{

@@ -6,0 +5,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const Image: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Image>;
type: t.LiteralC<"Image">;
}>, t.PartialC<{

@@ -14,3 +13,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
name: t.StringC;

@@ -17,0 +16,0 @@ }>, t.PartialC<{

@@ -18,3 +18,3 @@ "use strict";

constraint: ImageConstraint_1.default,
thumbnails: t.array(Thumbnail),
thumbnails: t.readonlyArray(Thumbnail),
}));

@@ -21,0 +21,0 @@ const Image = t.exact(t.intersection([

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const IntegrationField: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.IntegrationField>;
type: t.LiteralC<"IntegrationFields">;
}>, t.PartialC<{

@@ -6,0 +5,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const Link: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Link>;
type: t.LiteralC<"Link">;
}>, t.PartialC<{

@@ -12,5 +11,5 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ArrayC<t.StringC>;
masks: t.Type<string[], object, unknown>;
tags: t.Type<string[], object, unknown>;
customtypes: t.ReadonlyArrayC<t.StringC>;
masks: t.Type<readonly string[], object, unknown>;
tags: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;

@@ -17,0 +16,0 @@ }>>;

@@ -40,3 +40,3 @@ "use strict";

]), null),
customtypes: t.array(t.string),
customtypes: t.readonlyArray(t.string),
masks: MasksArrayString,

@@ -43,0 +43,0 @@ tags: MasksArrayString,

import * as t from "io-ts";
declare const NestableWidget: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Color>;
type: t.LiteralC<"Color">;
}>, t.PartialC<{

@@ -11,3 +11,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
type: t.LiteralC<"Boolean">;
}>, t.PartialC<{

@@ -21,3 +21,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
type: t.LiteralC<"Embed">;
}>, t.PartialC<{

@@ -31,3 +31,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
type: t.LiteralC<"GeoPoint">;
}>, t.PartialC<{

@@ -39,3 +39,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Date>;
type: t.LiteralC<"Date">;
}>, t.PartialC<{

@@ -49,3 +49,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Number>;
type: t.LiteralC<"Number">;
}>, t.PartialC<{

@@ -61,3 +61,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Range>;
type: t.LiteralC<"Range">;
}>, t.PartialC<{

@@ -73,3 +73,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
type: t.LiteralC<"StructuredText">;
}>, t.PartialC<{

@@ -87,7 +87,7 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
labels: t.Type<string[], object, unknown>;
labels: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Select>;
type: t.LiteralC<"Select">;
}>, t.PartialC<{

@@ -99,6 +99,6 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

default_value: t.StringC;
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
type: t.LiteralC<"Separator">;
}>, t.PartialC<{

@@ -109,3 +109,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Text>;
type: t.LiteralC<"Text">;
}>, t.PartialC<{

@@ -119,3 +119,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
type: t.LiteralC<"Timestamp">;
}>, t.PartialC<{

@@ -129,3 +129,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Link>;
type: t.LiteralC<"Link">;
}>, t.PartialC<{

@@ -138,9 +138,9 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ArrayC<t.StringC>;
masks: t.Type<string[], object, unknown>;
tags: t.Type<string[], object, unknown>;
customtypes: t.ReadonlyArrayC<t.StringC>;
masks: t.Type<readonly string[], object, unknown>;
tags: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Image>;
type: t.LiteralC<"Image">;
}>, t.PartialC<{

@@ -155,3 +155,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
name: t.StringC;

@@ -164,3 +164,3 @@ }>, t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
type: t.LiteralC<"IntegrationFields">;
}>, t.PartialC<{

@@ -167,0 +167,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const Number: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Number>;
type: t.LiteralC<"Number">;
}>, t.PartialC<{

@@ -6,0 +5,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const Range: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Range>;
type: t.LiteralC<"Range">;
}>, t.PartialC<{

@@ -6,0 +5,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
export declare const DEFAULT_OPTION = "paragraph";
export declare enum RichTextNodeType {
heading1 = "heading1",
heading2 = "heading2",
heading3 = "heading3",
heading4 = "heading4",
heading5 = "heading5",
heading6 = "heading6",
paragraph = "paragraph",
strong = "strong",
em = "em",
preformatted = "preformatted",
hyperlink = "hyperlink",
image = "image",
embed = "embed",
list = "list-item",
orderedList = "o-list-item",
rtl = "rtl"
}
export declare const RichTextNodeType: {
readonly heading1: "heading1";
readonly heading2: "heading2";
readonly heading3: "heading3";
readonly heading4: "heading4";
readonly heading5: "heading5";
readonly heading6: "heading6";
readonly paragraph: "paragraph";
readonly strong: "strong";
readonly em: "em";
readonly preformatted: "preformatted";
readonly hyperlink: "hyperlink";
readonly image: "image";
readonly embed: "embed";
readonly list: "list-item";
readonly orderedList: "o-list-item";
readonly rtl: "rtl";
};
export declare const RichTextNodeTypeCodec: t.KeyofC<{

@@ -50,3 +49,3 @@ heading1: null;

}>;
labels: t.Type<string[], object, unknown>;
labels: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;

@@ -56,3 +55,3 @@ }>>;

export declare const RichText: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.RichText>;
type: t.LiteralC<"StructuredText">;
}>, t.PartialC<{

@@ -70,3 +69,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
labels: t.Type<string[], object, unknown>;
labels: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;

@@ -73,0 +72,0 @@ }>>;

@@ -11,38 +11,37 @@ "use strict";

exports.DEFAULT_OPTION = "paragraph";
var RichTextNodeType;
(function (RichTextNodeType) {
RichTextNodeType["heading1"] = "heading1";
RichTextNodeType["heading2"] = "heading2";
RichTextNodeType["heading3"] = "heading3";
RichTextNodeType["heading4"] = "heading4";
RichTextNodeType["heading5"] = "heading5";
RichTextNodeType["heading6"] = "heading6";
RichTextNodeType["paragraph"] = "paragraph";
RichTextNodeType["strong"] = "strong";
RichTextNodeType["em"] = "em";
RichTextNodeType["preformatted"] = "preformatted";
RichTextNodeType["hyperlink"] = "hyperlink";
RichTextNodeType["image"] = "image";
RichTextNodeType["embed"] = "embed";
RichTextNodeType["list"] = "list-item";
RichTextNodeType["orderedList"] = "o-list-item";
RichTextNodeType["rtl"] = "rtl";
})(RichTextNodeType = exports.RichTextNodeType || (exports.RichTextNodeType = {}));
exports.RichTextNodeType = {
heading1: "heading1",
heading2: "heading2",
heading3: "heading3",
heading4: "heading4",
heading5: "heading5",
heading6: "heading6",
paragraph: "paragraph",
strong: "strong",
em: "em",
preformatted: "preformatted",
hyperlink: "hyperlink",
image: "image",
embed: "embed",
list: "list-item",
orderedList: "o-list-item",
rtl: "rtl",
};
exports.RichTextNodeTypeCodec = t.keyof({
[RichTextNodeType.heading1]: null,
[RichTextNodeType.heading2]: null,
[RichTextNodeType.heading3]: null,
[RichTextNodeType.heading4]: null,
[RichTextNodeType.heading5]: null,
[RichTextNodeType.heading6]: null,
[RichTextNodeType.paragraph]: null,
[RichTextNodeType.strong]: null,
[RichTextNodeType.em]: null,
[RichTextNodeType.preformatted]: null,
[RichTextNodeType.hyperlink]: null,
[RichTextNodeType.image]: null,
[RichTextNodeType.embed]: null,
[RichTextNodeType.list]: null,
[RichTextNodeType.orderedList]: null,
[RichTextNodeType.rtl]: null,
[exports.RichTextNodeType.heading1]: null,
[exports.RichTextNodeType.heading2]: null,
[exports.RichTextNodeType.heading3]: null,
[exports.RichTextNodeType.heading4]: null,
[exports.RichTextNodeType.heading5]: null,
[exports.RichTextNodeType.heading6]: null,
[exports.RichTextNodeType.paragraph]: null,
[exports.RichTextNodeType.strong]: null,
[exports.RichTextNodeType.em]: null,
[exports.RichTextNodeType.preformatted]: null,
[exports.RichTextNodeType.hyperlink]: null,
[exports.RichTextNodeType.image]: null,
[exports.RichTextNodeType.embed]: null,
[exports.RichTextNodeType.list]: null,
[exports.RichTextNodeType.orderedList]: null,
[exports.RichTextNodeType.rtl]: null,
});

@@ -103,4 +102,4 @@ const RichTextOptions = new t.Type("RichTextOptions", (u) => typeof u === "string", (u, context) => {

}, (u, context) => {
const legacyValidator = t.record(t.string, t.array(t.record(t.literal("name"), t.string)));
const validator = t.array(t.string);
const legacyValidator = t.record(t.string, t.readonlyArray(t.record(t.literal("name"), t.string)));
const validator = t.readonlyArray(t.string);
return Either_1.either.chain(t

@@ -107,0 +106,0 @@ .union([legacyValidator, validator, t.string, t.null])

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const Select: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Select>;
type: t.LiteralC<"Select">;
}>, t.PartialC<{

@@ -11,3 +10,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

default_value: t.StringC;
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
}>>;

@@ -14,0 +13,0 @@ }>]>>;

@@ -11,3 +11,3 @@ "use strict";

default_value: t.string,
options: t.array(t.union([t.string, validators_1.StringFromNumber, validators_1.StringFromBoolean])),
options: t.readonlyArray(t.union([t.string, validators_1.StringFromNumber, validators_1.StringFromBoolean])),
}));

@@ -14,0 +14,0 @@ const Select = t.exact(t.intersection([

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const Separator: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Separator>;
type: t.LiteralC<"Separator">;
}>, t.PartialC<{

@@ -6,0 +5,0 @@ config: t.ExactC<t.PartialC<{

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const Text: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Text>;
type: t.LiteralC<"Text">;
}>, t.PartialC<{

@@ -6,0 +5,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

import * as t from "io-ts";
import WidgetTypes from "../WidgetTypes";
declare const Timestamp: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.Timestamp>;
type: t.LiteralC<"Timestamp">;
}>, t.PartialC<{

@@ -6,0 +5,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

import * as t from "io-ts";
import SlicesTypes from "./SlicesTypes";
declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<SlicesTypes.Slice>;
type: t.LiteralC<"Slice">;
}>, t.PartialC<{

@@ -10,4 +9,4 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

display: t.StringC;
"non-repeat": t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Color>;
"non-repeat": t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<"Color">;
}>, t.PartialC<{

@@ -20,3 +19,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
type: t.LiteralC<"Boolean">;
}>, t.PartialC<{

@@ -30,3 +29,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
type: t.LiteralC<"Embed">;
}>, t.PartialC<{

@@ -40,3 +39,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
type: t.LiteralC<"GeoPoint">;
}>, t.PartialC<{

@@ -48,3 +47,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Date>;
type: t.LiteralC<"Date">;
}>, t.PartialC<{

@@ -58,3 +57,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Number>;
type: t.LiteralC<"Number">;
}>, t.PartialC<{

@@ -70,3 +69,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Range>;
type: t.LiteralC<"Range">;
}>, t.PartialC<{

@@ -82,3 +81,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
type: t.LiteralC<"StructuredText">;
}>, t.PartialC<{

@@ -96,7 +95,7 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
labels: t.Type<string[], object, unknown>;
labels: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Select>;
type: t.LiteralC<"Select">;
}>, t.PartialC<{

@@ -108,6 +107,6 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

default_value: t.StringC;
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
type: t.LiteralC<"Separator">;
}>, t.PartialC<{

@@ -118,3 +117,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Text>;
type: t.LiteralC<"Text">;
}>, t.PartialC<{

@@ -128,3 +127,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
type: t.LiteralC<"Timestamp">;
}>, t.PartialC<{

@@ -138,3 +137,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Link>;
type: t.LiteralC<"Link">;
}>, t.PartialC<{

@@ -147,9 +146,9 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ArrayC<t.StringC>;
masks: t.Type<string[], object, unknown>;
tags: t.Type<string[], object, unknown>;
customtypes: t.ReadonlyArrayC<t.StringC>;
masks: t.Type<readonly string[], object, unknown>;
tags: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Image>;
type: t.LiteralC<"Image">;
}>, t.PartialC<{

@@ -164,3 +163,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
name: t.StringC;

@@ -173,3 +172,3 @@ }>, t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
type: t.LiteralC<"IntegrationFields">;
}>, t.PartialC<{

@@ -183,4 +182,4 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>]>>;
repeat: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Color>;
repeat: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<"Color">;
}>, t.PartialC<{

@@ -193,3 +192,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
type: t.LiteralC<"Boolean">;
}>, t.PartialC<{

@@ -203,3 +202,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
type: t.LiteralC<"Embed">;
}>, t.PartialC<{

@@ -213,3 +212,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
type: t.LiteralC<"GeoPoint">;
}>, t.PartialC<{

@@ -221,3 +220,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Date>;
type: t.LiteralC<"Date">;
}>, t.PartialC<{

@@ -231,3 +230,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Number>;
type: t.LiteralC<"Number">;
}>, t.PartialC<{

@@ -243,3 +242,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Range>;
type: t.LiteralC<"Range">;
}>, t.PartialC<{

@@ -255,3 +254,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
type: t.LiteralC<"StructuredText">;
}>, t.PartialC<{

@@ -269,7 +268,7 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
labels: t.Type<string[], object, unknown>;
labels: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Select>;
type: t.LiteralC<"Select">;
}>, t.PartialC<{

@@ -281,6 +280,6 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

default_value: t.StringC;
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
type: t.LiteralC<"Separator">;
}>, t.PartialC<{

@@ -291,3 +290,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Text>;
type: t.LiteralC<"Text">;
}>, t.PartialC<{

@@ -301,3 +300,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
type: t.LiteralC<"Timestamp">;
}>, t.PartialC<{

@@ -311,3 +310,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Link>;
type: t.LiteralC<"Link">;
}>, t.PartialC<{

@@ -320,9 +319,9 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ArrayC<t.StringC>;
masks: t.Type<string[], object, unknown>;
tags: t.Type<string[], object, unknown>;
customtypes: t.ReadonlyArrayC<t.StringC>;
masks: t.Type<readonly string[], object, unknown>;
tags: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Image>;
type: t.LiteralC<"Image">;
}>, t.PartialC<{

@@ -337,3 +336,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
name: t.StringC;

@@ -346,3 +345,3 @@ }>, t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
type: t.LiteralC<"IntegrationFields">;
}>, t.PartialC<{

@@ -349,0 +348,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

@@ -5,3 +5,2 @@ "use strict";

const t = (0, tslib_1.__importStar)(require("io-ts"));
const widgets_1 = require("../../../documents/widgets");
const validators_1 = require("../../../validators");

@@ -22,4 +21,4 @@ const NestableWidget_1 = (0, tslib_1.__importDefault)(require("../nestable/NestableWidget"));

display: t.string,
"non-repeat": t.record(widgets_1.WidgetKey, NestableWidget_1.default),
repeat: t.record(widgets_1.WidgetKey, NestableWidget_1.default),
"non-repeat": t.record(t.string, NestableWidget_1.default),
repeat: t.record(t.string, NestableWidget_1.default),
config: CompositeSliceConfig,

@@ -26,0 +25,0 @@ }),

import * as t from "io-ts";
declare const LegacySlice: t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Color>;
type: t.LiteralC<"Color">;
}>, t.PartialC<{

@@ -11,3 +11,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
type: t.LiteralC<"Boolean">;
}>, t.PartialC<{

@@ -21,3 +21,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
type: t.LiteralC<"Embed">;
}>, t.PartialC<{

@@ -31,3 +31,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
type: t.LiteralC<"GeoPoint">;
}>, t.PartialC<{

@@ -39,3 +39,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Date>;
type: t.LiteralC<"Date">;
}>, t.PartialC<{

@@ -49,3 +49,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Number>;
type: t.LiteralC<"Number">;
}>, t.PartialC<{

@@ -61,3 +61,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Range>;
type: t.LiteralC<"Range">;
}>, t.PartialC<{

@@ -73,3 +73,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
type: t.LiteralC<"StructuredText">;
}>, t.PartialC<{

@@ -87,7 +87,7 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
labels: t.Type<string[], object, unknown>;
labels: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Select>;
type: t.LiteralC<"Select">;
}>, t.PartialC<{

@@ -99,6 +99,6 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

default_value: t.StringC;
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
type: t.LiteralC<"Separator">;
}>, t.PartialC<{

@@ -109,3 +109,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Text>;
type: t.LiteralC<"Text">;
}>, t.PartialC<{

@@ -119,3 +119,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
type: t.LiteralC<"Timestamp">;
}>, t.PartialC<{

@@ -129,3 +129,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Link>;
type: t.LiteralC<"Link">;
}>, t.PartialC<{

@@ -138,9 +138,9 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ArrayC<t.StringC>;
masks: t.Type<string[], object, unknown>;
tags: t.Type<string[], object, unknown>;
customtypes: t.ReadonlyArrayC<t.StringC>;
masks: t.Type<readonly string[], object, unknown>;
tags: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Image>;
type: t.LiteralC<"Image">;
}>, t.PartialC<{

@@ -155,3 +155,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
name: t.StringC;

@@ -164,3 +164,3 @@ }>, t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
type: t.LiteralC<"IntegrationFields">;
}>, t.PartialC<{

@@ -174,3 +174,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>]>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Group>;
type: t.LiteralC<"Group">;
}>, t.PartialC<{

@@ -183,4 +183,4 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

repeat: t.BooleanC;
fields: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Color>;
fields: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<"Color">;
}>, t.PartialC<{

@@ -193,3 +193,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
type: t.LiteralC<"Boolean">;
}>, t.PartialC<{

@@ -203,3 +203,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
type: t.LiteralC<"Embed">;
}>, t.PartialC<{

@@ -213,3 +213,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
type: t.LiteralC<"GeoPoint">;
}>, t.PartialC<{

@@ -221,3 +221,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Date>;
type: t.LiteralC<"Date">;
}>, t.PartialC<{

@@ -231,3 +231,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Number>;
type: t.LiteralC<"Number">;
}>, t.PartialC<{

@@ -243,3 +243,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Range>;
type: t.LiteralC<"Range">;
}>, t.PartialC<{

@@ -255,3 +255,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
type: t.LiteralC<"StructuredText">;
}>, t.PartialC<{

@@ -269,7 +269,7 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
labels: t.Type<string[], object, unknown>;
labels: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Select>;
type: t.LiteralC<"Select">;
}>, t.PartialC<{

@@ -281,6 +281,6 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

default_value: t.StringC;
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
type: t.LiteralC<"Separator">;
}>, t.PartialC<{

@@ -291,3 +291,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Text>;
type: t.LiteralC<"Text">;
}>, t.PartialC<{

@@ -301,3 +301,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
type: t.LiteralC<"Timestamp">;
}>, t.PartialC<{

@@ -311,3 +311,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Link>;
type: t.LiteralC<"Link">;
}>, t.PartialC<{

@@ -320,9 +320,9 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ArrayC<t.StringC>;
masks: t.Type<string[], object, unknown>;
tags: t.Type<string[], object, unknown>;
customtypes: t.ReadonlyArrayC<t.StringC>;
masks: t.Type<readonly string[], object, unknown>;
tags: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Image>;
type: t.LiteralC<"Image">;
}>, t.PartialC<{

@@ -337,3 +337,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
name: t.StringC;

@@ -346,3 +346,3 @@ }>, t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
type: t.LiteralC<"IntegrationFields">;
}>, t.PartialC<{

@@ -349,0 +349,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

import * as t from "io-ts";
import SlicesTypes from "./SlicesTypes";
export declare const Variation: t.ExactC<t.IntersectionC<[t.TypeC<{

@@ -12,4 +11,4 @@ id: t.StringC;

display: t.StringC;
primary: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Color>;
primary: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<"Color">;
}>, t.PartialC<{

@@ -22,3 +21,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
type: t.LiteralC<"Boolean">;
}>, t.PartialC<{

@@ -32,3 +31,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
type: t.LiteralC<"Embed">;
}>, t.PartialC<{

@@ -42,3 +41,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
type: t.LiteralC<"GeoPoint">;
}>, t.PartialC<{

@@ -50,3 +49,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Date>;
type: t.LiteralC<"Date">;
}>, t.PartialC<{

@@ -60,3 +59,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Number>;
type: t.LiteralC<"Number">;
}>, t.PartialC<{

@@ -72,3 +71,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Range>;
type: t.LiteralC<"Range">;
}>, t.PartialC<{

@@ -84,3 +83,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
type: t.LiteralC<"StructuredText">;
}>, t.PartialC<{

@@ -98,7 +97,7 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
labels: t.Type<string[], object, unknown>;
labels: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Select>;
type: t.LiteralC<"Select">;
}>, t.PartialC<{

@@ -110,6 +109,6 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

default_value: t.StringC;
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
type: t.LiteralC<"Separator">;
}>, t.PartialC<{

@@ -120,3 +119,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Text>;
type: t.LiteralC<"Text">;
}>, t.PartialC<{

@@ -130,3 +129,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
type: t.LiteralC<"Timestamp">;
}>, t.PartialC<{

@@ -140,3 +139,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Link>;
type: t.LiteralC<"Link">;
}>, t.PartialC<{

@@ -149,9 +148,9 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ArrayC<t.StringC>;
masks: t.Type<string[], object, unknown>;
tags: t.Type<string[], object, unknown>;
customtypes: t.ReadonlyArrayC<t.StringC>;
masks: t.Type<readonly string[], object, unknown>;
tags: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Image>;
type: t.LiteralC<"Image">;
}>, t.PartialC<{

@@ -166,3 +165,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
name: t.StringC;

@@ -175,3 +174,3 @@ }>, t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
type: t.LiteralC<"IntegrationFields">;
}>, t.PartialC<{

@@ -185,4 +184,4 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>]>>;
items: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Color>;
items: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<"Color">;
}>, t.PartialC<{

@@ -195,3 +194,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
type: t.LiteralC<"Boolean">;
}>, t.PartialC<{

@@ -205,3 +204,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
type: t.LiteralC<"Embed">;
}>, t.PartialC<{

@@ -215,3 +214,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
type: t.LiteralC<"GeoPoint">;
}>, t.PartialC<{

@@ -223,3 +222,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Date>;
type: t.LiteralC<"Date">;
}>, t.PartialC<{

@@ -233,3 +232,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Number>;
type: t.LiteralC<"Number">;
}>, t.PartialC<{

@@ -245,3 +244,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Range>;
type: t.LiteralC<"Range">;
}>, t.PartialC<{

@@ -257,3 +256,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
type: t.LiteralC<"StructuredText">;
}>, t.PartialC<{

@@ -271,7 +270,7 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
labels: t.Type<string[], object, unknown>;
labels: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Select>;
type: t.LiteralC<"Select">;
}>, t.PartialC<{

@@ -283,6 +282,6 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

default_value: t.StringC;
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
type: t.LiteralC<"Separator">;
}>, t.PartialC<{

@@ -293,3 +292,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Text>;
type: t.LiteralC<"Text">;
}>, t.PartialC<{

@@ -303,3 +302,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
type: t.LiteralC<"Timestamp">;
}>, t.PartialC<{

@@ -313,3 +312,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Link>;
type: t.LiteralC<"Link">;
}>, t.PartialC<{

@@ -322,9 +321,9 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ArrayC<t.StringC>;
masks: t.Type<string[], object, unknown>;
tags: t.Type<string[], object, unknown>;
customtypes: t.ReadonlyArrayC<t.StringC>;
masks: t.Type<readonly string[], object, unknown>;
tags: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Image>;
type: t.LiteralC<"Image">;
}>, t.PartialC<{

@@ -339,3 +338,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
name: t.StringC;

@@ -348,3 +347,3 @@ }>, t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
type: t.LiteralC<"IntegrationFields">;
}>, t.PartialC<{

@@ -362,5 +361,5 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

id: t.StringC;
type: t.LiteralC<SlicesTypes.SharedSlice>;
type: t.LiteralC<"SharedSlice">;
name: t.StringC;
variations: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
variations: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
id: t.StringC;

@@ -374,4 +373,4 @@ name: t.StringC;

display: t.StringC;
primary: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Color>;
primary: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<"Color">;
}>, t.PartialC<{

@@ -384,3 +383,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
type: t.LiteralC<"Boolean">;
}>, t.PartialC<{

@@ -394,3 +393,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
type: t.LiteralC<"Embed">;
}>, t.PartialC<{

@@ -404,3 +403,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
type: t.LiteralC<"GeoPoint">;
}>, t.PartialC<{

@@ -412,3 +411,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Date>;
type: t.LiteralC<"Date">;
}>, t.PartialC<{

@@ -422,3 +421,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Number>;
type: t.LiteralC<"Number">;
}>, t.PartialC<{

@@ -434,3 +433,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Range>;
type: t.LiteralC<"Range">;
}>, t.PartialC<{

@@ -446,3 +445,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
type: t.LiteralC<"StructuredText">;
}>, t.PartialC<{

@@ -460,7 +459,7 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
labels: t.Type<string[], object, unknown>;
labels: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Select>;
type: t.LiteralC<"Select">;
}>, t.PartialC<{

@@ -472,6 +471,6 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

default_value: t.StringC;
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
type: t.LiteralC<"Separator">;
}>, t.PartialC<{

@@ -482,3 +481,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Text>;
type: t.LiteralC<"Text">;
}>, t.PartialC<{

@@ -492,3 +491,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
type: t.LiteralC<"Timestamp">;
}>, t.PartialC<{

@@ -502,3 +501,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Link>;
type: t.LiteralC<"Link">;
}>, t.PartialC<{

@@ -511,9 +510,9 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ArrayC<t.StringC>;
masks: t.Type<string[], object, unknown>;
tags: t.Type<string[], object, unknown>;
customtypes: t.ReadonlyArrayC<t.StringC>;
masks: t.Type<readonly string[], object, unknown>;
tags: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Image>;
type: t.LiteralC<"Image">;
}>, t.PartialC<{

@@ -528,3 +527,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
name: t.StringC;

@@ -537,3 +536,3 @@ }>, t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
type: t.LiteralC<"IntegrationFields">;
}>, t.PartialC<{

@@ -547,4 +546,4 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>]>>;
items: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Color>;
items: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<"Color">;
}>, t.PartialC<{

@@ -557,3 +556,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
type: t.LiteralC<"Boolean">;
}>, t.PartialC<{

@@ -567,3 +566,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
type: t.LiteralC<"Embed">;
}>, t.PartialC<{

@@ -577,3 +576,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
type: t.LiteralC<"GeoPoint">;
}>, t.PartialC<{

@@ -585,3 +584,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Date>;
type: t.LiteralC<"Date">;
}>, t.PartialC<{

@@ -595,3 +594,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Number>;
type: t.LiteralC<"Number">;
}>, t.PartialC<{

@@ -607,3 +606,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Range>;
type: t.LiteralC<"Range">;
}>, t.PartialC<{

@@ -619,3 +618,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
type: t.LiteralC<"StructuredText">;
}>, t.PartialC<{

@@ -633,7 +632,7 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
labels: t.Type<string[], object, unknown>;
labels: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Select>;
type: t.LiteralC<"Select">;
}>, t.PartialC<{

@@ -645,6 +644,6 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

default_value: t.StringC;
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
type: t.LiteralC<"Separator">;
}>, t.PartialC<{

@@ -655,3 +654,3 @@ config: t.ExactC<t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Text>;
type: t.LiteralC<"Text">;
}>, t.PartialC<{

@@ -665,3 +664,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
type: t.LiteralC<"Timestamp">;
}>, t.PartialC<{

@@ -675,3 +674,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Link>;
type: t.LiteralC<"Link">;
}>, t.PartialC<{

@@ -684,9 +683,9 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ArrayC<t.StringC>;
masks: t.Type<string[], object, unknown>;
tags: t.Type<string[], object, unknown>;
customtypes: t.ReadonlyArrayC<t.StringC>;
masks: t.Type<readonly string[], object, unknown>;
tags: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
}>>;
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.Image>;
type: t.LiteralC<"Image">;
}>, t.PartialC<{

@@ -701,3 +700,3 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

}>;
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
name: t.StringC;

@@ -710,3 +709,3 @@ }>, t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
type: t.LiteralC<"IntegrationFields">;
}>, t.PartialC<{

@@ -713,0 +712,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

@@ -7,3 +7,2 @@ "use strict";

const withFallback_1 = require("io-ts-types/lib/withFallback");
const widgets_1 = require("../../../documents/widgets");
const NestableWidget_1 = (0, tslib_1.__importDefault)(require("../nestable/NestableWidget"));

@@ -23,4 +22,4 @@ const SlicesTypes_1 = (0, tslib_1.__importDefault)(require("./SlicesTypes"));

display: t.string,
primary: t.record(widgets_1.WidgetKey, NestableWidget_1.default),
items: t.record(widgets_1.WidgetKey, NestableWidget_1.default),
primary: t.record(t.string, NestableWidget_1.default),
items: t.record(t.string, NestableWidget_1.default),
}),

@@ -33,3 +32,3 @@ ]));

name: t.string,
variations: t.array(exports.Variation),
variations: t.readonlyArray(exports.Variation),
}),

@@ -36,0 +35,0 @@ t.partial({

import * as t from "io-ts";
import SlicesTypes from "./SlicesTypes";
declare const SharedSliceRef: t.ExactC<t.TypeC<{
type: t.LiteralC<SlicesTypes.SharedSlice>;
type: t.LiteralC<"SharedSlice">;
}>>;
declare type SharedSliceRef = t.TypeOf<typeof SharedSliceRef>;
export default SharedSliceRef;

@@ -6,3 +6,2 @@ "use strict";

const t = (0, tslib_1.__importStar)(require("io-ts"));
const widgets_1 = require("../../../documents/widgets");
const validators_1 = require("../../../validators");

@@ -16,3 +15,3 @@ const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));

exports.SlicesLabels = t.union([
t.record(t.string, t.array(t.exact(t.intersection([
t.record(t.string, t.readonlyArray(t.exact(t.intersection([
t.type({

@@ -31,3 +30,3 @@ name: t.string,

labels: exports.SlicesLabels,
choices: t.record(widgets_1.WidgetKey, t.union([LegacySlice_1.default, CompositeSlice_1.default, codec])),
choices: t.record(t.string, t.union([LegacySlice_1.default, CompositeSlice_1.default, codec])),
}));

@@ -34,0 +33,0 @@ }

@@ -1,5 +0,5 @@

declare enum SlicesTypes {
Slice = "Slice",
SharedSlice = "SharedSlice"
}
declare const SlicesTypes: {
readonly Slice: "Slice";
readonly SharedSlice: "SharedSlice";
};
export default SlicesTypes;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var SlicesTypes;
(function (SlicesTypes) {
SlicesTypes["Slice"] = "Slice";
SlicesTypes["SharedSlice"] = "SharedSlice";
})(SlicesTypes || (SlicesTypes = {}));
const SlicesTypes = {
Slice: "Slice",
SharedSlice: "SharedSlice",
};
exports.default = SlicesTypes;
import * as t from "io-ts";
import WidgetTypes from "./WidgetTypes";
declare const UID: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<WidgetTypes.UID>;
type: t.LiteralC<"UID">;
}>, t.PartialC<{

@@ -6,0 +5,0 @@ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;

@@ -1,22 +0,22 @@

declare enum WidgetTypes {
Text = "Text",
RichText = "StructuredText",
Color = "Color",
Image = "Image",
Date = "Date",
Timestamp = "Timestamp",
Number = "Number",
Range = "Range",
Select = "Select",
Link = "Link",
Embed = "Embed",
GeoPoint = "GeoPoint",
Separator = "Separator",
UID = "UID",
BooleanField = "Boolean",
IntegrationField = "IntegrationFields",
Group = "Group",
Slices = "Slices",
LegacySlices = "Choice"
}
declare const WidgetTypes: {
readonly Text: "Text";
readonly RichText: "StructuredText";
readonly Color: "Color";
readonly Image: "Image";
readonly Date: "Date";
readonly Timestamp: "Timestamp";
readonly Number: "Number";
readonly Range: "Range";
readonly Select: "Select";
readonly Link: "Link";
readonly Embed: "Embed";
readonly GeoPoint: "GeoPoint";
readonly Separator: "Separator";
readonly UID: "UID";
readonly BooleanField: "Boolean";
readonly IntegrationField: "IntegrationFields";
readonly Group: "Group";
readonly Slices: "Slices";
readonly LegacySlices: "Choice";
};
export default WidgetTypes;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var WidgetTypes;
(function (WidgetTypes) {
WidgetTypes["Text"] = "Text";
WidgetTypes["RichText"] = "StructuredText";
WidgetTypes["Color"] = "Color";
WidgetTypes["Image"] = "Image";
WidgetTypes["Date"] = "Date";
WidgetTypes["Timestamp"] = "Timestamp";
WidgetTypes["Number"] = "Number";
WidgetTypes["Range"] = "Range";
WidgetTypes["Select"] = "Select";
WidgetTypes["Link"] = "Link";
WidgetTypes["Embed"] = "Embed";
WidgetTypes["GeoPoint"] = "GeoPoint";
WidgetTypes["Separator"] = "Separator";
WidgetTypes["UID"] = "UID";
WidgetTypes["BooleanField"] = "Boolean";
WidgetTypes["IntegrationField"] = "IntegrationFields";
WidgetTypes["Group"] = "Group";
WidgetTypes["Slices"] = "Slices";
const WidgetTypes = {
Text: "Text",
RichText: "StructuredText",
Color: "Color",
Image: "Image",
Date: "Date",
Timestamp: "Timestamp",
Number: "Number",
Range: "Range",
Select: "Select",
Link: "Link",
Embed: "Embed",
GeoPoint: "GeoPoint",
Separator: "Separator",
UID: "UID",
BooleanField: "Boolean",
IntegrationField: "IntegrationFields",
Group: "Group",
Slices: "Slices",
// Legacy type for slices
WidgetTypes["LegacySlices"] = "Choice";
})(WidgetTypes || (WidgetTypes = {}));
LegacySlices: "Choice",
};
exports.default = WidgetTypes;

@@ -1,3 +0,2 @@

import * as t from "io-ts";
import { SlicesContent } from "./slices";
import { SlicesContent } from "./slices/SlicesContent";
import StaticWidgetContent from "./StaticWidgetContent";

@@ -32,4 +31,3 @@ export * from "./EmptyContent";

};
export declare const WidgetKey: t.Type<string, string, unknown>;
export declare type WidgetKey = t.TypeOf<typeof WidgetKey>;
export declare type WidgetKey = string;
export declare type WidgetContent = SlicesContent | StaticWidgetContent;

@@ -36,0 +34,0 @@ export declare const Widget: {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Widget = exports.WidgetKey = exports.WidgetTypes = exports.StaticWidgetContent = exports.Slices = exports.Nestable = void 0;
exports.Widget = exports.WidgetTypes = exports.StaticWidgetContent = exports.Slices = exports.Nestable = void 0;
const tslib_1 = require("tslib");
const t = (0, tslib_1.__importStar)(require("io-ts"));
const function_1 = require("../../validators/function");
const EmptyContent_1 = require("./EmptyContent");
const GroupContent_1 = require("./GroupContent");
const nestable_1 = require("./nestable");
const slices_1 = require("./slices");
const SlicesContent_1 = require("./slices/SlicesContent");
const StaticWidgetContent_1 = (0, tslib_1.__importDefault)(require("./StaticWidgetContent"));

@@ -26,6 +24,4 @@ const UIDContent_1 = require("./UIDContent");

Group: GroupContent_1.GroupContentType,
slices: slices_1.SlicesContentType,
slices: SlicesContent_1.SlicesContentType,
};
const widgetKeyRegex = new RegExp("^[^<>]+$");
exports.WidgetKey = (0, function_1.refineType)(t.string, "WidgetKey", (s) => widgetKeyRegex.test(s));
exports.Widget = {

@@ -35,3 +31,3 @@ fromJson(widgetKey, widgetValue, widgetTypes, widgetPositions) {

if (fieldType === "Slices") {
return slices_1.SlicesContent.fromJson(widgetKey, widgetValue, widgetTypes, widgetPositions);
return SlicesContent_1.SlicesContent.fromJson(widgetKey, widgetValue, widgetTypes, widgetPositions);
}

@@ -38,0 +34,0 @@ else {

import * as t from "io-ts";
import { RichTextNodeType } from "../../../../customtypes/widgets/nestable";
export declare const Meta: t.ExactC<t.IntersectionC<[t.PartialC<{

@@ -8,3 +7,3 @@ data: t.UnknownC;

end: t.NumberC;
type: t.KeyofC<{
type: t.UnionC<[t.KeyofC<{
heading1: null;

@@ -26,3 +25,3 @@ heading2: null;

rtl: null;
}>;
}>, t.LiteralC<"label">]>;
}>]>>;

@@ -35,3 +34,3 @@ export declare type Meta = t.TypeOf<typeof Meta>;

end: t.NumberC;
type: t.KeyofC<{
type: t.UnionC<[t.KeyofC<{
heading1: null;

@@ -53,3 +52,3 @@ heading2: null;

rtl: null;
}>;
}>, t.LiteralC<"label">]>;
}>]>>;

@@ -62,3 +61,3 @@ export declare type Span = Meta;

end: number;
type: RichTextNodeType;
type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
})[], ({

@@ -69,6 +68,6 @@ data?: unknown;

end: number;
type: RichTextNodeType;
type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
})[], unknown>;
export declare const ImageBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<RichTextNodeType.image>;
type: t.LiteralC<"image">;
data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{

@@ -168,3 +167,3 @@ origin: t.ExactC<t.TypeC<{

export declare const EmbedBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<RichTextNodeType.embed>;
type: t.LiteralC<"embed">;
data: t.Type<import("../EmbedContent").EmbedContentO, unknown, unknown>;

@@ -178,3 +177,3 @@ }>, t.PartialC<{

export declare const TextBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.Type<RichTextNodeType, RichTextNodeType, unknown>;
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>;
content: t.IntersectionC<[t.TypeC<{

@@ -188,3 +187,3 @@ text: t.StringC;

end: number;
type: RichTextNodeType;
type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
})[], ({

@@ -195,3 +194,3 @@ data?: unknown;

end: number;
type: RichTextNodeType;
type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
})[], unknown>;

@@ -205,3 +204,3 @@ }>]>;

export declare const Block: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<RichTextNodeType.image>;
type: t.LiteralC<"image">;
data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{

@@ -298,3 +297,3 @@ origin: t.ExactC<t.TypeC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<RichTextNodeType.embed>;
type: t.LiteralC<"embed">;
data: t.Type<import("../EmbedContent").EmbedContentO, unknown, unknown>;

@@ -305,3 +304,3 @@ }>, t.PartialC<{

}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.Type<RichTextNodeType, RichTextNodeType, unknown>;
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>;
content: t.IntersectionC<[t.TypeC<{

@@ -315,3 +314,3 @@ text: t.StringC;

end: number;
type: RichTextNodeType;
type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
})[], ({

@@ -322,3 +321,3 @@ data?: unknown;

end: number;
type: RichTextNodeType;
type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
})[], unknown>;

@@ -325,0 +324,0 @@ }>]>;

@@ -20,3 +20,3 @@ "use strict";

end: t.number,
type: nestable_1.RichTextNodeTypeCodec,
type: t.union([nestable_1.RichTextNodeTypeCodec, t.literal('label')]),
}),

@@ -23,0 +23,0 @@ ]));

{
"name": "@prismicio/types-internal",
"version": "0.3.1-beta.1",
"version": "1.0.0-alpha.0",
"description": "Prismic types for Custom Types and Prismic Data",

@@ -5,0 +5,0 @@ "keywords": [

@@ -41,3 +41,3 @@ import { Either, left, right } from "fp-ts/lib/Either"

repeatable: withFallback(t.boolean, true),
json: t.record(t.string, codec), //tab name => tab data
json: t.record(t.string, codec),
status: withFallback(t.boolean, true),

@@ -44,0 +44,0 @@ }),

import * as t from "io-ts"
import { WidgetKey } from "../documents/widgets"
import type { SharedSlice } from "./widgets/slices"
import type { SharedSlice } from "./widgets/slices/SharedSlice"
import { DynamicWidget, StaticWidget, Widgets } from "./widgets/Widget"

@@ -10,3 +9,3 @@

) {
return t.record(WidgetKey, codec) // WidgetId -> Widget Data
return t.record(t.string, codec)
}

@@ -13,0 +12,0 @@

import * as t from "io-ts"
import { WidgetKey } from "../../documents/widgets"
import { StringOrNull } from "../../validators"

@@ -12,3 +11,3 @@ import NestableWidget from "./nestable/NestableWidget"

repeat: t.boolean,
fields: t.record(WidgetKey, NestableWidget),
fields: t.record(t.string, NestableWidget),
}),

@@ -15,0 +14,0 @@ )

@@ -22,3 +22,3 @@ import * as t from "io-ts"

constraint: ImageConstraint,
thumbnails: t.array(Thumbnail),
thumbnails: t.readonlyArray(Thumbnail),
}),

@@ -25,0 +25,0 @@ )

@@ -46,5 +46,5 @@ import { either } from "fp-ts/lib/Either"

const MasksArrayString = new t.Type<Array<string>, object, unknown>(
const MasksArrayString = new t.Type<ReadonlyArray<string>, object, unknown>(
"MasksArrayString",
(u: unknown): u is Array<string> => {
(u: unknown): u is ReadonlyArray<string> => {
return u instanceof Array

@@ -77,3 +77,3 @@ },

),
customtypes: t.array(t.string), // `customtypes` and `masks` are alternatives
customtypes: t.readonlyArray(t.string), // `customtypes` and `masks` are alternatives
masks: MasksArrayString,

@@ -80,0 +80,0 @@ tags: MasksArrayString,

@@ -10,20 +10,20 @@ import { either, getOrElseW } from "fp-ts/lib/Either"

export enum RichTextNodeType {
heading1 = "heading1",
heading2 = "heading2",
heading3 = "heading3",
heading4 = "heading4",
heading5 = "heading5",
heading6 = "heading6",
paragraph = "paragraph",
strong = "strong",
em = "em",
preformatted = "preformatted",
hyperlink = "hyperlink",
image = "image",
embed = "embed",
list = "list-item",
orderedList = "o-list-item",
rtl = "rtl",
}
export const RichTextNodeType = {
heading1: "heading1",
heading2: "heading2",
heading3: "heading3",
heading4: "heading4",
heading5: "heading5",
heading6: "heading6",
paragraph: "paragraph",
strong: "strong",
em: "em",
preformatted: "preformatted",
hyperlink: "hyperlink",
image: "image",
embed: "embed",
list: "list-item",
orderedList: "o-list-item",
rtl: "rtl",
} as const

@@ -75,7 +75,7 @@ export const RichTextNodeTypeCodec = t.keyof({

| string
| string[]
| ReadonlyArray<string>
| {
[x: string]: {
[x: string]: ReadonlyArray<{
name: string
}[]
}>
}

@@ -91,7 +91,7 @@ | null,

| string
| string[]
| ReadonlyArray<string>
| {
[x: string]: {
[x: string]: ReadonlyArray<{
name: string
}[]
}>
}

@@ -125,7 +125,7 @@ | null,

| string
| string[]
| ReadonlyArray<string>
| {
[x: string]: {
[x: string]: ReadonlyArray<{
name: string
}[]
}>
}

@@ -147,7 +147,7 @@ | null,

| string
| string[]
| ReadonlyArray<string>
| {
[x: string]: {
[x: string]: ReadonlyArray<{
name: string
}[]
}>
}

@@ -162,5 +162,5 @@ | null,

const RichTextLabels = new t.Type<Array<string>, object, unknown>(
const RichTextLabels = new t.Type<ReadonlyArray<string>, object, unknown>(
"RichTextLabels",
(u: unknown): u is Array<string> => {
(u: unknown): u is ReadonlyArray<string> => {
return u instanceof Array

@@ -171,5 +171,5 @@ },

t.string,
t.array(t.record(t.literal("name"), t.string)),
t.readonlyArray(t.record(t.literal("name"), t.string)),
)
const validator = t.array(t.string)
const validator = t.readonlyArray(t.string)

@@ -176,0 +176,0 @@ return either.chain(

@@ -15,3 +15,5 @@ import * as t from "io-ts"

default_value: t.string,
options: t.array(t.union([t.string, StringFromNumber, StringFromBoolean])),
options: t.readonlyArray(
t.union([t.string, StringFromNumber, StringFromBoolean]),
),
}),

@@ -18,0 +20,0 @@ )

import * as t from "io-ts"
import { WidgetKey } from "../../../documents/widgets"
import { StringOrNull } from "../../../validators"

@@ -25,4 +24,4 @@ import NestableWidget from "../nestable/NestableWidget"

display: t.string,
"non-repeat": t.record(WidgetKey, NestableWidget),
repeat: t.record(WidgetKey, NestableWidget),
"non-repeat": t.record(t.string, NestableWidget),
repeat: t.record(t.string, NestableWidget),
config: CompositeSliceConfig,

@@ -29,0 +28,0 @@ }),

import * as t from "io-ts"
import { withFallback } from "io-ts-types/lib/withFallback"
import { WidgetKey } from "../../../documents/widgets"
import NestableWidget from "../nestable/NestableWidget"

@@ -23,4 +22,4 @@ import SlicesTypes from "./SlicesTypes"

display: t.string,
primary: t.record(WidgetKey, NestableWidget),
items: t.record(WidgetKey, NestableWidget),
primary: t.record(t.string, NestableWidget),
items: t.record(t.string, NestableWidget),
}),

@@ -38,3 +37,3 @@ ]),

name: t.string,
variations: t.array(Variation),
variations: t.readonlyArray(Variation),
}),

@@ -41,0 +40,0 @@ t.partial({

import * as t from "io-ts"
import { WidgetKey } from "../../../documents/widgets"
import { StringOrNull } from "../../../validators"

@@ -15,3 +14,3 @@ import WidgetTypes from "../WidgetTypes"

t.string,
t.array(
t.readonlyArray(
t.exact(

@@ -41,3 +40,3 @@ t.intersection([

choices: t.record(
WidgetKey,
t.string,
t.union([LegacySlice, CompositeSlice, codec]),

@@ -44,0 +43,0 @@ ),

@@ -1,6 +0,6 @@

enum SlicesTypes {
Slice = "Slice",
SharedSlice = "SharedSlice",
}
const SlicesTypes = {
Slice: "Slice",
SharedSlice: "SharedSlice",
} as const
export default SlicesTypes

@@ -1,24 +0,24 @@

enum WidgetTypes {
Text = "Text",
RichText = "StructuredText",
Color = "Color",
Image = "Image",
Date = "Date",
Timestamp = "Timestamp",
Number = "Number",
Range = "Range",
Select = "Select",
Link = "Link",
Embed = "Embed",
GeoPoint = "GeoPoint",
Separator = "Separator",
UID = "UID",
BooleanField = "Boolean",
IntegrationField = "IntegrationFields",
Group = "Group",
Slices = "Slices",
const WidgetTypes = {
Text: "Text",
RichText: "StructuredText",
Color: "Color",
Image: "Image",
Date: "Date",
Timestamp: "Timestamp",
Number: "Number",
Range: "Range",
Select: "Select",
Link: "Link",
Embed: "Embed",
GeoPoint: "GeoPoint",
Separator: "Separator",
UID: "UID",
BooleanField: "Boolean",
IntegrationField: "IntegrationFields",
Group: "Group",
Slices: "Slices",
// Legacy type for slices
LegacySlices = "Choice",
}
LegacySlices: "Choice",
} as const
export default WidgetTypes

@@ -1,8 +0,5 @@

import * as t from "io-ts"
import { refineType } from "../../validators/function"
import { EmptyContentType } from "./EmptyContent"
import { GroupContentType } from "./GroupContent"
import { NestableTypes } from "./nestable"
import { SlicesContent, SlicesContentType } from "./slices"
import { SlicesContent, SlicesContentType } from "./slices/SlicesContent"
import StaticWidgetContent from "./StaticWidgetContent"

@@ -30,8 +27,3 @@ import { UIDContentType } from "./UIDContent"

const widgetKeyRegex = new RegExp("^[^<>]+$")
export const WidgetKey = refineType(t.string, "WidgetKey", (s: string) =>
widgetKeyRegex.test(s),
)
export type WidgetKey = t.TypeOf<typeof WidgetKey>
export type WidgetKey = string
export type WidgetContent = SlicesContent | StaticWidgetContent

@@ -38,0 +30,0 @@

@@ -22,3 +22,3 @@ import * as E from "fp-ts/lib/Either"

end: t.number,
type: RichTextNodeTypeCodec,
type: t.union([RichTextNodeTypeCodec, t.literal('label')]),
}),

@@ -25,0 +25,0 @@ ]),

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc