Skip to content

@thermal-label/d1-core

Interfaces

InterfaceDescription
D1MediaD1 tape media descriptor — minimum shape needed by the encoder.
D1PrintOptionsPrint-time options understood by buildPrinterStream.

Type Aliases

Type AliasDescription
D1MaterialD1 substrate family. Picker / preview UX hint — the rasterizer does not branch on this. The rhino-* values cover DYMO's industrial Rhino™ cartridge line.
D1MediaKey-

Variables

VariableDescription
D1_MEDIA-
D1_MEDIA_LIST-
D1_TAPE_12MMCanonical 12 mm Black-on-White cartridge — picker default.
D1_TAPE_19MMCanonical 19 mm Black-on-White cartridge — picker default.
D1_TAPE_24MMCanonical 24 mm Black-on-White cartridge — picker default.
D1_TAPE_6MMCanonical 6 mm Black-on-White cartridge — picker default.
D1_TAPE_9MMCanonical 9 mm Black-on-White cartridge — picker default.
STATUS_REQUESTStatus request — ESC A.
TAPE_TYPE_DEFAULTESC C n — D1 tape-type / colour-palette selector.
TAPE_TYPE_MAX-

Functions

FunctionDescription
buildPrinterStreamBuild a raw byte stream for the USB Printer-class endpoint.
findAllD1MediaByTapeWidthFind every catalogued cartridge for a given tape width.
findD1MediaByIdLook up an entry by its kebab-case id. Convenience for callers that have an id in hand and want the full descriptor without iterating the keyed registry.
findD1MediaByTapeWidthFind the canonical Black-on-White cartridge for a given tape width.
parseStatusParse a D1 status reply (8 bytes; only byte 0 used).
tapeTypeForMap the user-selected media's text + background colours to the ESC C selector (0..12). Unknown / unenumerated combinations and undefined media both return 0, the safe fallback (the cassette's ink prints regardless of the byte sent).