Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
4083afa
feat(openapi): add richtext node/mark types to spec and aliases
dipankarmaikap Jul 24, 2026
2e0b21b
feat(openapi): add RichText node/mark types to spec and aliases
dipankarmaikap Jul 24, 2026
848fae8
chore(openapi): use 'rich text' in prose descriptions
dipankarmaikap Jul 24, 2026
edad0de
fix(openapi): tighten richtext node schemas and add RichTextMark/Rich…
dipankarmaikap Jul 24, 2026
e18dd3e
chore(openapi): add deprecated RichtextFieldValue alias for backward …
dipankarmaikap Jul 27, 2026
33eeb23
fix(openapi): rename richtext-field-value to rich-text-field-value fo…
dipankarmaikap Jul 28, 2026
8f2782a
fix(openapi): make ParagraphNode attrs optional
dipankarmaikap Jul 28, 2026
3a7eb80
fix(openapi): improve richtext node schemas
dipankarmaikap Jul 29, 2026
3ddbebd
feat(schema): regenerate for RichTextFieldValue rename and add backwa…
dipankarmaikap Jul 29, 2026
46f56bb
feat(capi-client): regenerate for RichTextFieldValue rename
dipankarmaikap Jul 29, 2026
6d86516
feat(mapi-client): regenerate for RichTextFieldValue rename and add b…
dipankarmaikap Jul 29, 2026
8725cc5
chore(live-preview): regenerate for RichTextFieldValue rename
dipankarmaikap Jul 29, 2026
a29546f
chore(experiments): regenerate for RichTextFieldValue rename
dipankarmaikap Jul 29, 2026
56a09c2
feat(migrations): export RichTextFieldValue alongside deprecated Rich…
dipankarmaikap Jul 29, 2026
9a89ccd
fix(openapi): use block-content-input for richtext BlockNode body and…
dipankarmaikap Jul 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
343 changes: 332 additions & 11 deletions packages/capi-client/src/generated/overlay/_internal.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type MultilinkFieldValue = MultilinkFieldValueRoot;

export type PluginFieldValue = PluginFieldValueRoot;

export type RichtextFieldValue = RichtextFieldValueRoot;
export type RichTextFieldValue = RichTextFieldValueRoot;

export type TableFieldValue = TableFieldValueRoot;

