+
+ {data.title || 'Sudoku Puzzle'}
+
+
+ {#if data.text}
+
+ {data.text}
+
+ {/if}
+
+
+
+
+ {#each sudokuGrid as row, rowIndex}
+ {#each row as cell, colIndex}
+ {@const isPreset = initialSequence &&
+ initialSequence[rowIndex * 9 + colIndex] !== '0' &&
+ initialSequence[rowIndex * 9 + colIndex] !== '.' &&
+ !userFilledPositions.has(`${rowIndex},${colIndex}`)}
+ {@const hasError = errorCells.has(`${rowIndex},${colIndex}`)}
+ {@const isSelected = selectedCell &&
+ selectedCell.row === rowIndex &&
+ selectedCell.col === colIndex}
+
+
handleCellClick(rowIndex, colIndex, e)}
+ on:keydown
+ >
+ {#if cell}
+
+ {cell}
+
+ {/if}
+
+ {/each}
+ {/each}
+
+
+
+
+ {#if showNumberPicker && selectedCell}
+
+
+ {#each Array.from({ length: 9 }, (_, i) => i + 1) as number}
+
+ {/each}
+
+
+
+
+
+
+ {/if}
+
+
+
+
+
+ {#if data.showSequence}
+
+
Current Sequence:
+ {getCurrentSequence()}
+
+ {/if}
+