Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@orz/ui-hex

Latest version: v0.1.2-master.20261127083915.gf6fce9e

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: orzfly
1 Stars
0 Forks
123 Versions
18.9K Downloads
TypeScript Repo language

Scan summary

@orz/ui-hex was last scanned on 27 Nov 2026 at version 0.1.2-master.20261127083915.gf6fce9e. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 123 versions; the latest 5 were published within 3 days (25–27 Nov 2026).
  • Findings: No rules fired in version 0.1.2-master.20261127083915.gf6fce9e.
  • Downloads: 18,876 downloads.

Versions

123 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.2-master.20261127083915.gf6fce9e LATEST 27 Nov 2026 No rules fired
0.1.2-master.20261127075817.gdd5b46d 27 Nov 2026 No rules fired
0.1.2-master.20261126185430.ga3bf9ac 26 Nov 2026 No rules fired
0.1.2-master.20261126061418.gf2622ab 26 Nov 2026 Not shown
0.1.2-master.20261125204259.gaf8791f 25 Nov 2026 Not shown

No rules fired in 0.1.2-master.20261127083915.gf6fce9e

Findings

Findings for v0.1.2-master.20261127083915.gf6fce9e. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.2-master.20261127083915.gf6fce9e; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@orz/ui-hex

A virtualised hex view over any byte source, in memory or paged; an editor over the same sources that keeps its edits in memory and exports the result; and a data inspector that interprets the bytes at the selection. Colours come from @orz/ui's theme tokens, so every theme gets a matching selection.

Install

pnpm add @orz/ui-hex @orz/query @orz/themes @orz/ui lucide-react radix-ui react react-dom sonner
# only for @orz/ui-hex/content:
pnpm add @orz/ui-content

@orz/ui, radix-ui and React are peer dependencies; the rest are there because @orz/ui needs them (see its README). The encoding picker in the view's and the editor's header is @orz/ui's FilterMenu, and the inspector's endianness switch its Switch; both have to share the app's radix copy.

CSS

@import "tailwindcss";
@import "@orz/ui/styles.css";
@import "@orz/ui-hex/styles.css";

Import it after @orz/ui/styles.css. The stylesheet is plain CSS, scoped under .orz-hex and .orz-hex-inspector, and every colour in it is derived from the theme tokens through these variables:

Variable Default
--hex-font var(--font-mono), then the system monospace fonts
--hex-row-height 1.375rem
--hex-fill color-mix(in oklch, var(--primary) 32%, var(--card))
--hex-edge var(--primary)
--hex-twin-fill color-mix(in oklch, var(--foreground) 6%, var(--card))
--hex-twin-edge var(--muted-foreground)
--hex-hover var(--accent)
--hex-label var(--muted-foreground)
--hex-faded color-mix(in oklch, var(--muted-foreground) 70%, transparent)
--hex-modified var(--destructive)

The defaults are declared on .orz-hex and .orz-hex-inspector themselves, so they resolve against whichever theme is active above them. To override one, target those elements:

.my-dump :is(.orz-hex, .orz-hex-inspector) {
  --hex-row-height: 1.5rem;
  --hex-hover: var(--secondary);
}

The strong pair (--hex-fill, --hex-edge) marks the selection in the pane it was made in while the view has focus; the twin pair marks it in the other pane, and in both once focus leaves. --hex-modified colours the glyphs of bytes that came from editing, in HexEditor only; selection and hover draw over it as usual.

Font

The stylesheet loads no font. Any monospace font works. Control codes are drawn as two small stacked letters (NU, LF, CR, …) rather than the U+2400 control pictures, so the grid stays aligned in fonts that lack them, which is every webfont subset on fontsource. To use JetBrains Mono:

import "@fontsource-variable/jetbrains-mono";
/* after the @orz/ui-hex/styles.css import */
.orz-hex,
.orz-hex-inspector {
  --hex-font: "JetBrains Mono Variable", monospace;
}

Byte sources

Every component reads through a ByteSource, the editor through a document that is one itself:

