@prezly/content-format
Advanced tools
Comparing version 0.63.0 to 0.64.0
import { OEmbedInfo as OEmbed } from '../common'; | ||
import { Element } from '../Element'; | ||
import { isNonEmptyString, isUuid } from '../validation'; | ||
import { isEnum, isNonEmptyString, isUuid } from '../validation'; | ||
export var EmbedNode; | ||
(function (EmbedNode) { | ||
EmbedNode.TYPE = 'embed'; | ||
let Layout; | ||
(function (Layout) { | ||
Layout["CONTAINED"] = "contained"; | ||
Layout["EXPANDED"] = "expanded"; | ||
Layout["FULL_WIDTH"] = "full-width"; | ||
})(Layout = EmbedNode.Layout || (EmbedNode.Layout = {})); | ||
EmbedNode.OEmbedInfo = OEmbed; | ||
@@ -15,2 +21,3 @@ function isEmbedNode(value) { | ||
isNonEmptyString(value.url) && | ||
isEnum(value.layout, Layout) && | ||
isUuid(value.uuid) && | ||
@@ -17,0 +24,0 @@ OEmbed.isOEmbedInfo(value.oembed); |
@@ -7,5 +7,11 @@ import { OEmbedInfo as OEmbed } from '../common'; | ||
oembed: OEmbed; | ||
layout: `${EmbedNode.Layout}`; | ||
} | ||
export declare namespace EmbedNode { | ||
const TYPE = "embed"; | ||
enum Layout { | ||
CONTAINED = "contained", | ||
EXPANDED = "expanded", | ||
FULL_WIDTH = "full-width" | ||
} | ||
export import OEmbedInfo = OEmbed; | ||
@@ -12,0 +18,0 @@ function isEmbedNode(value: any): value is EmbedNode; |
{ | ||
"name": "@prezly/content-format", | ||
"version": "0.63.0", | ||
"version": "0.64.0", | ||
"description": "Prezly Content Format types and utilities", | ||
@@ -53,3 +53,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "f0a62f54b232b259c6a32358727a80d50ba758e3" | ||
"gitHead": "88f1d7624157582035fe94dfad108e04c7e4e728" | ||
} |
import { OEmbedInfo as OEmbed } from '../common'; | ||
import { Element } from '../Element'; | ||
import { isNonEmptyString, isUuid } from '../validation'; | ||
import { isEnum, isNonEmptyString, isUuid } from '../validation'; | ||
@@ -9,2 +9,3 @@ export interface EmbedNode extends Element<typeof EmbedNode.TYPE> { | ||
oembed: OEmbed; | ||
layout: `${EmbedNode.Layout}`; | ||
} | ||
@@ -15,2 +16,8 @@ | ||
export enum Layout { | ||
CONTAINED = 'contained', | ||
EXPANDED = 'expanded', | ||
FULL_WIDTH = 'full-width', | ||
} | ||
export import OEmbedInfo = OEmbed; | ||
@@ -26,2 +33,3 @@ | ||
isNonEmptyString(value.url) && | ||
isEnum(value.layout, Layout) && | ||
isUuid(value.uuid) && | ||
@@ -28,0 +36,0 @@ OEmbed.isOEmbedInfo(value.oembed); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
216114
223
4316
1