{#snippet defaultPanel(s: ProviderSnippetProps)} {@const wordCount = countWordsInText(s.plainText)} {@const charCount = s.plainText.length} {@const readingTimeMin = Math.max(1, Math.round(wordCount / 200))} {@const outline = s.document.children .map((block, blockIndex) => ({ block, blockIndex })) .filter(({ block }) => block.type === 'heading') .map(({ block, blockIndex }) => ({ blockIndex, level: block.type === 'heading' ? block.level : 1, text: block.type === 'heading' ? block.children.map((i) => (i.type === 'text' ? i.text : '')).join('') : '' })) .filter((e) => e.text.trim())} {@const warnings = collectWarnings(s)}
No headings yet
{:else}Nothing flagged
{:else}{block.src}
{block.alt || '(missing)'}
{#if block.caption}{block.caption}
{/if} {#if block.status}{block.status === 'pending' ? 'Uploading…' : 'Upload failed'}
{/if} {:else}Place caret on an image to edit it.
{/if} {/snippet}