+
+
+ {block.type}
+
+
+ onMoveBlock(index, -1)} title="Move Up">
+
+
+ onMoveBlock(index, 1)} title="Move Down">
+
+
+ {#if activeLocale !== 'en'}
+ onTranslateBlock(index)} title="Translate from English">
+
+
+ {/if}
+ onRemoveBlock(index)} title="Remove Block">
+
+
+
+
+
+
+ {#if getBlockIssues(index).length > 0}
+
+
+ {#each getBlockIssues(index) as issue}
+ {issue.type === 'error' ? 'ERROR' : 'A11Y'}: {issue.message}
+ {/each}
+
+
+ {/if}
+
+ {#if block.type === 'paragraph'}
+
+ Text
+
+
+
+ {:else if block.type === 'heading'}
+
+
+ Level
+
+ H1
+ H2
+ H3
+ H4
+ H5
+ H6
+
+
+
+ Heading Text
+
+
+
+
+
+
+ ARIA Label (Optional)
+
+
+ {:else if block.type === 'media'}
+ {#if block.data.media_id && block.data.filename}
+
+
+
setFocalPoint(index, e)}
+ onkeydown={(e) => e.key === 'Enter' && setFocalPoint(index, e)}
+ role="button"
+ tabindex="0"
+ aria-label="Set focal point for image">
+
+
+
+
+
+
+ Click to set Focal Point: {Number(block.data['fp-x'] || 0.5).toFixed(2)}, {Number(block.data['fp-y'] || 0.5).toFixed(2)}
+
+
+
+
+
+ block.data.showAdvanced = !block.data.showAdvanced}>
+ {block.data.showAdvanced ? 'Hide' : 'Show'} JIT Settings
+
+
+
+ {#if block.data.showAdvanced}
+
+
+
+ Width
+
+
+
+ Height
+
+
+
+ Quality
+
+
+
+ Fit
+
+ Contain
+ Crop (Focal)
+ Max
+ Fill
+
+
+
+ {/if}
+
+
+
+
+
+
+
+
+
+
+
+ Caption / Alt Text
+
+
+
+
+
+
+ {:else}
+
onOpenMediaPicker(index)}
+ onkeydown={(e) => e.key === 'Enter' && onOpenMediaPicker(index)}
+ role="button"
+ tabindex="0"
+ style="cursor: pointer;">
+
+
+
+ {/if}
+ {:else if block.type === 'columns'}
+
+
+
+ {#each block.data.columns || [] as column, colIndex}
+
+
+
+ Col {colIndex + 1}
+ removeSlot(block, 'columns', colIndex)}
+ onkeydown={(e) => e.key === 'Enter' && removeSlot(block, 'columns', colIndex)}
+ role="button"
+ tabindex="0"
+ aria-label="Remove Column">
+
+
+ removeSubBlock(block, 'columns', colIndex, i)}
+ onMoveBlock={(i, dir) => { /* TODO */ }}
+ {onOpenMediaPicker}
+ {onUpdateBlockText}
+ {setFocalPoint}
+ />
+ addSubBlock(block, 'columns', colIndex)}>
+ Add to Column
+
+
+
+
+ {/each}
+
+
addSlot(block, 'columns')}>
+ Add Column
+
+
+ {:else if block.type === 'grid'}
+
+
+
+
+ {#each block.data.items || [] as item, itemIndex}
+
+
+
+ Item {itemIndex + 1}
+ removeSlot(block, 'grid', itemIndex)}
+ onkeydown={(e) => e.key === 'Enter' && removeSlot(block, 'grid', itemIndex)}
+ role="button"
+ tabindex="0"
+ aria-label="Remove Grid Item">
+
+
+ removeSubBlock(block, 'grid', itemIndex, i)}
+ onMoveBlock={(i, dir) => { /* TODO */ }}
+ {onOpenMediaPicker}
+ {onUpdateBlockText}
+ {setFocalPoint}
+ />
+ addSubBlock(block, 'grid', itemIndex)}>
+ Add to Item
+
+
+
+
+ {/each}
+
+
addSlot(block, 'grid')}>
+ Add Grid Item
+
+
+ {/if}
+