{
  "format": "ui-contract-component-draft",
  "id": "shadcn:Message",
  "version": "0.4.1",
  "status": "complete",
  "domains": {
    "interface": "interface.json",
    "visual": {
      "tokens": "../../tokens.json",
      "css": "layout.css"
    },
    "behavior": "behavior.scxml",
    "accessibility": {
      "html": "accessibility.html",
      "rules": "accessibility.rules.json"
    }
  },
  "anatomy": {
    "group": "Actual vertical message grouping; no automatic log semantics.",
    "message": "Actual align-controlled avatar/content row.",
    "avatar": "Optional supplementary visual identity; readable speaker remains in header.",
    "content": "Flexible intrinsic-height message content stack.",
    "header": "Actual metadata row containing explicit speaker/time text.",
    "footer": "Actual metadata/action row, not automatic delivery state."
  },
  "stories": "stories.json",
  "ux": "ux.json",
  "composition": {
    "button": {
      "component": "../button/component.json"
    }
  },
  "convention": "semantic-component/1",
  "partBindings": {
    "group": {
      "kind": "element",
      "declaration": "MessageGroup",
      "selector": "[data-slot=\"message-group\"]",
      "description": "Actual vertical message grouping; no automatic log semantics.",
      "ownership": "actual wrapper"
    },
    "message": {
      "kind": "element",
      "declaration": "Message",
      "selector": "[data-slot=\"message\"]",
      "description": "Actual align-controlled avatar/content row.",
      "ownership": "actual wrapper"
    },
    "avatar": {
      "kind": "element",
      "declaration": "MessageAvatar",
      "selector": "[data-slot=\"message-avatar\"]",
      "description": "Optional supplementary visual identity; readable speaker remains in header.",
      "ownership": "actual wrapper"
    },
    "content": {
      "kind": "element",
      "declaration": "MessageContent",
      "selector": "[data-slot=\"message-content\"]",
      "description": "Flexible intrinsic-height message content stack.",
      "ownership": "actual wrapper"
    },
    "header": {
      "kind": "element",
      "declaration": "MessageHeader",
      "selector": "[data-slot=\"message-header\"]",
      "description": "Actual metadata row containing explicit speaker/time text.",
      "ownership": "actual wrapper"
    },
    "footer": {
      "kind": "element",
      "declaration": "MessageFooter",
      "selector": "[data-slot=\"message-footer\"]",
      "description": "Actual metadata/action row, not automatic delivery state.",
      "ownership": "actual wrapper"
    }
  },
  "visualContract": {
    "tokens": {
      "color-foreground": "semantic.color.foreground",
      "color-muted": "semantic.color.muted",
      "color-muted-foreground": "semantic.color.mutedForeground",
      "font-fallback": "semantic.typography.fallbackFamily",
      "font-family": "semantic.typography.fontFamily",
      "font-size-body": "semantic.typography.bodySize",
      "line-height-body": "semantic.typography.bodyLineHeight",
      "message-avatar-radius": "components.message.avatarRadius",
      "message-avatar-size": "components.message.avatarSize",
      "message-content-gap": "components.message.contentGap",
      "message-footer-height": "components.message.footerHeight",
      "message-footer-line": "components.message.footerLine",
      "message-footer-size": "components.message.footerSize",
      "message-group-gap": "components.message.groupGap",
      "message-metadata-inset": "components.message.metadataInset",
      "message-row-gap": "components.message.rowGap"
    },
    "runtimeProperties": {},
    "layoutPolicy": "Message maps all six actual wrappers. Visual frame names are not promoted to code identities: the native horizontal Message content example supplies the 8px avatar/row gap, while the actual MessageContent code wrapper is vertical and takes the observed 10px vertical gap. Representative group gap 24px,32px round avatar,12px metadata inset and 12/16px footer text are retained. Native header frame 16px conflicts with its actual 14/20px text; this reference retains 20px text height without clipping. Footer has 24px minimum and grows for native actions. Speaker/time and delivery text are explicit caller content, not inferred states or automatic announcements. Align=end reverses the row using actual data-align; logical layout works with direction. MessageGroup has no automatic live-log or pagination behavior. Optional Bubble children and new-message announcements remain explicit caller composition.",
    "variants": {
      "align": {
        "prop": "align",
        "attribute": "data-align",
        "values": [
          "start",
          "end"
        ]
      }
    },
    "sourceTraceability": "figma/traceability.json"
  }
}