interface ByteSource {
  /** Total length in bytes; read again after every change notification. */
  readonly size: number;
  /** Exactly min(length, size - offset) bytes, sync or as a promise. */
  read(offset: number, length: number, signal?: AbortSignal): Uint8Array | Promise<Uint8Array>;
  /** The bytes when they are at hand with no I/O, else undefined; never starts a read. */
  peek?(offset: number, length: number): Uint8Array | undefined;
  /** Content or size changed: the view drops its cache and re-reads what is visible. */
  subscribe?(onChange: () => void): () => void;
}

The size must be known up front, because it sets the scroll extent. A source that holds bytes in memory can answer peek, and a view then redraws from it at once after a change instead of showing placeholders while it re-reads. createHexDocument learns whether a source is sync from its first real read, and never reads zero bytes.

In memory, reads are subarrays and nothing is copied or cached; peek answers the same way:

import { bytesSource } from "@orz/ui-hex";

const source = bytesSource(new Uint8Array(await file.arrayBuffer()));

A File or any other Blob is read on demand, in 64 KiB pages:

import { blobSource } from "@orz/ui-hex";

const source = blobSource(file);

Anything else is a source of your own. Over HTTP range requests:

import type { ByteSource } from "@orz/ui-hex";

async function httpSource(url: string): Promise<ByteSource> {
  const head = await fetch(url, { method: "HEAD" });
  const size = Number(head.headers.get("content-length"));
  return {
    size,
    async read(offset, length, signal) {
      if (length <= 0 || offset >= size) return new Uint8Array(0);
      const end = Math.min(size, offset + length) - 1;
      const response = await fetch(url, {
        headers: { Range: `bytes=${offset}-${end}` },
        signal,
      });
      if (response.status !== 206) throw new Error(`HTTP ${response.status}`);
      return new Uint8Array(await response.arrayBuffer());
    },
  };
}

const source = await httpSource("https://app.example/dumps/core.bin");

The view asks for whole pages, shares one request between the rows that need a page, keeps up to 256 pages (16 MiB), and aborts the signal of a page that has scrolled more than a page out of view. A failed page renders ??, is not cached, and is asked for again when it next comes into view; onReadError(error, offset) reports each failure. A HexDocument over an async source keeps a page cache of the same size of its own, which survives edits, so an editor over a paged source can hold up to twice that.

HexView and HexInspector

import { bytesSource, HexInspector, type HexSelection, HexView } from "@orz/ui-hex";

function Dump({ bytes }: { bytes: Uint8Array }) {
  const source = useMemo(() => bytesSource(bytes), [bytes]);
  const [selection, setSelection] = useState<HexSelection | null>(null);
  return (
    <div style={{ display: "flex", gap: "1.5rem", height: 480 }}>
      <HexView source={source} selection={selection} onSelectionChange={setSelection} />
      <HexInspector source={source} selection={selection} />
    </div>
  );
}

Keep the source's identity stable: a new source object drops the view's cache.

A selection is { anchor, focus, pane }, inclusive at both ends, so anchor === focus is one selected byte; null is nothing. pane is "hex" or "text", the pane the selection was made in.

HexView props
Prop Default
source The bytes
selection, onSelectionChange Controlled selection
defaultSelection null Uncontrolled selection
columns 16 Bytes per row, or "auto" to fit the width (below)
maxColumns 16 The most columns "auto" picks
groupSize 8 Bytes between group gaps; 0 for none
baseAddress 0 Added to displayed addresses, never to offsets
rows A fixed viewport height in rows; omitted, the view fills its parent's height
resizable false A resize handle in the bottom corner: true for both ways, "horizontal" or "vertical"
showAddresses, showColumnLabels, showText, showStatusBar true
uppercase true Hex digit case
fadeZeroBytes true Fades 00
controlCodes "abbreviations" Or "dots"
encoding, onEncodingChange Controlled text-pane encoding (below)
defaultEncoding "ascii" Uncontrolled text-pane encoding
showEncodingPicker true The encoding picker in the text pane's header
onCopy Reports each copy (below)
onReadError (error, offset) per failed page
ref { scrollToOffset(offset, align?), focus() }; align is "nearest", "start" or "center"
className, aria-label "Hex view"

