@marvr/storyblok-rich-text-types
Advanced tools
Comparing version 3.4.0 to 3.5.0
@@ -24,2 +24,4 @@ declare enum NodeTypes { | ||
SUBSCRIPT = "subscript", | ||
TEXT_STYLE = "textStyle", | ||
HIGHLIGHT = "highlight", | ||
TEXT = "text", | ||
@@ -176,4 +178,18 @@ COMPONENT = "blok" | ||
} | ||
interface TextStyleAttributes { | ||
color: string | null; | ||
} | ||
interface TextStyleNode { | ||
type: NodeTypes.TEXT_STYLE; | ||
attrs: TextStyleAttributes; | ||
} | ||
interface HighlightAttributes { | ||
color: string | null; | ||
} | ||
interface HighlightNode { | ||
type: NodeTypes.HIGHLIGHT; | ||
attrs: HighlightAttributes; | ||
} | ||
type BlockNodes = DocumentNode | HeadingNode | ParagraphNode | ListItemNode | OrderedListNode | UnorderedListNode | QuoteNode | CodeBlockNode | HorizontalRuleNode | BreakNode | ImageNode; | ||
type MarkNodes = BoldNode | StrongNode | StrikeNode | UnderlineNode | ItalicNode | CodeNode | LinkNode | StyledNode | AnchorNode | SuperscriptNode | SubscriptNode; | ||
type MarkNodes = BoldNode | StrongNode | StrikeNode | UnderlineNode | ItalicNode | CodeNode | LinkNode | StyledNode | AnchorNode | SuperscriptNode | SubscriptNode | TextStyleNode | HighlightNode; | ||
type RootNodes = HeadingNode | ParagraphNode | OrderedListNode | UnorderedListNode | QuoteNode | HorizontalRuleNode | ImageNode; | ||
@@ -185,3 +201,3 @@ type BlockNodesWithContent = DocumentNode | ParagraphNode | QuoteNode | UnorderedListNode | ListItemNode; | ||
type MarkNodesWithoutOptions = BoldNode | StrongNode | StrikeNode | UnderlineNode | ItalicNode | CodeNode | SuperscriptNode | SubscriptNode; | ||
type MarkNodesWithAttributes = LinkNode | AnchorNode | StyledNode; | ||
type MarkNodesWithAttributes = LinkNode | AnchorNode | StyledNode | TextStyleNode | HighlightNode; | ||
@@ -192,2 +208,2 @@ declare function isBlockNode(node: Node): node is BlockNodes; | ||
export { AnchorAttributes, AnchorNode, BlockNodes, BlockNodesWithAttributes, BlockNodesWithContent, BlockNodesWithContentAndAttributes, BlockNodesWithoutOptions, BoldNode, BreakNode, CodeBlockAttributes, CodeBlockNode, CodeNode, ComponentAttributes, ComponentBody, ComponentBodyShell, ComponentNode, DocumentNode, HeadingAttributes, HeadingLevels, HeadingNode, HorizontalRuleNode, ImageAttributes, ImageNode, ItalicNode, LinkAttributes, LinkNode, LinkTargets, LinkTypes, ListItemNode, MarkNodes, MarkNodesWithAttributes, MarkNodesWithoutOptions, Node, NodeAttributes, NodeTypes, NodeWithContent, OrderedListAttributes, OrderedListNode, ParagraphNode, QuoteNode, RootNodes, StrikeNode, StrongNode, StyledAttributes, StyledNode, SubscriptNode, SuperscriptNode, TextNode, UnderlineNode, UnorderedListNode, blockNodeTypes, isBlockNode, isComponentNode, isTextNode }; | ||
export { AnchorAttributes, AnchorNode, BlockNodes, BlockNodesWithAttributes, BlockNodesWithContent, BlockNodesWithContentAndAttributes, BlockNodesWithoutOptions, BoldNode, BreakNode, CodeBlockAttributes, CodeBlockNode, CodeNode, ComponentAttributes, ComponentBody, ComponentBodyShell, ComponentNode, DocumentNode, HeadingAttributes, HeadingLevels, HeadingNode, HighlightAttributes, HighlightNode, HorizontalRuleNode, ImageAttributes, ImageNode, ItalicNode, LinkAttributes, LinkNode, LinkTargets, LinkTypes, ListItemNode, MarkNodes, MarkNodesWithAttributes, MarkNodesWithoutOptions, Node, NodeAttributes, NodeTypes, NodeWithContent, OrderedListAttributes, OrderedListNode, ParagraphNode, QuoteNode, RootNodes, StrikeNode, StrongNode, StyledAttributes, StyledNode, SubscriptNode, SuperscriptNode, TextNode, TextStyleAttributes, TextStyleNode, UnderlineNode, UnorderedListNode, blockNodeTypes, isBlockNode, isComponentNode, isTextNode }; |
@@ -25,2 +25,4 @@ // src/nodes.ts | ||
NodeTypes2["SUBSCRIPT"] = "subscript"; | ||
NodeTypes2["TEXT_STYLE"] = "textStyle"; | ||
NodeTypes2["HIGHLIGHT"] = "highlight"; | ||
NodeTypes2["TEXT"] = "text"; | ||
@@ -27,0 +29,0 @@ NodeTypes2["COMPONENT"] = "blok"; |
{ | ||
"name": "@marvr/storyblok-rich-text-types", | ||
"version": "3.4.0", | ||
"version": "3.5.0", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "rich-text", |
@@ -26,2 +26,4 @@ export enum NodeTypes { | ||
SUBSCRIPT = 'subscript', | ||
TEXT_STYLE = 'textStyle', | ||
HIGHLIGHT = 'highlight', | ||
// Text | ||
@@ -236,2 +238,20 @@ TEXT = 'text', | ||
export interface TextStyleAttributes { | ||
color: string | null | ||
} | ||
export interface TextStyleNode { | ||
type: NodeTypes.TEXT_STYLE | ||
attrs: TextStyleAttributes | ||
} | ||
export interface HighlightAttributes { | ||
color: string | null | ||
} | ||
export interface HighlightNode { | ||
type: NodeTypes.HIGHLIGHT | ||
attrs: HighlightAttributes | ||
} | ||
export type BlockNodes = | ||
@@ -262,2 +282,4 @@ | DocumentNode | ||
| SubscriptNode | ||
| TextStyleNode | ||
| HighlightNode | ||
@@ -297,2 +319,7 @@ export type RootNodes = | ||
export type MarkNodesWithAttributes = LinkNode | AnchorNode | StyledNode | ||
export type MarkNodesWithAttributes = | ||
| LinkNode | ||
| AnchorNode | ||
| StyledNode | ||
| TextStyleNode | ||
| HighlightNode |
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
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
20079
673