@opentui/qrcode/solid
Every export of @opentui/qrcode/solid in the 0.6.0 release, from its type declarations. A version names the release that added an export after the module's first release.
Functions#
function createQrSvg(text: string, options?: EncodeOptions & { ecl?: ErrorCorrectionLevel; border?: number; moduleSize?: number; }): stringfunction encodeTextBytes(text: string, encoding?: ByteEncoding): Uint8Arrayfunction registerQRCode(): void
Classes#
class QRCodemethod QRCode.getModule(x: number, y: number): booleanmethod QRCode.toMatrix(): boolean[][]method QRCode.toSvgString(options?: { border?: number; moduleSize?: number; lightColor?: string; darkColor?: string; }): stringmethod QRCode.toTerminalString(options?: number | TerminalRenderOptions): stringreadonly property QRCode.containsEci: booleanreadonly property QRCode.errorCorrectionLevel: ErrorCorrectionLevelreadonly property QRCode.fnc1: "none" | "first" | "second"readonly property QRCode.mask: numberreadonly property QRCode.size: numberreadonly property QRCode.symbologyIdentifier: stringreadonly property QRCode.version: numberstatic method QRCode.computeStructuredAppendParity(segments: readonly QrSegment[]): numberstatic method QRCode.encodeBytes(bytes: Uint8Array | number[], ecl?: ErrorCorrectionLevel, options?: EncodeOptions): QRCodestatic method QRCode.encodeEciText(escapedText: string, ecl?: ErrorCorrectionLevel, options?: EncodeOptions): QRCodestatic method QRCode.encodeGs1Text(gs1Data: string | Gs1Element[], ecl?: ErrorCorrectionLevel, options?: EncodeOptions): QRCodestatic method QRCode.encodeSegments(segments: QrSegment[], ecl?: ErrorCorrectionLevel, options?: EncodeOptions): QRCodestatic method QRCode.encodeStructuredAppend(parts: readonly (readonly QrSegment[])[], ecl?: ErrorCorrectionLevel, options?: EncodeOptions): QRCode[]static method QRCode.encodeText(text: string, ecl?: ErrorCorrectionLevel, options?: EncodeOptions): QRCodestatic method QRCode.maskCondition(mask: number, x: number, y: number): booleanstatic method QRCode.validateVersionPublic(version: number): void
class QRCodeRenderable extends BaseQRCodeRenderable<ErrorCorrectionLevel, number, QRCode>constructor QRCodeRenderable(ctx: RenderContext, options?: QRCodeOptions)static protected readonly property QRCodeRenderable._defaultOptions: { content: string; errorCorrectionLevel: ErrorCorrectionLevel.M; quietZone: number; scale: number; fit: QRCodeFitMode; foregroundColor: RGBA; backgroundColor: RGBA; fallbackContent: string; fallbackColor: RGBA; }
class QrSegmentmethod QrSegment.getTotalBits(version: number): numberreadonly property QrSegment.data: BitBufferreadonly property QrSegment.mode: Modereadonly property QrSegment.numChars: numberreadonly property QrSegment.parityBytes: readonly number[]static method QrSegment.isAlphanumeric(text: string): booleanstatic method QrSegment.isKanji(text: string): booleanstatic method QrSegment.isNumeric(text: string): booleanstatic method QrSegment.makeAlphanumeric(text: string): QrSegmentstatic method QrSegment.makeBytes(bytes: Uint8Array | number[]): QrSegmentstatic method QrSegment.makeBytesFromText(text: string, encoding?: ByteEncoding): QrSegmentstatic method QrSegment.makeEci(assignVal: number): QrSegmentstatic method QrSegment.makeEciSegmentsFromEscapedText(escapedText: string, options?: { defaultEncoding?: ByteEncoding; defaultEci?: number | null; }): QrSegment[]static method QrSegment.makeFnc1FirstPosition(): QrSegmentstatic method QrSegment.makeFnc1SecondPosition(applicationIndicator: string | number): QrSegmentstatic method QrSegment.makeKanji(text: string): QrSegmentstatic method QrSegment.makeKanjiFromShiftJis(bytes: Uint8Array | number[]): QrSegmentstatic method QrSegment.makeNumeric(digits: string): QrSegmentstatic method QrSegment.makeOptimizedSegments(text: string, version: number, options?: Pick<EncodeOptions, "eciForUtf8" | "kanji" | "byteEncoding" | "eciAssignment">): QrSegment[]static method QrSegment.makeSegments(text: string, options?: Pick<EncodeOptions, "eciForUtf8" | "kanji" | "byteEncoding" | "eciAssignment">): QrSegment[]static method QrSegment.makeStructuredAppendHeader(position: number, total: number, parity: number): QrSegment
Interfaces#
interface EncodeOptionsproperty EncodeOptions.boostEcl?: booleanproperty EncodeOptions.byteEncoding?: ByteEncodingproperty EncodeOptions.eciAssignment?: number | nullproperty EncodeOptions.eciForUtf8?: booleanproperty EncodeOptions.fnc1First?: booleanproperty EncodeOptions.fnc1Second?: Fnc1SecondPositionInfoproperty EncodeOptions.kanji?: booleanproperty EncodeOptions.mask?: numberproperty EncodeOptions.maxVersion?: numberproperty EncodeOptions.minVersion?: numberproperty EncodeOptions.optimize?: booleanproperty EncodeOptions.structuredAppend?: StructuredAppendInfo
interface Fnc1SecondPositionInfoproperty Fnc1SecondPositionInfo.applicationIndicator: string | number
interface Gs1Elementproperty Gs1Element.ai: stringproperty Gs1Element.data: stringproperty Gs1Element.separatorAfter?: boolean
interface QRCodeOptions extends QRCodeSharedOptions<QRCodeRenderable, ErrorCorrectionLevel>interface StructuredAppendInfoproperty StructuredAppendInfo.parity: numberproperty StructuredAppendInfo.position: numberproperty StructuredAppendInfo.total: number
interface TerminalRenderOptionsproperty TerminalRenderOptions.ansi?: booleanproperty TerminalRenderOptions.border?: numberproperty TerminalRenderOptions.invert?: boolean
Types#
type ByteEncoding = "utf-8" | "iso-8859-1" | "shift-jis"type QRCodeFitMode = "contain" | "none"
Enums#
enum ErrorCorrectionLevelenum-member ErrorCorrectionLevel.H = "H"enum-member ErrorCorrectionLevel.L = "L"enum-member ErrorCorrectionLevel.M = "M"enum-member ErrorCorrectionLevel.Q = "Q"
Constants and variables#
const EciAssignment: { readonly ISO_8859_1: 3; readonly SHIFT_JIS: 20; readonly UTF_8: 26; }