{"version":3,"file":"chunk-Typography.mjs","names":["Tooltip.Root","Tooltip.Trigger","Tooltip.Content"],"sources":["../../src/components/Link/Link.tsx","../../src/components/TextCrawl/TextCrawl.tsx","../../src/util/format-time.ts","../../src/components/Timestamp/Timestamp.tsx","../../src/components/Typography/Typography.tsx"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { ark } from '@ark-ui/react/factory';\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { mx } from '@dxos/ui-theme';\nimport { type ThemedClassName } from '@dxos/ui-types';\n\nimport { recipes } from '../../recipes.ts';\n\nexport type LinkVariant = 'accent' | 'neutral';\n\nexport type LinkProps = ThemedClassName<ComponentPropsWithRef<typeof ark.a>> & {\n  /** `accent` colours the text (the default); `neutral` keeps the surrounding colour and underlines on hover. */\n  variant?: LinkVariant;\n};\n\n/**\n * Inline text link, opening in a new tab unless `target` says otherwise. Ark has no link part, so it is a plain\n * `<a>` (or, with `asChild`, the child, e.g. a router link).\n */\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n  ({ classNames, variant = 'accent', target = '_blank', rel = 'noreferrer', ...props }, forwardedRef) => (\n    <ark.a\n      {...props}\n      target={target}\n      rel={rel}\n      data-scope='link'\n      data-part='root'\n      data-variant={variant}\n      className={mx(recipes.link(), classNames)}\n      ref={forwardedRef}\n    />\n  ),\n);\n\nLink.displayName = 'Link';\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport React, {\n  type ComponentPropsWithRef,\n  type CSSProperties,\n  forwardRef,\n  useCallback,\n  useEffect,\n  useMemo,\n  useRef,\n  useState,\n} from 'react';\n\nimport { mx } from '@dxos/ui-theme';\nimport { type ThemedClassName } from '@dxos/ui-types';\n\nimport { recipes } from '../../recipes.ts';\nimport { type CSSVariables } from '../Container/Container.tsx';\n\nconst emptyLines: string[] = [];\n\nexport type TextCrawlProps = ThemedClassName<Omit<ComponentPropsWithRef<'div'>, 'children'>> & {\n  lines?: string[];\n  /** The line shown (controlled); absent, the crawl owns it. */\n  index?: number;\n  /** Wraps from the last line back to the first, scrolling on through a copy of the first. */\n  cyclic?: boolean;\n  /** Milliseconds a scroll takes. */\n  transition?: number;\n  /** Advances every `minDuration` (uncontrolled). */\n  autoAdvance?: boolean;\n  /** Starts at, and keeps to, the last line (uncontrolled). */\n  greedy?: boolean;\n  /** Least time a line is shown before advancing. */\n  minDuration?: number;\n};\n\n/**\n * Text lines in a one-line window that scroll up from one to the next. The line height is the inherited size's\n * `--dx-line-height`, so the crawl sizes with its row rather than having a scale of its own; the scroll is a CSS\n * transform driven by `--dx-text-crawl-index`, and only lines other than the shown one are hidden from assistive tech.\n */\nexport const TextCrawl = forwardRef<HTMLDivElement, TextCrawlProps>(\n  (\n    {\n      classNames,\n      lines = emptyLines,\n      index: indexProp,\n      cyclic,\n      transition = 500,\n      autoAdvance = false,\n      greedy = false,\n      minDuration = 1_000,\n      style,\n      ...props\n    },\n    forwardedRef,\n  ) => {\n    const [index, setIndex] = useState(() => (greedy ? Math.max(0, lines.length - 1) : 0));\n\n    // Written to the ribbon directly rather than through state, so a jump and the animation that follows it are not\n    // batched into one render.\n    const ribbonRef = useRef<HTMLDivElement>(null);\n    const setPosition = useCallback((position: number, animate = false) => {\n      const ribbon = ribbonRef.current;\n      if (ribbon) {\n        ribbon.style.setProperty('--dx-text-crawl-index', String(position));\n        ribbon.toggleAttribute('data-animate', animate);\n      }\n    }, []);\n\n    // A crawl whose lines shrank or changed (rather than grew) starts over.\n    const prevLinesRef = useRef<string[]>(lines);\n    const wasReset = useMemo(() => {\n      const prevLines = prevLinesRef.current;\n      const reset =\n        lines.length < prevLines.length || prevLines.length === 0 || !prevLines.every((line, i) => line === lines[i]);\n      prevLinesRef.current = lines;\n      return reset;\n    }, [lines]);\n\n    const paintedRef = useRef(false);\n    useEffect(() => {\n      setPosition(index, false);\n    }, []);\n\n    // Greedy: keep an uncontrolled crawl on the last line as lines arrive.\n    useEffect(() => {\n      if (!greedy || indexProp !== undefined || lines.length === 0) {\n        return;\n      }\n\n      const lastIndex = lines.length - 1;\n      setIndex((prev) => (prev === lastIndex ? prev : lastIndex));\n    }, [greedy, lines, indexProp]);\n\n    // Controlled.\n    useEffect(() => {\n      if (indexProp === undefined || indexProp === index) {\n        return;\n      }\n\n      const next = Math.max(0, Math.min(indexProp, lines.length - 1));\n      setIndex(next);\n      setPosition(next, true);\n    }, [indexProp, index]);\n\n    // Uncontrolled.\n    useEffect(() => {\n      if (indexProp !== undefined) {\n        return;\n      }\n\n      let timeout: ReturnType<typeof setTimeout> | undefined;\n      // `greedy` arrives at the last line on the first paint only; testing it on every update would suppress the\n      // animation for good.\n      const settled = paintedRef.current;\n      paintedRef.current = true;\n      setPosition(index, settled && index !== 0 && !wasReset);\n      if (cyclic && index >= lines.length) {\n        // Scrolled onto the copy of the first line: jump back to the real one once the scroll lands.\n        timeout = setTimeout(() => {\n          setIndex(0);\n          setPosition(0, false);\n        }, transition);\n      }\n\n      return () => clearTimeout(timeout);\n    }, [wasReset, lines, index, indexProp, cyclic]);\n\n    // Auto-advance.\n    const lastUpdatedRef = useRef(Date.now());\n    useEffect(() => {\n      if (!autoAdvance) {\n        return;\n      }\n\n      let interval: ReturnType<typeof setInterval> | undefined;\n      const next = () => {\n        setIndex((prev) => {\n          const next = Math.min(prev + 1, lines.length);\n          if (next >= lines.length && !cyclic) {\n            clearInterval(interval);\n            return prev;\n          }\n\n          return next;\n        });\n      };\n\n      if (wasReset) {\n        setIndex(greedy ? Math.max(0, lines.length - 1) : 0);\n      } else {\n        const now = Date.now();\n        const wasVisible = now - lastUpdatedRef.current >= minDuration;\n        lastUpdatedRef.current = now;\n        if (wasVisible) {\n          next();\n        }\n      }\n\n      interval = setInterval(next, minDuration);\n      return () => clearInterval(interval);\n    }, [lines, wasReset, indexProp, autoAdvance, greedy, minDuration, cyclic, transition]);\n\n    const rootStyle: CSSProperties & CSSVariables = {\n      ...style,\n      '--dx-text-crawl-duration': `${transition}ms`,\n    };\n    const shown = (line: number) => index === line || (line === 0 && index === lines.length);\n\n    return (\n      <div\n        {...props}\n        data-scope='text-crawl'\n        data-part='root'\n        style={rootStyle}\n        className={mx(recipes.textCrawl(), classNames)}\n        ref={forwardedRef}\n      >\n        <div data-scope='text-crawl' data-part='ribbon' className={recipes.textCrawlRibbon()} ref={ribbonRef}>\n          {lines.map((line, i) => (\n            <div\n              key={i}\n              data-scope='text-crawl'\n              data-part='line'\n              data-active={shown(i) ? '' : undefined}\n              aria-hidden={shown(i) ? undefined : true}\n              className={recipes.textCrawlLine()}\n            >\n              {line}\n            </div>\n          ))}\n          {cyclic && lines.length > 0 && (\n            <div\n              data-scope='text-crawl'\n              data-part='line'\n              data-active={index === lines.length || index === 0 ? '' : undefined}\n              aria-hidden\n              className={recipes.textCrawlLine()}\n            >\n              {lines[0]}\n            </div>\n          )}\n        </div>\n      </div>\n    );\n  },\n);\n\nTextCrawl.displayName = 'TextCrawl';\n","//\n// Copyright 2026 DXOS.org\n//\n\nexport type FormatCompactOptions = {\n  /** The instant to measure against; supplied by a test so the result does not move with the clock. */\n  now?: Date;\n};\n\n/** An instant as an ISO string, a Unix timestamp in milliseconds, or a Date. */\nexport type DateLike = string | number | Date;\n\n/** Normalizes a {@link DateLike}; an unparseable value yields an invalid Date, which callers check. */\nexport const toDate = (date: DateLike): Date => (date instanceof Date ? date : new Date(date));\n\n/** Beyond two hours a minute count stops being read as a count and starts being arithmetic. */\nconst COMPACT_MINUTES = 120;\n\n/** Beyond a day, hours are a number the reader has to divide; the calendar date says it directly. */\nconst COMPACT_HOURS = 24;\n\n/** `setTimeout` treats anything past this as zero, so a longer wait has to be capped, not requested. */\nconst MAX_TIMEOUT = 2_147_483_647;\n\n/**\n * A timestamp in the space a column has: `12m`, `90m`, `5h`, then `12 Sep`.\n *\n * Minutes run to two hours rather than to one, because `90m` is still a duration a reader feels\n * while `1.5h` is one they compute; hours run to a day, after which the calendar date locates the\n * event better than any count of hours. The full timestamp belongs in a tooltip beside this, since\n * everything here is lossy by design.\n *\n * Returns the empty string for an unparseable value: a compact cell has no room to explain itself,\n * and the tooltip carries the original for anyone who needs it.\n */\nexport const formatCompact = (date: DateLike, { now }: FormatCompactOptions = {}): string => {\n  const parsed = toDate(date);\n  if (Number.isNaN(parsed.getTime())) {\n    return '';\n  }\n\n  const reference = now ?? new Date();\n  const minutes = Math.floor((reference.getTime() - parsed.getTime()) / 60_000);\n  // A date in the future is a clock skew or a seeded fixture, not a duration to count down.\n  if (minutes < 0) {\n    return formatCompactDate(parsed, reference);\n  }\n  if (minutes < 1) {\n    return 'now';\n  }\n  if (minutes < COMPACT_MINUTES) {\n    return `${minutes}m`;\n  }\n\n  const hours = Math.floor(minutes / 60);\n  if (hours < COMPACT_HOURS) {\n    return `${hours}h`;\n  }\n\n  return formatCompactDate(parsed, reference);\n};\n\n/** The day, and the year only when it is not this one — a column has no room for what is implied. */\nconst formatCompactDate = (date: Date, reference: Date): string =>\n  date.toLocaleDateString(undefined, {\n    month: 'short',\n    day: 'numeric',\n    ...(date.getFullYear() !== reference.getFullYear() && { year: 'numeric' }),\n  });\n\n/**\n * How long until the compact form of this timestamp changes, in milliseconds, or `undefined` when it\n * never will again.\n *\n * A live counter that ticks on a fixed interval either lags (a minute counter on a five-minute\n * timer) or wakes for nothing (a day-old entry on a one-second timer); asking the value when it next\n * changes is the only cadence that is both exact and idle when it can be.\n */\nexport const compactInterval = (date: DateLike, { now }: FormatCompactOptions = {}): number | undefined => {\n  const parsed = toDate(date);\n  if (Number.isNaN(parsed.getTime())) {\n    return undefined;\n  }\n\n  const elapsed = (now ?? new Date()).getTime() - parsed.getTime();\n  // A future instant shows a date until the clock catches up, and then becomes a counter: wake when\n  // it does. Capped to the range a timer accepts — beyond ~24 days `setTimeout` fires immediately,\n  // which would spin rather than wait.\n  if (elapsed < 0) {\n    return Math.min(-elapsed, MAX_TIMEOUT);\n  }\n\n  const minutes = Math.floor(elapsed / 60_000);\n  if (minutes < COMPACT_MINUTES) {\n    // The next whole minute: what is left of the current one.\n    return 60_000 - (elapsed % 60_000);\n  }\n  // Up to the hour count's own limit, so the last hour before a timestamp becomes a date still ticks.\n  if (minutes < COMPACT_HOURS * 60) {\n    return 3_600_000 - (elapsed % 3_600_000);\n  }\n\n  // A calendar date: it changes at midnight, and nothing here is watching for that — a date label is\n  // read as \"when\", not as a countdown, and a timer per row to catch a year boundary costs more than\n  // the staleness it prevents.\n  return undefined;\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef, forwardRef, useEffect, useId, useState } from 'react';\n\nimport { mx } from '@dxos/ui-theme';\nimport { type ThemedClassName } from '@dxos/ui-types';\n\nimport { recipes } from '../../recipes.ts';\nimport { type DateLike, compactInterval, formatCompact, toDate } from '../../util/format-time.ts';\nimport * as Tooltip from '../Tooltip/Tooltip.tsx';\n\nexport type TimestampProps = ThemedClassName<Omit<ComponentPropsWithoutRef<'time'>, 'children' | 'dateTime'>> & {\n  /** The instant shown, as an ISO string, a Unix timestamp in milliseconds, or a Date. */\n  date: DateLike;\n  /** The instant to measure against, so a story or test does not move with the wall clock; live otherwise. */\n  now?: Date;\n};\n\n/**\n * A `<time>` as compact as a column allows (`now`, `12m`, `90m`, `5h`, then `12 Sep`), with the full instant in a\n * Tooltip, since the compact form is lossy. It counts live, waking only when the text would change: a minute counter\n * once a minute, an hour counter once an hour, a calendar date never.\n */\nexport const Timestamp = forwardRef<HTMLTimeElement, TimestampProps>(\n  ({ classNames, date, now, id: idProp, ...props }, forwardedRef) => {\n    const generatedId = useId();\n    const id = idProp ?? generatedId;\n\n    // The tick only re-renders; the text is derived, so it cannot drift from what is shown.\n    const [, setTick] = useState(0);\n    const live = now === undefined;\n    useEffect(() => {\n      if (!live) {\n        return;\n      }\n\n      let timer: ReturnType<typeof setTimeout> | undefined;\n      const schedule = () => {\n        const interval = compactInterval(date);\n        if (interval === undefined) {\n          return;\n        }\n\n        // Rescheduled from the new value, since the cadence slows as the timestamp ages.\n        timer = setTimeout(() => {\n          setTick((tick) => tick + 1);\n          schedule();\n        }, interval);\n      };\n\n      schedule();\n      return () => clearTimeout(timer);\n    }, [date, live]);\n\n    const compact = formatCompact(date, { now });\n    if (!compact) {\n      return null;\n    }\n\n    // The reader's own locale and zone: they are asking when this happened to them.\n    const parsed = toDate(date);\n    const full = parsed.toLocaleString(undefined, { dateStyle: 'full', timeStyle: 'medium' });\n    return (\n      // The trigger's id locates the tooltip's anchor, since the `<time>`'s own `data-scope` wins the merge.\n      <Tooltip.Root ids={{ trigger: id }}>\n        <Tooltip.Trigger asChild>\n          <time\n            {...props}\n            id={id}\n            dateTime={parsed.toISOString()}\n            data-scope='timestamp'\n            data-part='root'\n            className={mx(recipes.timestamp(), classNames)}\n            ref={forwardedRef}\n          >\n            {compact}\n          </time>\n        </Tooltip.Trigger>\n        <Tooltip.Content>{full}</Tooltip.Content>\n      </Tooltip.Root>\n    );\n  },\n);\n\nTimestamp.displayName = 'Timestamp';\n\nexport * from '../../util/format-time.ts';\n","//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { ark } from '@ark-ui/react/factory';\nimport React, { type CSSProperties } from 'react';\n\nimport { recipes } from '../../recipes.ts';\nimport { composableProps, slottable } from '../../util/slots.ts';\nimport { type CSSVariables } from '../Container/Container.tsx';\n\ntype TypographyTone = 'default' | 'muted' | 'subtle';\n\ntype TypographyProps = {\n  /** One line, ending in an ellipsis when it overflows. */\n  truncate?: boolean;\n  /** At most this many lines, the last ending in an ellipsis. */\n  lines?: number;\n  /**\n   * Emphasis below the default (DESIGN.md \"Text emphasis\"): `description` for secondary content, `subdued` for\n   * interface text.\n   */\n  tone?: TypographyTone;\n  /** Monospace, for keys, ids and code. */\n  mono?: boolean;\n};\n\n/**\n * Text whose first line is centred in a block, so it lines up with a Block or control beside it however many lines\n * it wraps to. Renders a `<p>`; `asChild` puts the metrics on a heading or other text element instead.\n */\nconst Typography = slottable<HTMLParagraphElement, TypographyProps>(\n  ({ children, asChild, truncate, lines, tone, mono, ...props }, forwardedRef) => {\n    const { className, style, ...rest } = composableProps(props, { classNames: recipes.typography() });\n    const linesStyle: CSSProperties & CSSVariables = lines ? { '--dx-lines': String(lines) } : {};\n    return (\n      <ark.p\n        asChild={asChild}\n        {...rest}\n        data-scope='typography'\n        data-part='root'\n        data-truncate={truncate ? '' : undefined}\n        data-lines={lines ? '' : undefined}\n        data-tone={tone === 'default' ? undefined : tone}\n        data-mono={mono ? '' : undefined}\n        style={{ ...linesStyle, ...style }}\n        className={className}\n        ref={forwardedRef}\n      >\n        {children}\n      </ark.p>\n    );\n  },\n);\n\nTypography.displayName = 'Typography';\n\nexport { Typography as Text };\nexport type { TypographyProps as TextProps, TypographyTone as TextTone };\nexport { Link, type LinkProps, type LinkVariant } from '../Link/Link.tsx';\nexport { TextCrawl as Crawl, type TextCrawlProps as CrawlProps } from '../TextCrawl/TextCrawl.tsx';\nexport * from '../Timestamp/Timestamp.tsx';\n"],"mappings":";;;;;;;;;;;;;AAuBA,IAAa,OAAO,YACjB,EAAE,YAAY,UAAU,UAAU,SAAS,UAAU,MAAM,cAAc,GAAG,SAAS,iBACpF,oBAAC,IAAI,GAAL;CACE,GAAI;CACI;CACH;CACL,cAAW;CACX,aAAU;CACV,gBAAc;CACd,WAAW,GAAG,QAAQ,KAAK,GAAG,UAAU;CACxC,KAAK;AACN,CAAA,CAEL;AAEA,KAAK,cAAc;;;ACjBnB,IAAM,aAAuB,CAAC;;;;;;AAuB9B,IAAa,YAAY,YAErB,EACE,YACA,QAAQ,YACR,OAAO,WACP,QACA,aAAa,KACb,cAAc,OACd,SAAS,OACT,cAAc,KACd,OACA,GAAG,SAEL,iBACG;CACH,MAAM,CAAC,OAAO,YAAY,eAAgB,SAAS,KAAK,IAAI,GAAG,MAAM,SAAS,CAAC,IAAI,CAAE;CAIrF,MAAM,YAAY,OAAuB,IAAI;CAC7C,MAAM,cAAc,aAAa,UAAkB,UAAU,UAAU;EACrE,MAAM,SAAS,UAAU;EACzB,IAAI,QAAQ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