{
  "version": 3,
  "sources": ["../../src/ui/byline.tsx"],
  "sourcesContent": ["import { Avatar, type CommentAuthor } from '@tldraw/mentions'\nimport { TldrawUiTooltip, useCurrentTranslation } from 'tldraw'\nimport { formatFullDateTime, formatRelativeTime } from './format-time'\n\n/** @public */\nexport interface BylineProps {\n\tauthor: CommentAuthor\n\t/** ISO datetime; formatted to relative time by the component. */\n\tdate: string\n\t/** Shows an \"edited\" marker when the comment has been edited. */\n\tedited?: boolean\n}\n\n/**\n * A comment's metadata line: author name, relative time, and an edited marker. Hovering the time\n * shows the full date and time in a tooltip.\n * @public @react\n */\nexport function Byline({ author, date, edited }: BylineProps) {\n\t// The relative time is the one piece of a byline that isn't the host's data, so it follows the\n\t// same translation context as every other string in the UI rather than a prop of its own.\n\tconst { locale } = useCurrentTranslation()\n\treturn (\n\t\t<div className=\"tlui-cmt-head\">\n\t\t\t<Avatar author={author} />\n\t\t\t<span className=\"tlui-cmt-author\">{author.name}</span>\n\t\t\t<TldrawUiTooltip content={formatFullDateTime(date, locale)}>\n\t\t\t\t<span className=\"tlui-cmt-time\">\n\t\t\t\t\t{formatRelativeTime(date, locale)}\n\t\t\t\t\t{edited && <span className=\"tlui-cmt-edited\"> \u00B7 edited</span>}\n\t\t\t\t</span>\n\t\t\t</TldrawUiTooltip>\n\t\t</div>\n\t)\n}\n"],
  "mappings": "AAwBG,cAGC,YAHD;AAxBH,SAAS,cAAkC;AAC3C,SAAS,iBAAiB,6BAA6B;AACvD,SAAS,oBAAoB,0BAA0B;AAgBhD,SAAS,OAAO,EAAE,QAAQ,MAAM,OAAO,GAAgB;AAG7D,QAAM,EAAE,OAAO,IAAI,sBAAsB;AACzC,SACC,qBAAC,SAAI,WAAU,iBACd;AAAA,wBAAC,UAAO,QAAgB;AAAA,IACxB,oBAAC,UAAK,WAAU,mBAAmB,iBAAO,MAAK;AAAA,IAC/C,oBAAC,mBAAgB,SAAS,mBAAmB,MAAM,MAAM,GACxD,+BAAC,UAAK,WAAU,iBACd;AAAA,yBAAmB,MAAM,MAAM;AAAA,MAC/B,UAAU,oBAAC,UAAK,WAAU,mBAAkB,0BAAS;AAAA,OACvD,GACD;AAAA,KACD;AAEF;",
  "names": []
}
