Skip to content

@namakina/landing-page/extract

Interfaces

InterfaceDescription
ExtractedFieldOne snapshot field plus the live elements behind it.
ExtractedForm-
SnapshotState-

Type Aliases

Type AliasDescription
ValueControl-

Functions

FunctionDescription
applyMaskFormats raw slot characters the way jQuery-mask does while typing: literals appear as soon as they are reached, surplus characters are dropped.
buildSnapshotBuilds the FormSnapshot sent with every inbound message.
collapseWhitespace-
digitsForMaskPrepares an agent-supplied value for a masked input: keeps slot characters and drops a repeated literal prefix (a phone typed with its leading 1 against a 1-000-000-0000 mask).
extractFormReads a tagged form into fields the SDK can snapshot and write. Hidden, submit, button, password and file inputs are omitted; radios and checkboxes sharing a name collapse into one field.
fieldSnapshotThe wire-shaped field; includeValues: false yields the schema form for the CLI.
findWrapperThe element hidden in place of a field: the highest ancestor below the form that holds none of the form's other controls, hidden inputs or protected text. data-nam-wrapper on an ancestor names it outright.
humanizefirst_nameFirst name, homeOwnerHome owner, FirstnameFirstname.
isMaskCompleteTrue when value fills every required slot of mask exactly as the mask lays it out.
labelOfField label precedence: data-nam-label, <label for>, wrapping label, aria-label, aria-labelledby, placeholder, then the humanized name.
optionLabelOfLabel for one radio or checkbox: its own label, else its value.
readValueThe current value of a field as a string; '' when empty.
requiredSlotCountNumber of required slots; optional and repeating slots do not count.
stripMaskThe characters of value that can occupy a slot of mask, in order.

Proprietary. All rights reserved.