@prismicio/types-internal
Advanced tools
Comparing version 2.4.0-alpha.1 to 2.4.0-alpha.2
@@ -26,3 +26,2 @@ import * as t from "io-ts"; | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -52,3 +51,2 @@ thumbnails?: { | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
}; | ||
@@ -81,3 +79,2 @@ }; | ||
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
caption: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
}>]>>; | ||
@@ -107,3 +104,2 @@ export declare type ImageContentView = t.TypeOf<typeof ImageContentView>; | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -133,3 +129,2 @@ thumbnails?: { | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
}; | ||
@@ -161,3 +156,2 @@ }; | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -187,3 +181,2 @@ thumbnails?: { | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
}; | ||
@@ -214,3 +207,2 @@ }; | ||
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
caption: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
}>]>>, t.PartialC<{ | ||
@@ -239,3 +231,2 @@ thumbnails: t.RecordC<t.StringC, t.ExactC<t.IntersectionC<[t.TypeC<{ | ||
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
caption: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
}>]>>>; | ||
@@ -242,0 +233,0 @@ }>]>, t.ExactC<t.TypeC<{ |
@@ -39,3 +39,2 @@ "use strict"; | ||
provider: validators_1.StringOrNull, | ||
caption: validators_1.StringOrNull, | ||
}), | ||
@@ -42,0 +41,0 @@ ])); |
@@ -85,3 +85,2 @@ import * as t from "io-ts"; | ||
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
caption: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
}>]>>, t.PartialC<{ | ||
@@ -110,3 +109,2 @@ thumbnails: t.RecordC<t.StringC, t.ExactC<t.IntersectionC<[t.TypeC<{ | ||
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
caption: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
}>]>>>; | ||
@@ -187,3 +185,2 @@ }>]>, t.ExactC<t.TypeC<{ | ||
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
caption: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
}>]>>, t.PartialC<{ | ||
@@ -487,3 +484,2 @@ linkTo: t.UnionC<[t.Type<({ | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -513,3 +509,2 @@ thumbnails?: { | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
}; | ||
@@ -589,3 +584,2 @@ }; | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -807,3 +801,2 @@ linkTo?: ({ | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -833,3 +826,2 @@ thumbnails?: { | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
}; | ||
@@ -909,3 +901,2 @@ }; | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -912,0 +903,0 @@ linkTo?: ({ |
@@ -403,3 +403,2 @@ import * as t from "io-ts"; | ||
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
caption: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
}>]>>, t.PartialC<{ | ||
@@ -647,3 +646,2 @@ linkTo: t.UnionC<[t.Type<({ | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -803,3 +801,2 @@ linkTo?: ({ | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -960,3 +957,2 @@ linkTo?: ({ | ||
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
caption: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
}>]>>, t.PartialC<{ | ||
@@ -963,0 +959,0 @@ linkTo: t.UnionC<[t.Type<({ |
@@ -30,3 +30,2 @@ import * as t from "io-ts"; | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -190,3 +189,2 @@ linkTo?: ({ | ||
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
caption: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
}>]>>, t.PartialC<{ | ||
@@ -432,3 +430,2 @@ linkTo: t.UnionC<[t.Type<({ | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -589,3 +586,2 @@ linkTo?: ({ | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -592,0 +588,0 @@ linkTo?: ({ |
@@ -86,3 +86,2 @@ import * as t from "io-ts"; | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -112,3 +111,2 @@ thumbnails?: { | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
}; | ||
@@ -188,3 +186,2 @@ }; | ||
provider?: string | null | undefined; | ||
caption?: string | null | undefined; | ||
} & { | ||
@@ -410,3 +407,2 @@ linkTo?: ({ | ||
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
caption: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
}>]>>, t.PartialC<{ | ||
@@ -435,3 +431,2 @@ thumbnails: t.RecordC<t.StringC, t.ExactC<t.IntersectionC<[t.TypeC<{ | ||
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
caption: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
}>]>>>; | ||
@@ -512,3 +507,2 @@ }>]>, t.ExactC<t.TypeC<{ | ||
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
caption: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; | ||
}>]>>, t.PartialC<{ | ||
@@ -515,0 +509,0 @@ linkTo: t.UnionC<[t.Type<({ |
@@ -82,3 +82,2 @@ import type { SharedSlice } from "../widgets/slices"; | ||
})[]; | ||
allowCaption?: boolean; | ||
}; | ||
@@ -243,3 +242,2 @@ }) | ({ | ||
})[]; | ||
allowCaption?: boolean; | ||
}; | ||
@@ -344,2 +342,330 @@ }) | ({ | ||
}; | ||
fields?: { | ||
[x: string]: ({ | ||
type: "Boolean"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
default_value?: boolean; | ||
placeholder_true?: string; | ||
placeholder_false?: string; | ||
}; | ||
}) | ({ | ||
type: "Color"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Date"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}) | ({ | ||
type: "Embed"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
}; | ||
}) | ({ | ||
type: "GeoPoint"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Image"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
constraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
thumbnails?: readonly ({ | ||
name: string; | ||
} & { | ||
width?: number | null; | ||
height?: number | null; | ||
})[]; | ||
}; | ||
}) | ({ | ||
type: "IntegrationFields"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
catalog?: string; | ||
}; | ||
}) | ({ | ||
type: "Link"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
select?: "media" | "document" | "web" | null; | ||
customtypes?: readonly string[]; | ||
masks?: readonly string[]; | ||
tags?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Number"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "Range"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "StructuredText"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
single?: string; | ||
multi?: string; | ||
imageConstraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
labels?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Select"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default_value?: string; | ||
options?: readonly string[]; | ||
}; | ||
}) | ({ | ||
type: "Separator"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Text"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Timestamp"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}) | ({ | ||
type: "Group"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
icon?: string; | ||
description?: string; | ||
config?: { | ||
label?: string | null | undefined; | ||
repeat?: boolean; | ||
fields?: { | ||
[x: string]: ({ | ||
type: "Boolean"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
default_value?: boolean; | ||
placeholder_true?: string; | ||
placeholder_false?: string; | ||
}; | ||
}) | ({ | ||
type: "Color"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Date"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}) | ({ | ||
type: "Embed"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
}; | ||
}) | ({ | ||
type: "GeoPoint"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Image"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
constraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
thumbnails?: readonly ({ | ||
name: string; | ||
} & { | ||
width?: number | null; | ||
height?: number | null; | ||
})[]; | ||
}; | ||
}) | ({ | ||
type: "IntegrationFields"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
catalog?: string; | ||
}; | ||
}) | ({ | ||
type: "Link"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
select?: "media" | "document" | "web" | null; | ||
customtypes?: readonly string[]; | ||
masks?: readonly string[]; | ||
tags?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Number"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "Range"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "StructuredText"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
single?: string; | ||
multi?: string; | ||
imageConstraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
labels?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Select"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default_value?: string; | ||
options?: readonly string[]; | ||
}; | ||
}) | ({ | ||
type: "Separator"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Text"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Timestamp"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}); | ||
}; | ||
}; | ||
}); | ||
}; | ||
})[]; | ||
@@ -424,3 +750,2 @@ } & { | ||
})[]; | ||
allowCaption?: boolean; | ||
}; | ||
@@ -585,3 +910,2 @@ }) | ({ | ||
})[]; | ||
allowCaption?: boolean; | ||
}; | ||
@@ -686,2 +1010,330 @@ }) | ({ | ||
}; | ||
fields?: { | ||
[x: string]: ({ | ||
type: "Boolean"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
default_value?: boolean; | ||
placeholder_true?: string; | ||
placeholder_false?: string; | ||
}; | ||
}) | ({ | ||
type: "Color"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Date"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}) | ({ | ||
type: "Embed"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
}; | ||
}) | ({ | ||
type: "GeoPoint"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Image"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
constraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
thumbnails?: readonly ({ | ||
name: string; | ||
} & { | ||
width?: number | null; | ||
height?: number | null; | ||
})[]; | ||
}; | ||
}) | ({ | ||
type: "IntegrationFields"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
catalog?: string; | ||
}; | ||
}) | ({ | ||
type: "Link"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
select?: "media" | "document" | "web" | null; | ||
customtypes?: readonly string[]; | ||
masks?: readonly string[]; | ||
tags?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Number"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "Range"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "StructuredText"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
single?: string; | ||
multi?: string; | ||
imageConstraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
labels?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Select"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default_value?: string; | ||
options?: readonly string[]; | ||
}; | ||
}) | ({ | ||
type: "Separator"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Text"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Timestamp"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}) | ({ | ||
type: "Group"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
icon?: string; | ||
description?: string; | ||
config?: { | ||
label?: string | null | undefined; | ||
repeat?: boolean; | ||
fields?: { | ||
[x: string]: ({ | ||
type: "Boolean"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
default_value?: boolean; | ||
placeholder_true?: string; | ||
placeholder_false?: string; | ||
}; | ||
}) | ({ | ||
type: "Color"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Date"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}) | ({ | ||
type: "Embed"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
}; | ||
}) | ({ | ||
type: "GeoPoint"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Image"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
constraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
thumbnails?: readonly ({ | ||
name: string; | ||
} & { | ||
width?: number | null; | ||
height?: number | null; | ||
})[]; | ||
}; | ||
}) | ({ | ||
type: "IntegrationFields"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
catalog?: string; | ||
}; | ||
}) | ({ | ||
type: "Link"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
select?: "media" | "document" | "web" | null; | ||
customtypes?: readonly string[]; | ||
masks?: readonly string[]; | ||
tags?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Number"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "Range"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "StructuredText"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
single?: string; | ||
multi?: string; | ||
imageConstraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
labels?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Select"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default_value?: string; | ||
options?: readonly string[]; | ||
}; | ||
}) | ({ | ||
type: "Separator"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Text"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Timestamp"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}); | ||
}; | ||
}; | ||
}); | ||
}; | ||
})[]; | ||
@@ -688,0 +1340,0 @@ } & { |
import type { NestableWidget } from "../widgets/nestable"; | ||
import type { SliceWidget } from "../widgets/slices"; | ||
import type { Variation } from "../widgets/slices"; | ||
import { type DiffChange } from "./Changes"; | ||
export declare type VariationMetadata = Omit<Variation, "primary" | "items">; | ||
export declare type VariationMetadata = Omit<Variation, "primary" | "items" | "fields">; | ||
export declare type VariationDiff = DiffChange<Variation, Partial<VariationMetadata> & { | ||
primary?: Record<string, DiffChange<NestableWidget, NestableWidget>>; | ||
items?: Record<string, DiffChange<NestableWidget, NestableWidget>>; | ||
fields?: Record<string, DiffChange<SliceWidget, SliceWidget>>; | ||
}>; | ||
@@ -79,3 +81,2 @@ export declare const VariationComparator: { | ||
})[]; | ||
allowCaption?: boolean; | ||
}; | ||
@@ -240,3 +241,2 @@ }) | ({ | ||
})[]; | ||
allowCaption?: boolean; | ||
}; | ||
@@ -341,2 +341,330 @@ }) | ({ | ||
}; | ||
fields?: { | ||
[x: string]: ({ | ||
type: "Boolean"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
default_value?: boolean; | ||
placeholder_true?: string; | ||
placeholder_false?: string; | ||
}; | ||
}) | ({ | ||
type: "Color"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Date"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}) | ({ | ||
type: "Embed"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
}; | ||
}) | ({ | ||
type: "GeoPoint"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Image"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
constraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
thumbnails?: readonly ({ | ||
name: string; | ||
} & { | ||
width?: number | null; | ||
height?: number | null; | ||
})[]; | ||
}; | ||
}) | ({ | ||
type: "IntegrationFields"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
catalog?: string; | ||
}; | ||
}) | ({ | ||
type: "Link"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
select?: "media" | "document" | "web" | null; | ||
customtypes?: readonly string[]; | ||
masks?: readonly string[]; | ||
tags?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Number"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "Range"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "StructuredText"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
single?: string; | ||
multi?: string; | ||
imageConstraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
labels?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Select"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default_value?: string; | ||
options?: readonly string[]; | ||
}; | ||
}) | ({ | ||
type: "Separator"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Text"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Timestamp"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}) | ({ | ||
type: "Group"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
icon?: string; | ||
description?: string; | ||
config?: { | ||
label?: string | null | undefined; | ||
repeat?: boolean; | ||
fields?: { | ||
[x: string]: ({ | ||
type: "Boolean"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
default_value?: boolean; | ||
placeholder_true?: string; | ||
placeholder_false?: string; | ||
}; | ||
}) | ({ | ||
type: "Color"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Date"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}) | ({ | ||
type: "Embed"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
}; | ||
}) | ({ | ||
type: "GeoPoint"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Image"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
constraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
thumbnails?: readonly ({ | ||
name: string; | ||
} & { | ||
width?: number | null; | ||
height?: number | null; | ||
})[]; | ||
}; | ||
}) | ({ | ||
type: "IntegrationFields"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
catalog?: string; | ||
}; | ||
}) | ({ | ||
type: "Link"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
select?: "media" | "document" | "web" | null; | ||
customtypes?: readonly string[]; | ||
masks?: readonly string[]; | ||
tags?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Number"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "Range"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "StructuredText"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
single?: string; | ||
multi?: string; | ||
imageConstraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
labels?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Select"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default_value?: string; | ||
options?: readonly string[]; | ||
}; | ||
}) | ({ | ||
type: "Separator"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Text"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Timestamp"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}); | ||
}; | ||
}; | ||
}); | ||
}; | ||
}) | undefined, variationB?: ({ | ||
@@ -411,3 +739,2 @@ id: string; | ||
})[]; | ||
allowCaption?: boolean; | ||
}; | ||
@@ -572,3 +899,2 @@ }) | ({ | ||
})[]; | ||
allowCaption?: boolean; | ||
}; | ||
@@ -673,3 +999,331 @@ }) | ({ | ||
}; | ||
fields?: { | ||
[x: string]: ({ | ||
type: "Boolean"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
default_value?: boolean; | ||
placeholder_true?: string; | ||
placeholder_false?: string; | ||
}; | ||
}) | ({ | ||
type: "Color"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Date"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}) | ({ | ||
type: "Embed"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
}; | ||
}) | ({ | ||
type: "GeoPoint"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Image"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
constraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
thumbnails?: readonly ({ | ||
name: string; | ||
} & { | ||
width?: number | null; | ||
height?: number | null; | ||
})[]; | ||
}; | ||
}) | ({ | ||
type: "IntegrationFields"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
catalog?: string; | ||
}; | ||
}) | ({ | ||
type: "Link"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
select?: "media" | "document" | "web" | null; | ||
customtypes?: readonly string[]; | ||
masks?: readonly string[]; | ||
tags?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Number"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "Range"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "StructuredText"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
single?: string; | ||
multi?: string; | ||
imageConstraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
labels?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Select"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default_value?: string; | ||
options?: readonly string[]; | ||
}; | ||
}) | ({ | ||
type: "Separator"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Text"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Timestamp"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}) | ({ | ||
type: "Group"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
icon?: string; | ||
description?: string; | ||
config?: { | ||
label?: string | null | undefined; | ||
repeat?: boolean; | ||
fields?: { | ||
[x: string]: ({ | ||
type: "Boolean"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
default_value?: boolean; | ||
placeholder_true?: string; | ||
placeholder_false?: string; | ||
}; | ||
}) | ({ | ||
type: "Color"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Date"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}) | ({ | ||
type: "Embed"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
}; | ||
}) | ({ | ||
type: "GeoPoint"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Image"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
constraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
thumbnails?: readonly ({ | ||
name: string; | ||
} & { | ||
width?: number | null; | ||
height?: number | null; | ||
})[]; | ||
}; | ||
}) | ({ | ||
type: "IntegrationFields"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
catalog?: string; | ||
}; | ||
}) | ({ | ||
type: "Link"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
select?: "media" | "document" | "web" | null; | ||
customtypes?: readonly string[]; | ||
masks?: readonly string[]; | ||
tags?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Number"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "Range"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
min?: number; | ||
max?: number; | ||
step?: number; | ||
}; | ||
}) | ({ | ||
type: "StructuredText"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
useAsTitle?: boolean; | ||
single?: string; | ||
multi?: string; | ||
imageConstraint?: { | ||
width?: number | null; | ||
height?: number | null; | ||
}; | ||
labels?: readonly string[]; | ||
allowTargetBlank?: boolean; | ||
}; | ||
}) | ({ | ||
type: "Select"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default_value?: string; | ||
options?: readonly string[]; | ||
}; | ||
}) | ({ | ||
type: "Separator"; | ||
} & { | ||
config?: { | ||
label?: string | null | undefined; | ||
}; | ||
}) | ({ | ||
type: "Text"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
useAsTitle?: boolean; | ||
placeholder?: string; | ||
}; | ||
}) | ({ | ||
type: "Timestamp"; | ||
} & { | ||
fieldset?: string | null | undefined; | ||
config?: { | ||
label?: string | null | undefined; | ||
placeholder?: string; | ||
default?: string; | ||
}; | ||
}); | ||
}; | ||
}; | ||
}); | ||
}; | ||
}) | undefined): VariationDiff | undefined; | ||
}; |
@@ -9,3 +9,3 @@ "use strict"; | ||
return Object.entries(zippedVariations).reduce((acc, [key, value]) => { | ||
if (key === `primary` || key === "items") | ||
if (key === `primary` || key === "items" || key === "fields") | ||
return acc; | ||
@@ -63,2 +63,3 @@ if ((value === null || value === void 0 ? void 0 : value.left) === (value === null || value === void 0 ? void 0 : value.right)) | ||
const diffItems = compareWidgets(variationA === null || variationA === void 0 ? void 0 : variationA.items, variationB === null || variationB === void 0 ? void 0 : variationB.items); | ||
const diffFields = compareWidgets(variationA === null || variationA === void 0 ? void 0 : variationA.fields, variationB === null || variationB === void 0 ? void 0 : variationB.fields); | ||
const diffVariation = { | ||
@@ -68,2 +69,3 @@ ...diffMeta, | ||
...(diffItems ? { items: diffItems } : {}), | ||
...(diffFields ? { fields: diffFields } : {}), | ||
}; | ||
@@ -70,0 +72,0 @@ if (utils_1.Objects.isNotEmpty(diffVariation)) { |
@@ -152,3 +152,2 @@ import * as t from "io-ts"; | ||
}>]>>>; | ||
allowCaption: t.BooleanC; | ||
}>>; | ||
@@ -322,3 +321,2 @@ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{ | ||
}>]>>>; | ||
allowCaption: t.BooleanC; | ||
}>>; | ||
@@ -325,0 +323,0 @@ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{ |
@@ -23,3 +23,2 @@ import * as t from "io-ts"; | ||
}>]>>>; | ||
allowCaption: t.BooleanC; | ||
}>>; | ||
@@ -44,5 +43,4 @@ export declare type ImageConfig = t.TypeOf<typeof ImageConfig>; | ||
}>]>>>; | ||
allowCaption: t.BooleanC; | ||
}>>; | ||
}>]>>; | ||
export declare type Image = t.TypeOf<typeof Image>; |
@@ -20,3 +20,2 @@ "use strict"; | ||
thumbnails: t.readonlyArray(exports.Thumbnail), | ||
allowCaption: t.boolean, | ||
})); | ||
@@ -23,0 +22,0 @@ exports.Image = t.exact(t.intersection([ |
@@ -148,3 +148,2 @@ import * as t from "io-ts"; | ||
}>]>>>; | ||
allowCaption: t.BooleanC; | ||
}>>; | ||
@@ -151,0 +150,0 @@ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{ |
@@ -161,3 +161,2 @@ import * as t from "io-ts"; | ||
}>]>>>; | ||
allowCaption: t.BooleanC; | ||
}>>; | ||
@@ -320,3 +319,2 @@ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{ | ||
}>]>>>; | ||
allowCaption: t.BooleanC; | ||
}>>; | ||
@@ -323,0 +321,0 @@ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{ |
@@ -8,1 +8,2 @@ export * from "./CompositeSlice"; | ||
export * from "./SlicesTypes"; | ||
export * from "./SliceWidget"; |
@@ -11,1 +11,2 @@ "use strict"; | ||
(0, tslib_1.__exportStar)(require("./SlicesTypes"), exports); | ||
(0, tslib_1.__exportStar)(require("./SliceWidget"), exports); |
@@ -149,3 +149,2 @@ import * as t from "io-ts"; | ||
}>]>>>; | ||
allowCaption: t.BooleanC; | ||
}>>; | ||
@@ -316,3 +315,2 @@ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{ | ||
}>]>>>; | ||
allowCaption: t.BooleanC; | ||
}>>; | ||
@@ -319,0 +317,0 @@ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{ |
@@ -9,2 +9,3 @@ "use strict"; | ||
const NestableWidget_1 = require("../nestable/NestableWidget"); | ||
const SliceWidget_1 = require("./SliceWidget"); | ||
const IMAGE_PLACEHOLDER_URL = "https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format"; | ||
@@ -24,2 +25,3 @@ exports.Variation = t.exact(t.intersection([ | ||
items: t.record(common_1.WidgetKey, NestableWidget_1.NestableWidget), | ||
fields: t.record(common_1.WidgetKey, SliceWidget_1.SliceWidget), | ||
}), | ||
@@ -26,0 +28,0 @@ ])); |
{ | ||
"name": "@prismicio/types-internal", | ||
"version": "2.4.0-alpha.1", | ||
"version": "2.4.0-alpha.2", | ||
"description": "Prismic types for Custom Types and Prismic Data", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -44,3 +44,2 @@ import { either } from "fp-ts" | ||
provider: StringOrNull, | ||
caption: StringOrNull, | ||
}), | ||
@@ -47,0 +46,0 @@ ]), |
import { Objects } from "../../utils" | ||
import type { NestableWidget } from "../widgets/nestable" | ||
import type { SliceWidget } from "../widgets/slices" | ||
import type { Variation } from "../widgets/slices" | ||
import { type DiffChange, DiffOperation } from "./Changes" | ||
export type VariationMetadata = Omit<Variation, "primary" | "items"> | ||
export type VariationMetadata = Omit<Variation, "primary" | "items" | "fields"> | ||
export type VariationDiff = DiffChange< | ||
@@ -12,2 +13,3 @@ Variation, | ||
items?: Record<string, DiffChange<NestableWidget, NestableWidget>> | ||
fields?: Record<string, DiffChange<SliceWidget, SliceWidget>> | ||
} | ||
@@ -23,3 +25,3 @@ > | ||
return Object.entries(zippedVariations).reduce((acc, [key, value]) => { | ||
if (key === `primary` || key === "items") return acc | ||
if (key === `primary` || key === "items" || key === "fields") return acc | ||
@@ -31,6 +33,6 @@ if (value?.left === value?.right) return acc | ||
function compareWidgets( | ||
widgetsA?: { [key: string]: NestableWidget }, | ||
widgetsB?: { [key: string]: NestableWidget }, | ||
): Record<string, DiffChange<NestableWidget, NestableWidget>> | undefined { | ||
function compareWidgets<T>( | ||
widgetsA?: { [key: string]: T }, | ||
widgetsB?: { [key: string]: T }, | ||
): Record<string, DiffChange<T, T>> | undefined { | ||
const zippedWidgets = Objects.zipObjects(widgetsA, widgetsB) | ||
@@ -95,2 +97,3 @@ | ||
const diffItems = compareWidgets(variationA?.items, variationB?.items) | ||
const diffFields = compareWidgets(variationA?.fields, variationB?.fields) | ||
@@ -101,2 +104,3 @@ const diffVariation = { | ||
...(diffItems ? { items: diffItems } : {}), | ||
...(diffFields ? { fields: diffFields } : {}), | ||
} | ||
@@ -103,0 +107,0 @@ |
@@ -24,3 +24,2 @@ import * as t from "io-ts" | ||
thumbnails: t.readonlyArray(Thumbnail), | ||
allowCaption: t.boolean, | ||
}), | ||
@@ -27,0 +26,0 @@ ) |
@@ -8,1 +8,2 @@ export * from "./CompositeSlice" | ||
export * from "./SlicesTypes" | ||
export * from "./SliceWidget" |
@@ -8,2 +8,3 @@ import * as t from "io-ts" | ||
import type { DynamicSlice, StaticSlice } from "./Slice" | ||
import { SliceWidget } from "./SliceWidget" | ||
@@ -27,2 +28,3 @@ const IMAGE_PLACEHOLDER_URL = | ||
items: t.record(WidgetKey, NestableWidget), | ||
fields: t.record(WidgetKey, SliceWidget), | ||
}), | ||
@@ -29,0 +31,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
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
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
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3059284
320
73784
0
6