Without rows, give the parent a definite height. The view scrolls by whole rows; without rows, the strip under the last whole row stays empty. Above roughly 13 MiB at 16 columns the content is taller than browsers let an element be; the view then maps the scrollbar onto rows and moves a few rows per wheel notch, so dragging the scrollbar becomes coarse but the wheel and keyboard stay precise.

The view is as wide as its columns, and never wider than its container. With a fixed columns, a narrower container scrolls it sideways. With columns="auto" it takes the width maxColumns need and shows the widest of maxColumns and the powers of two below it, down to 4, that fits the width it gets, so a narrow container or a narrow drag of the handle gets 8 or 4 columns instead of a scrollbar; below 4 it scrolls. A resize keeps the byte at the start of the top row in the top row. To cap the width in pixels rather than columns, put the view in a container with a max-width: the stylesheet is unlayered, so its max-width: 100% on .orz-hex wins over a Tailwind class passed through className.

resizable lets the user drag the view's size. A dragged height adds rows beyond rows, and a dragged width overrides the content width, so a fixed columns scrolls or leaves space beside the text pane while "auto" refits.

HexInspector props
Prop Default
source, selection Usually the view's
littleEndian, onLittleEndianChange Controlled endianness
defaultLittleEndian true Uncontrolled endianness
className

It reads up to 8 bytes at the selection start and shows them as binary, Int8 to Int64, Uint8 to Uint64, Float16, Float32 and Float64. A row wider than the selection is dimmed but still shows the value read from the bytes after it; — marks a value that would run past the end of the source.

hexContent

A renderer for the @orz/ui-content registry, from its own entry point so that an app with no registry never loads one. @orz/ui-content is an optional peer dependency, needed only for this import.

import { ContentRenderers } from "@orz/ui-content";
import { imageContent } from "@orz/ui-content/attachment";
import { codeContent } from "@orz/ui-code";
import { hexContent } from "@orz/ui-hex/content";

// Last: it takes every binary file the renderers before it pass on.
const RENDERERS = [imageContent(), codeContent, hexContent];

<ContentRenderers renderers={RENDERERS}>{app}</ContentRenderers>;

It accepts a file with a url that is not text (by isTextFile) and is not deleted, in the viewer placement only: an attachment viewer then shows a .bin or a .zip as a HexView instead of a download pane, while a document keeps its link. The file is fetched once into a Blob, and the view pages through it. The view fills the pane, whose height is the viewer's --attachment-pane-height, with columns="auto", so a phone gets fewer bytes per row rather than a sideways scroll. While it loads, the registry's fallback shows; a fetch that fails shows the message and a Retry button.

HEX_PREVIEW_MAX_BYTES is 64 MiB. A file whose declared size is over it is never fetched, and one that turns out over it once fetched is not drawn: both show the fallback link and "Too large to preview — download to view."

Keyboard and copy

Key Moves the caret
← / → one byte
↑ / ↓ one row
PageUp / PageDown one viewport
Home / End start / end of the row
Ctrl/⌘ + Home / End start / end of the source
Ctrl/⌘ + A selects everything
Escape clears the selection

Shift extends the selection from its anchor. Tab leaves the view; clicking in the other pane switches panes, and a drag may cross from one pane into the other.

Copy (Ctrl/⌘ + C, or the browser menu) writes the selection as space-separated hex pairs from the hex pane, or as the text pane shows it from the text pane, up to 1 MiB. When the bytes are not all loaded, the view reads them and writes through navigator.clipboard. onCopy receives { ok: true, bytes }, or { ok: false, reason } with "too-large", "read-failed" or "clipboard-unavailable"; the view shows no toast itself. From the text pane, a copy also writes the exact bytes as hex digits under application/x-orz-hex (HEX_BYTES_TYPE), because its text shows an undecodable byte as a dot, which pastes back as 2E; navigator.clipboard writes text only, so a copy through it carries no exact bytes. copyText, hexByte, formatSize and the other formatters are exported for copy actions of your own; copyText takes the view's encoding (ASCII by default), and copyRange gives the byte range to read for it.

Encodings

The text pane decodes its bytes in one of these encodings, ASCII by default:

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @orz/ui-hex

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229