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

@prismicio/types-internal

Package Overview
Dependencies
Maintainers
24
Versions
167
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 2.0.0-alpha.11 to 2.0.0-alpha.12

lib/customtypes/widgets/nestable/Link/ContentRelationshipResolver.d.ts

6

lib/content/fields/slices/Slice/SimpleSliceContent.js

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

decode: (() => {
if (ctx.fieldType === 'Group')
return (0, GroupContent_1.GroupLegacy)(ctx).decode;
return (0, nestable_1.NestableLegacy)(ctx).decode;
if (ctx.fieldType === "Group")
return (0, GroupContent_1.GroupLegacy)(ctx).decode.bind(null);
return (0, nestable_1.NestableLegacy)(ctx).decode.bind(null);
})(),

@@ -19,0 +19,0 @@ encode: (value) => {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.filterMissingSharedSlices = exports.collectWidgets = exports.validateSlices = exports.toStatic = exports.flattenWidgets = exports.CustomType = exports.StaticCustomType = void 0;
exports.filterMissingSharedSlices = exports.collectWidgets = exports.validateSlices = exports.toStatic = exports.flattenWidgets = exports.CustomType = exports.StaticCustomType = exports.CustomTypeFormat = void 0;
const tslib_1 = require("tslib");

@@ -10,2 +10,6 @@ const Either_1 = require("fp-ts/lib/Either");

const Section_1 = require("./Section");
exports.CustomTypeFormat = {
page: "page",
custom: "custom",
};
class CustomTypeSlicesError extends Error {

@@ -47,2 +51,3 @@ constructor(slices) {

hash: t.string,
format: (0, withFallback_1.withFallback)(t.keyof(exports.CustomTypeFormat), "custom"),
}),

@@ -49,0 +54,0 @@ ]));

@@ -101,3 +101,14 @@ import type { SharedSlice } from "../widgets/slices";

select?: "media" | "document" | "web" | null;
customtypes?: readonly string[];
customtypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}[];
masks?: readonly string[];

@@ -261,3 +272,14 @@ tags?: readonly string[];

select?: "media" | "document" | "web" | null;
customtypes?: readonly string[];
customtypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}[];
masks?: readonly string[];

@@ -437,3 +459,14 @@ tags?: readonly string[];

select?: "media" | "document" | "web" | null;
customtypes?: readonly string[];
customtypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}[];
masks?: readonly string[];

@@ -597,3 +630,14 @@ tags?: readonly string[];

select?: "media" | "document" | "web" | null;
customtypes?: readonly string[];
customtypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}[];
masks?: readonly string[];

@@ -600,0 +644,0 @@ tags?: readonly string[];

@@ -98,3 +98,14 @@ import type { NestableWidget } from "../widgets/nestable";

select?: "media" | "document" | "web" | null;
customtypes?: readonly string[];
customtypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}[];
masks?: readonly string[];

@@ -258,3 +269,14 @@ tags?: readonly string[];

select?: "media" | "document" | "web" | null;
customtypes?: readonly string[];
customtypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}[];
masks?: readonly string[];

@@ -427,3 +449,14 @@ tags?: readonly string[];

select?: "media" | "document" | "web" | null;
customtypes?: readonly string[];
customtypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}[];
masks?: readonly string[];

@@ -587,3 +620,14 @@ tags?: readonly string[];

select?: "media" | "document" | "web" | null;
customtypes?: readonly string[];
customtypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}[];
masks?: readonly string[];

@@ -590,0 +634,0 @@ tags?: readonly string[];

