InstantPage blockQuote: nested-blocks payload

Upgrade InstantPageBlock.blockQuote from (text, caption) to
(blocks: [InstantPageBlock], caption). Legacy inbound shapes (API
pageBlockBlockquote, Postbox "t", FlatBuffers text) lift into
[.paragraph(text)]; outbound stays on the legacy wire constructor for
empty/single-paragraph quotes and uses pageBlockBlockquoteBlocks
otherwise. V1/V2 renderers recurse into child blocks with a fixed 10pt
inter-child gap; markdown forward/reverse, entity-expressibility, and
preview text updated. pullQuote is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
isaac 2026-05-29 00:57:22 +02:00
parent ef7d582849
commit 28763bb92d
10 changed files with 233 additions and 62 deletions

View file

@ -123,8 +123,9 @@ extension InstantPageBlock {
result.append(item.previewText())
}
return result
case let .blockQuote(text, caption):
return text.previewText() + caption.previewText()
case let .blockQuote(blocks, caption):
let body = blocks.map { $0.previewText() }.joined(separator: " ")
return body + caption.previewText()
case let .pullQuote(text, caption):
return text.previewText() + caption.previewText()
case .image(_, _, _, _):