feat(HexEditor): enhance styling for improved readability and visual clarity

This commit is contained in:
Jaime Idolpx 2026-06-12 15:09:38 -04:00
parent 0c2fa2479c
commit d8c8b0b4e1

View File

@ -315,7 +315,7 @@ export default function HexEditor({ data, readOnly = false, onSave }: HexEditorP
</div>
)} */}
<div className="px-3 font-mono text-xs leading-5 whitespace-nowrap">
<div className="px-3 font-mono font-bold text-xs leading-5 whitespace-nowrap">
{Array.from({ length: lastRenderRow - firstRenderRow }, (_, i) => {
const row = firstRenderRow + i;
const base = row * bytesPerRow;
@ -323,7 +323,7 @@ export default function HexEditor({ data, readOnly = false, onSave }: HexEditorP
<div key={row} className="flex items-center">
{/* Address */}
<span className="text-neutral-400 w-15 flex-shrink-0 select-none">
<span className="text-amber-200 w-15 flex-shrink-0 select-none">
{base.toString(16).padStart(8, '0').toUpperCase()}
</span>
@ -340,8 +340,8 @@ export default function HexEditor({ data, readOnly = false, onSave }: HexEditorP
const isAllMatch = allMatchSet.has(idx) && !isCurMatch;
const color = isCurMatch ? 'bg-orange-500 text-white'
: isAllMatch ? 'bg-yellow-800 text-yellow-200'
: byte === 0 ? 'text-neutral-700'
: 'text-green-400';
: byte === 0 ? 'text-neutral-500'
: 'text-green-300';
const ring = isCursor && pane === 'hex' ? ' ring-1 ring-inset ring-blue-400' : '';
const gap = col === 8 ? ' ml-2' : '';
return (
@ -357,7 +357,7 @@ export default function HexEditor({ data, readOnly = false, onSave }: HexEditorP
</div>
{/* Separator */}
<span className="text-neutral-700 mr-2 select-none"></span>
<span className="text-neutral-500 mr-2 select-none"></span>
{/* ASCII pane */}
<div className="flex">
@ -372,8 +372,8 @@ export default function HexEditor({ data, readOnly = false, onSave }: HexEditorP
const isAllMatch = allMatchSet.has(idx) && !isCurMatch;
const color = isCurMatch ? 'bg-orange-500 text-white'
: isAllMatch ? 'bg-yellow-800 text-yellow-200'
: printable ? 'text-blue-300'
: 'text-neutral-700';
: printable ? 'text-cyan-300'
: 'text-neutral-500';
const ring = isCursor && pane === 'ascii' ? ' ring-1 ring-inset ring-blue-400' : '';
return (
<span