@@ -130,3 +130,25 @@ import * as t from "io-ts";

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ReadonlyArrayC<t.StringC>;
customtypes: t.ReadonlyArrayC<t.Type<{
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, unknown>>;
masks: t.Type<readonly string[], object, unknown>;

@@ -299,3 +321,25 @@ tags: t.Type<readonly string[], object, unknown>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ReadonlyArrayC<t.StringC>;
customtypes: t.ReadonlyArrayC<t.Type<{
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, unknown>>;
masks: t.Type<readonly string[], object, unknown>;

@@ -302,0 +346,0 @@ tags: t.Type<readonly string[], object, unknown>;

@@ -126,3 +126,25 @@ import * as t from "io-ts";

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ReadonlyArrayC<t.StringC>;
customtypes: t.ReadonlyArrayC<t.Type<{
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, unknown>>;
masks: t.Type<readonly string[], object, unknown>;

@@ -129,0 +151,0 @@ tags: t.Type<readonly string[], object, unknown>;

@@ -138,3 +138,25 @@ import * as t from "io-ts";

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ReadonlyArrayC<t.StringC>;
customtypes: t.ReadonlyArrayC<t.Type<{
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, unknown>>;
masks: t.Type<readonly string[], object, unknown>;

@@ -296,3 +318,25 @@ tags: t.Type<readonly string[], object, unknown>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ReadonlyArrayC<t.StringC>;
customtypes: t.ReadonlyArrayC<t.Type<{
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, unknown>>;
masks: t.Type<readonly string[], object, unknown>;

@@ -299,0 +343,0 @@ tags: t.Type<readonly string[], object, unknown>;

@@ -126,3 +126,25 @@ import * as t from "io-ts";

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ReadonlyArrayC<t.StringC>;
customtypes: t.ReadonlyArrayC<t.Type<{
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, unknown>>;
masks: t.Type<readonly string[], object, unknown>;

@@ -292,3 +314,25 @@ tags: t.Type<readonly string[], object, unknown>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ReadonlyArrayC<t.StringC>;
customtypes: t.ReadonlyArrayC<t.Type<{
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, unknown>>;
masks: t.Type<readonly string[], object, unknown>;

@@ -295,0 +339,0 @@ tags: t.Type<readonly string[], object, unknown>;

@@ -135,3 +135,25 @@ import * as t from "io-ts";

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ReadonlyArrayC<t.StringC>;
customtypes: t.ReadonlyArrayC<t.Type<{
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, unknown>>;
masks: t.Type<readonly string[], object, unknown>;

@@ -293,3 +315,25 @@ tags: t.Type<readonly string[], object, unknown>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ReadonlyArrayC<t.StringC>;
customtypes: t.ReadonlyArrayC<t.Type<{
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, unknown>>;
masks: t.Type<readonly string[], object, unknown>;

@@ -467,3 +511,25 @@ tags: t.Type<readonly string[], object, unknown>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ReadonlyArrayC<t.StringC>;
customtypes: t.ReadonlyArrayC<t.Type<{
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, unknown>>;
masks: t.Type<readonly string[], object, unknown>;

@@ -625,3 +691,25 @@ tags: t.Type<readonly string[], object, unknown>;

select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.ReadonlyArrayC<t.StringC>;
customtypes: t.ReadonlyArrayC<t.Type<{
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, {
customTypeId: string;
fields?: readonly {
fieldId: string;
customTypes?: readonly {
customTypeId: string;
fields?: readonly {
fieldId: string;
}[];
}[];
}[];
}, unknown>>;
masks: t.Type<readonly string[], object, unknown>;

@@ -628,0 +716,0 @@ tags: t.Type<readonly string[], object, unknown>;

{
"name": "@prismicio/types-internal",
"version": "2.0.0-alpha.11",
"version": "2.0.0-alpha.12",
"description": "Prismic types for Custom Types and Prismic Data",

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

@@ -80,19 +80,20 @@ import { either } from "fp-ts"

const ImageBlockCodec = (linkCodec: LinkCodec) => t.exact(
t.intersection([
t.type({
type: t.literal(RichTextNodeType.image),
data: t.intersection([
ImageContentView,
t.partial({
linkTo: nullable(linkCodec),
}),
]),
}),
t.partial({
label: StringOrNull,
direction: StringOrNull,
}),
]),
)
const ImageBlockCodec = (linkCodec: LinkCodec) =>
t.exact(
t.intersection([
t.type({
type: t.literal(RichTextNodeType.image),
data: t.intersection([
ImageContentView,
t.partial({
linkTo: nullable(linkCodec),
}),
]),
}),
t.partial({
label: StringOrNull,
direction: StringOrNull,
}),
]),
)

@@ -99,0 +100,0 @@ export const ImageBlock = ImageBlockCodec(Link)

@@ -31,5 +31,3 @@ import { either } from "fp-ts"

legacyReader.decode(u),
either.map((r) =>
({ value: r, __TYPE__: RichTextContentType }),
),
either.map((r) => ({ value: r, __TYPE__: RichTextContentType })),
)

@@ -36,0 +34,0 @@ },

@@ -20,4 +20,4 @@ import * as t from "io-ts"

decode: (() => {
if(ctx.fieldType === 'Group') return GroupLegacy(ctx).decode
return NestableLegacy(ctx).decode
if (ctx.fieldType === "Group") return GroupLegacy(ctx).decode.bind(null)
return NestableLegacy(ctx).decode.bind(null)
})(),

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

@@ -12,2 +12,7 @@ import { Either, left, right } from "fp-ts/lib/Either"

export const CustomTypeFormat = {
page: "page",
custom: "custom",
}
class CustomTypeSlicesError extends Error {

@@ -45,2 +50,3 @@ slices: Array<string>

hash: t.string,
format: withFallback(t.keyof(CustomTypeFormat), "custom"),
}),

@@ -47,0 +53,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