{{-- @intent Bloco `text`: seção de texto rico (AST TipTap — ADR-028). @description O HTML vem **somente** do `ContentASTParser` (nunca do banco); o restante da página é marcação do componente. Funciona sem JS por construção. --}} @use('Services\RichText\Contracts\RichTextRenderer') @props([ 'props' => [], 'media' => [], 'blockId' => null, ]) @php $title = is_string($props['title'] ?? null) ? $props['title'] : null; $ast = is_array($props['body'] ?? null) ? $props['body'] : null; $html = $ast !== null ? app(RichTextRenderer::class)->toHtml($ast) : ''; $headingId = is_string($blockId) && $blockId !== '' ? preg_replace('/[^a-z0-9-]/', '', strtolower($blockId)).'-title' : null; @endphp @if ($title !== null && $html !== '')

{{ $title }}

{!! $html !!}
@endif