I
CardBrand
One payment-card brand.
| Property | Type | Default | Description |
|---|
brandreadonly | string | — | Brand id, e.g. 'visa'. |
namereadonly | string | — | Display name, e.g. 'Visa'. |
templatereadonly | string | — | Number template; # is a digit, e.g. '#### #### #### ####'. |
lengthsreadonly | readonly number[] | — | Valid total digit lengths, e.g. [16, 18, 19]. |
codereadonly | { readonly name: string; readonly size: number; } | — | Security code metadata, e.g. { name: 'CVV', size: 3 }. |
patternsreadonly | readonly CardPattern[] | — | IIN/BIN detection patterns (prefixes and ranges). |
I
PhoneCountry
Phone-number formats for every country: an international template with the
dialing-code digits as # digit placeholders, plus the priority/areaCodes
used to disambiguate countries sharing a dialing code (NANP +1, +7 RU/KZ).
NANP territories are normalized to code '1' (their 3-digit prefix moved into
areaCodes), so every dialing code is prefix-free and the +1 block shares one
numbering-plan template. Derived from the MIT-licensed react-phone-input-2
dataset — display formats, not authoritative validation.
| Property | Type | Default | Description |
|---|
name?readonly | string | — | Display name, e.g. 'United States' (omit for custom lists). |
iso2?readonly | string | — | ISO 3166-1 alpha-2 code, lowercase, e.g. 'us' (omit for custom lists). |
codereadonly | string | — | International dialing code digits (no +), e.g. '1', '380'. |
templatereadonly | string | — | International template; # is a digit, e.g. '+# (###) ###-####'. |
priority?readonly | number | — | Order among countries sharing code — lower wins when no area code matches.
Absent means 0 (the primary country for that code). |
areaCodes?readonly | readonly string[] | — | Area codes (the digits right after code) that belong to this country. |
T
CardPattern
Payment-card brands: detection patterns (IIN/BIN prefixes and ranges), the
number template (# = a digit), valid total lengths, and the security-code
info. Derived from the MIT-licensed credit-card-type dataset (Braintree).
The template uses the brand's gap positions; the trailing group is sized to the
longest valid length, so shorter numbers simply leave it partly empty.
type CardPattern = string | readonly [min: number, max: number];
I
CookieAttributes
Write-time cookie attributes (the Set-Cookie half of RFC 6265).
Cookies expose no way to read attributes back — these only describe how a
cookie is written (and must be repeated to overwrite or delete it, since a
cookie's identity is its name + domain + path).
interface CookieAttributes
| Property | Type | Default | Description |
|---|
path? | string | '/' | The path the cookie is scoped to. |
domain? | string | — | The domain the cookie is scoped to. Omitted = host-only cookie. |
maxAge? | number | — | Lifetime in seconds. Takes precedence over expires in browsers when both
are present (RFC 6265 §4.1.2.2). Non-positive values expire the cookie. |
expires? | Date | number | — | Expiry as a Date or Unix epoch milliseconds. Omitting both maxAge
and expires creates a session cookie. |
secure? | boolean | — | Only send the cookie over HTTPS. |
sameSite? | 'lax' | 'strict' | 'none' | 'lax' | SameSite attribute. 'none' requires secure: true — browsers silently
drop the cookie otherwise, so serializeCookie fails loudly instead. |
partitioned? | boolean | false | Partition the cookie by top-level site (CHIPS). Requires secure: true. |
I
InputState
The editable state of a text field: its current text and selection bounds.
Framework-agnostic and structurally compatible with any { value, selection }
pair (e.g. an input-masking engine's element state).
| Property | Type | Default | Description |
|---|
valuereadonly | string | — | The element's current value. |
selectionreadonly | readonly [from: number, to: number] | — | The selection as [from, to] (collapsed caret when from === to). |
T
StylePatch
A patch of inline styles — a map of CSS property names to string values.
Keys may be camelCase DOM style properties (borderRadius) or --custom
properties (set verbatim via setProperty).
type StylePatch = Record<string, string>;
T
TranslateAxis
The axis a translation is read along: x (horizontal) or y (vertical).
type TranslateAxis = 'x' | 'y';
T
TextFieldElement
A text field whose value and selection can be read and written.
type TextFieldElement = HTMLInputElement | HTMLTextAreaElement;