@gmb/bitmark-parser - v7.2.0
    Preparing search index...

    Class Builder

    Index
    • Build a bit (bpg-compatible buildBit).

      Accepts the full bpg data shape (flat, ~250 optional fields, values in the JSON model types). Returns the normalized bit JSON. Throws No config found for bit: X for unknown bit types, as bpg does.

      NOTE (documented divergences from bpg):

      • the return value is bit JSON, not bpg's internal AST node model;
      • resourceType (an inference hint in bpg) is not carried into the JSON — the attached resource object is authoritative.

      resources follows bpg's JsonGenerator routing: on a bit whose config maps a repeatable resource tag group onto a collection key (e.g. images / logos — see the generated RESOURCE_COLLECTION_KEYS), the matching-type entries land under that key; on every other bit the first entry becomes the canonical single resource (as bpg: "if there is more than one resource, use the first one").

      Parameters

      Returns Record<string, unknown>

    • Build a highlight body bit (bpg-compatible buildHighlight). Shapes the HighlightJson body-bit; unset optionals are omitted.

      Parameters

      • _context: unknown
      • data: Record<string, unknown> | undefined

      Returns Record<string, unknown> | undefined