Expand Down Expand Up @@ -95,7 +95,7 @@ export type RichtextFieldRoot = BaseFieldRoot & ValueFieldRoot & {
*/
toolbar?: Array<'ai-complete' | 'ai-shorten' | 'ai-extend' | 'ai-rephrase' | 'ai-summarize' | 'ai-simplify' | 'ai-tone' | 'ai-emoji' | 'ai-translate' | 'ai-tldr' | 'ai-spelling' | 'blok' | 'ltr' | 'rtl' | 'export' | 'import' | 'bold' | 'list' | 'inlinecode' | 'code' | 'color' | 'copy' | 'cut' | 'emoji' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'highlight' | 'unset' | 'hrule' | 'image' | 'italic' | 'link' | 'anchor' | 'olist' | 'paragraph' | 'paste-action' | 'paste' | 'quote' | 'redo' | 'strike' | 'subscript' | 'superscript' | 'underline' | 'undo' | 'align-left' | 'align-center' | 'align-right' | 'align-justify'>;
/**
* Custom CSS styles for the richtext field
* Custom CSS styles for the rich text field
*/
style_options?: Array<{
_uid?: string;
Expand Down Expand Up @@ -678,7 +678,7 @@ export type BlockContentRoot = {
* Storyblok editor markup string for inline editing (present in draft/preview mode)
*/
_editable?: string;
[key: string]: string | number | boolean | Array<string | AssetFieldValueRoot | BlockContentRoot> | AssetFieldValueRoot | MultilinkFieldValueRoot | TableFieldValueRoot | RichtextFieldValueRoot | PluginFieldValueRoot | string | undefined;
[key: string]: string | number | boolean | Array<string | AssetFieldValueRoot | BlockContentRoot> | AssetFieldValueRoot | MultilinkFieldValueRoot | TableFieldValueRoot | RichTextFieldValueRoot | PluginFieldValueRoot | string | undefined;
};

/**
Expand All @@ -697,7 +697,7 @@ export type BlockContentInputRoot = {
* Storyblok editor markup string for inline editing (present in draft/preview mode)
*/
_editable?: string;
[key: string]: null | string | number | boolean | Array<string | AssetFieldValueRoot | BlockContentInputRoot> | AssetFieldValueRoot | MultilinkFieldValueRoot | TableFieldValueRoot | RichtextFieldValueRoot | PluginFieldValueRoot | string | undefined;
[key: string]: null | string | number | boolean | Array<string | AssetFieldValueRoot | BlockContentInputRoot> | AssetFieldValueRoot | MultilinkFieldValueRoot | TableFieldValueRoot | RichTextFieldValueRoot | PluginFieldValueRoot | string | undefined;
};

/**
Expand Down Expand Up @@ -750,19 +750,17 @@ export type PluginFieldValueRoot = {
};

/**
* Richtext field type - structured rich text document (ProseMirror format)
* Rich text field type - structured rich text document (ProseMirror/Tiptap format)
*/
export type RichtextFieldValueRoot = {
export type RichTextFieldValueRoot = {
/**
* Root node type for richtext documents
* Root node type — always "doc"
*/
type: 'doc';
/**
* Array of richtext nodes (paragraphs, headings, lists, bloks, etc.)
* Top-level rich text nodes
*/
content?: Array<{
[key: string]: unknown;
}>;
content: Array<RichTextFieldValueRichTextNode>;
};

/**
Expand Down Expand Up @@ -879,3 +877,326 @@ export type ValueFieldRoot = {
*/
force_merge?: boolean;
};

/**
* A rich text document node
*/
export type RichTextFieldValueRichTextNode = RichTextFieldValueParagraphNode | RichTextFieldValueTextNode | RichTextFieldValueHeadingNode | RichTextFieldValueBlockquoteNode | RichTextFieldValueBulletListNode | RichTextFieldValueOrderedListNode | RichTextFieldValueListItemNode | RichTextFieldValueCodeBlockNode | RichTextFieldValueHardBreakNode | RichTextFieldValueHorizontalRuleNode | RichTextFieldValueImageNode | RichTextFieldValueEmojiNode | RichTextFieldValueTableNode | RichTextFieldValueTableRowNode | RichTextFieldValueTableCellNode | RichTextFieldValueTableHeaderNode | RichTextFieldValueBlockNode;

export type RichTextFieldValueParagraphNode = {
type: 'paragraph';
attrs?: {
/**
* Text alignment
*/
textAlign: 'left' | 'center' | 'right' | 'justify' | null;
/**
* Text direction
*/
dir?: 'ltr' | 'rtl' | null;
};
content?: Array<RichTextFieldValueRichTextNode>;
marks?: Array<RichTextFieldValueRichTextMark>;
};

export type RichTextFieldValueTextNode = {
type: 'text';
/**
* The text content
*/
text: string;
marks?: Array<RichTextFieldValueRichTextMark>;
};

export type RichTextFieldValueHeadingNode = {
type: 'heading';
attrs: {
/**
* Heading level (h1–h6)
*/
level: 1 | 2 | 3 | 4 | 5 | 6 | null;
/**
* Text alignment
*/
textAlign: 'left' | 'center' | 'right' | 'justify' | null;
/**
* Text direction
*/
dir?: 'ltr' | 'rtl' | null;
};
content?: Array<RichTextFieldValueRichTextNode>;
marks?: Array<RichTextFieldValueRichTextMark>;
};

export type RichTextFieldValueBlockquoteNode = {
type: 'blockquote';
attrs?: {
/**
* Text direction
*/
dir?: 'ltr' | 'rtl' | null;
};
content?: Array<RichTextFieldValueRichTextNode>;
marks?: Array<RichTextFieldValueRichTextMark>;
};

export type RichTextFieldValueBulletListNode = {
type: 'bullet_list';
content?: Array<RichTextFieldValueRichTextNode>;
marks?: Array<RichTextFieldValueRichTextMark>;
};

export type RichTextFieldValueOrderedListNode = {
type: 'ordered_list';
attrs: {
/**
* Starting number for the ordered list
*/
order?: number;
};
content?: Array<RichTextFieldValueRichTextNode>;
marks?: Array<RichTextFieldValueRichTextMark>;
};

export type RichTextFieldValueListItemNode = {
type: 'list_item';
attrs?: {
/**
* Text direction
*/
dir?: 'ltr' | 'rtl' | null;
};
content?: Array<RichTextFieldValueRichTextNode>;
marks?: Array<RichTextFieldValueRichTextMark>;
};

export type RichTextFieldValueCodeBlockNode = {
type: 'code_block';
attrs: {
/**
* Language class (e.g. "language-typescript")
*/
class: string | null;
/**
* Text direction
*/
dir?: 'ltr' | 'rtl' | null;
};
content?: Array<RichTextFieldValueRichTextNode>;
marks?: Array<RichTextFieldValueRichTextMark>;
};

export type RichTextFieldValueHardBreakNode = {
type: 'hard_break';
};

export type RichTextFieldValueHorizontalRuleNode = {
type: 'horizontal_rule';
};

export type RichTextFieldValueImageNode = {
type: 'image';
attrs: {
/**
* Storyblok asset ID
*/
id: number | null;
/**
* Image URL
*/
src: string | null;
/**
* Alternative text
*/
alt: string | null;
title: string | null;
source: string | null;
copyright: string | null;
/**
* Asset metadata
*/
meta_data: {
alt?: string | null;
title?: string | null;
source?: string | null;
copyright?: string | null;
[key: string]: string | null | string | null | string | null | string | null | string | null | undefined;
} | null;
};
};

export type RichTextFieldValueEmojiNode = {
type: 'emoji';
attrs: {
/**
* Emoji name/slug
*/
name: string;
/**
* Emoji character
*/
emoji: string;
/**
* URL to a fallback image for unsupported environments
*/
fallbackImage: string;
};
};

export type RichTextFieldValueTableNode = {
type: 'table';
content?: Array<RichTextFieldValueRichTextNode>;
};

export type RichTextFieldValueTableRowNode = {
type: 'tableRow';
content?: Array<RichTextFieldValueRichTextNode>;
};

export type RichTextFieldValueTableCellNode = {
type: 'tableCell';
attrs: {
colspan?: number;
rowspan?: number;
/**
* Column widths in pixels
*/
colwidth?: Array<number> | null;
backgroundColor?: string | null;
};
content?: Array<RichTextFieldValueRichTextNode>;
};

export type RichTextFieldValueTableHeaderNode = {
type: 'tableHeader';
attrs: {
colspan?: number;
rowspan?: number;
/**
* Column widths in pixels
*/
colwidth?: Array<number> | null;
};
content?: Array<RichTextFieldValueRichTextNode>;
};

export type RichTextFieldValueBlockNode = {
type: 'blok';
attrs: {
/**
* Block instance ID
*/
id: string | null;
/**
* Array of embedded component instances
*/
body: Array<BlockContentRoot> | null;
};
};

/**
* Inline formatting mark applied to a text node
*/
export type RichTextFieldValueRichTextMark = RichTextFieldValueLinkMark | RichTextFieldValueBoldMark | RichTextFieldValueItalicMark | RichTextFieldValueStrikeMark | RichTextFieldValueUnderlineMark | RichTextFieldValueCodeMark | RichTextFieldValueSuperscriptMark | RichTextFieldValueSubscriptMark | RichTextFieldValueHighlightMark | RichTextFieldValueTextStyleMark | RichTextFieldValueAnchorMark | RichTextFieldValueStyledMark;

export type RichTextFieldValueLinkMark = {
type: 'link';
/**
* Link attributes
*/
attrs: {
/**
* Link URL
*/
href: string | null;
/**
* UUID of the linked story (for internal links)
*/
uuid: string | null;
/**
* Anchor/fragment identifier
*/
anchor: string | null;
/**
* Link target attribute
*/
target: '_self' | '_blank' | '_parent' | '_top' | null;
/**
* Type of link
*/
linktype: 'story' | 'url' | 'email' | 'asset' | null;
/**
* Custom link attributes
*/
custom?: {
[key: string]: unknown;
};
};
};

export type RichTextFieldValueBoldMark = {
type: 'bold';
};

export type RichTextFieldValueItalicMark = {
type: 'italic';
};

export type RichTextFieldValueStrikeMark = {
type: 'strike';
};

export type RichTextFieldValueUnderlineMark = {
type: 'underline';
};

export type RichTextFieldValueCodeMark = {
type: 'code';
};

export type RichTextFieldValueSuperscriptMark = {
type: 'superscript';
};

export type RichTextFieldValueSubscriptMark = {
type: 'subscript';
};

export type RichTextFieldValueHighlightMark = {
type: 'highlight';
attrs: {
/**
* Highlight color (CSS color value)
*/
color: string | null;
};
};

export type RichTextFieldValueTextStyleMark = {
type: 'textStyle';
attrs: {
color?: string | null;
id?: string | null;
class?: string | null;
};
};

export type RichTextFieldValueAnchorMark = {
type: 'anchor';
attrs: {
/**
* Anchor identifier
*/
id: string;
};
};

export type RichTextFieldValueStyledMark = {
type: 'styled';
attrs: {
/**
* CSS class name
*/
class: string | null;
};
};
2 changes: 1 addition & 1 deletion packages/capi-client/src/generated/types/_sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

export type { CapiStory } from '../capi/_internal.gen';
export type { Component } from '../mapi/_internal.gen';
export type { AssetFieldValue, BlockContentBase, BlockContentInputBase, Field, MultilinkFieldValue, PluginFieldValue, RichtextFieldValue, TableFieldValue } from '../overlay/_internal.gen';
export type { AssetFieldValue, BlockContentBase, BlockContentInputBase, Field, MultilinkFieldValue, PluginFieldValue, RichTextFieldValue, TableFieldValue } from '../overlay/_internal.gen';
Loading
Loading