@alfadocs/ui-kit-debug 0.24.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{card-CWzuTLYE.js → card-C353dU-H.js} +21 -13
- package/dist/_chunks/{card-CWzuTLYE.js.map → card-C353dU-H.js.map} +1 -1
- package/dist/_chunks/carousel.agent-DnPiqijR.js +1733 -0
- package/dist/_chunks/carousel.agent-DnPiqijR.js.map +1 -0
- package/dist/_chunks/{contact-card-DTQUMetD.js → contact-card-CjG7c-1q.js} +2 -2
- package/dist/_chunks/{contact-card-DTQUMetD.js.map → contact-card-CjG7c-1q.js.map} +1 -1
- package/dist/_chunks/description-list-Bsga4IW8.js +309 -0
- package/dist/_chunks/description-list-Bsga4IW8.js.map +1 -0
- package/dist/_chunks/{locale-picker-CYBhgSHR.js → locale-picker-BxEUUPW7.js} +212 -149
- package/dist/_chunks/locale-picker-BxEUUPW7.js.map +1 -0
- package/dist/_chunks/{timeline-Czeqr3HF.js → timeline-jmd7lfDf.js} +19 -12
- package/dist/_chunks/{timeline-Czeqr3HF.js.map → timeline-jmd7lfDf.js.map} +1 -1
- package/dist/_chunks/{workflow-map-712GL-8u.js → workflow-map-BR6txfFX.js} +2 -2
- package/dist/_chunks/{workflow-map-712GL-8u.js.map → workflow-map-BR6txfFX.js.map} +1 -1
- package/dist/agent-catalog.json +1 -1
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/carousel.d.ts +21 -0
- package/dist/components/carousel/carousel.d.ts.map +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/description-list/description-list.d.ts +40 -0
- package/dist/components/description-list/description-list.d.ts.map +1 -1
- package/dist/components/description-list/index.d.ts +1 -1
- package/dist/components/description-list/index.d.ts.map +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/header-settings/index.js +140 -102
- package/dist/components/header-settings/index.js.map +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/timeline/timeline.d.ts.map +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/index.js +6 -6
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/carousel.agent-CQPFfppK.js +0 -1696
- package/dist/_chunks/carousel.agent-CQPFfppK.js.map +0 -1
- package/dist/_chunks/description-list-y7Hk51KI.js +0 -191
- package/dist/_chunks/description-list-y7Hk51KI.js.map +0 -1
- package/dist/_chunks/locale-picker-CYBhgSHR.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-picker-BxEUUPW7.js","sources":["../../src/i18n/locale-meta.ts","../../src/components/locale-picker/locale-picker.agent.ts","../../src/components/locale-picker/locale-picker.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Locale metadata registry. */\n/* */\n/* Single source of truth for human-facing locale information — native */\n/* name, English name, flag emoji, and writing direction. Consumed by */\n/* LocalePicker / HeaderSettings to render the language switcher. */\n/* */\n/* Keys must match `LOCALES_WITH_BUNDLES` from `./resources` 1:1; the */\n/* `locale-meta.test.ts` parity check fails the build if a code is */\n/* added to one and not the other. */\n/* */\n/* Flag emojis use the Regional Indicator pair convention — a few of */\n/* the codes are language tags rather than country tags (en, ar, hi); */\n/* the flag chosen is the \"default-region\" the kit ships marketing */\n/* surfaces in. Consumers that need a different region flag (e.g. */\n/* British vs. American English) can override via `LOCALE_META[code]`. */\n/* -------------------------------------------------------------------- */\n\nimport { LOCALES_WITH_BUNDLES } from './resources';\n\n/** Reading direction. Mirrors the shape of `hooks/use-locale.ts#LocaleDir`. */\nexport type LocaleDir = 'ltr' | 'rtl';\n\n/** IETF locale tag from the kit's bundled set. */\nexport type Locale = (typeof LOCALES_WITH_BUNDLES)[number];\n\nexport interface LocaleMetaEntry {\n /** IETF locale tag (matches the key in `LOCALES_WITH_BUNDLES`). */\n code: Locale;\n /** Endonym — the locale's name in its own language (\"Italiano\", \"العربية\"). */\n nativeName: string;\n /** Exonym — the locale's name in English (\"Italian\", \"Arabic\"). */\n englishName: string;\n /**\n * ISO 3166-1 alpha-2 country code for the default-region flag. Feed\n * to the kit's `<Flag country={…} />` component to render the actual\n * flag SVG (NOT the emoji glyph — those don't paint on Windows and\n * lose fidelity at hero sizes). A few language tags here aren't tied\n * to a single country (en, ar, hi); we pick the AlfaDocs default\n * marketing region — consumers needing a different region flag\n * override at the call site.\n */\n countryCode: string;\n /**\n * Regional-indicator flag emoji. Retained as a fallback for non-DOM\n * contexts (terminal logs, plain-text exports) and the rare consumer\n * surface that can't mount the kit's `Flag` component. UI surfaces\n * should always reach for `countryCode` + `<Flag />` instead.\n */\n flag: string;\n /** Reading direction. */\n dir: LocaleDir;\n}\n\n/**\n * Canonical metadata for every locale shipped in `LOCALES_WITH_BUNDLES`.\n * Order matches the bundled-locales array so iteration is stable.\n */\nexport const LOCALE_META: Record<Locale, LocaleMetaEntry> = {\n en: {\n code: 'en',\n nativeName: 'English',\n englishName: 'English',\n countryCode: 'GB',\n flag: '🇬🇧',\n dir: 'ltr',\n },\n it: {\n code: 'it',\n nativeName: 'Italiano',\n englishName: 'Italian',\n countryCode: 'IT',\n flag: '🇮🇹',\n dir: 'ltr',\n },\n de: {\n code: 'de',\n nativeName: 'Deutsch',\n englishName: 'German',\n countryCode: 'DE',\n flag: '🇩🇪',\n dir: 'ltr',\n },\n ar: {\n code: 'ar',\n nativeName: 'العربية',\n englishName: 'Arabic',\n countryCode: 'SA',\n flag: '🇸🇦',\n dir: 'rtl',\n },\n fr: {\n code: 'fr',\n nativeName: 'Français',\n englishName: 'French',\n countryCode: 'FR',\n flag: '🇫🇷',\n dir: 'ltr',\n },\n es: {\n code: 'es',\n nativeName: 'Español',\n englishName: 'Spanish',\n countryCode: 'ES',\n flag: '🇪🇸',\n dir: 'ltr',\n },\n pt: {\n code: 'pt',\n nativeName: 'Português',\n englishName: 'Portuguese',\n countryCode: 'PT',\n flag: '🇵🇹',\n dir: 'ltr',\n },\n nl: {\n code: 'nl',\n nativeName: 'Nederlands',\n englishName: 'Dutch',\n countryCode: 'NL',\n flag: '🇳🇱',\n dir: 'ltr',\n },\n ro: {\n code: 'ro',\n nativeName: 'Română',\n englishName: 'Romanian',\n countryCode: 'RO',\n flag: '🇷🇴',\n dir: 'ltr',\n },\n sq: {\n code: 'sq',\n nativeName: 'Shqip',\n englishName: 'Albanian',\n countryCode: 'AL',\n flag: '🇦🇱',\n dir: 'ltr',\n },\n tr: {\n code: 'tr',\n nativeName: 'Türkçe',\n englishName: 'Turkish',\n countryCode: 'TR',\n flag: '🇹🇷',\n dir: 'ltr',\n },\n pl: {\n code: 'pl',\n nativeName: 'Polski',\n englishName: 'Polish',\n countryCode: 'PL',\n flag: '🇵🇱',\n dir: 'ltr',\n },\n sv: {\n code: 'sv',\n nativeName: 'Svenska',\n englishName: 'Swedish',\n countryCode: 'SE',\n flag: '🇸🇪',\n dir: 'ltr',\n },\n ru: {\n code: 'ru',\n nativeName: 'Русский',\n englishName: 'Russian',\n countryCode: 'RU',\n flag: '🇷🇺',\n dir: 'ltr',\n },\n el: {\n code: 'el',\n nativeName: 'Ελληνικά',\n englishName: 'Greek',\n countryCode: 'GR',\n flag: '🇬🇷',\n dir: 'ltr',\n },\n ja: {\n code: 'ja',\n nativeName: '日本語',\n englishName: 'Japanese',\n countryCode: 'JP',\n flag: '🇯🇵',\n dir: 'ltr',\n },\n zh: {\n code: 'zh',\n nativeName: '中文',\n englishName: 'Chinese',\n countryCode: 'CN',\n flag: '🇨🇳',\n dir: 'ltr',\n },\n hi: {\n code: 'hi',\n nativeName: 'हिन्दी',\n englishName: 'Hindi',\n countryCode: 'IN',\n flag: '🇮🇳',\n dir: 'ltr',\n },\n};\n\n/**\n * Ordered list of locale metadata entries, derived directly from\n * `LOCALES_WITH_BUNDLES`. Use this for rendering pickers / menus — it\n * preserves the canonical kit ordering (canonical Italian first after\n * English source, then the supported set).\n */\nexport const LOCALE_LIST: readonly LocaleMetaEntry[] = LOCALES_WITH_BUNDLES.map(\n (code) => LOCALE_META[code],\n);\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — LocalePicker. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { LocalePickerHandle } from './locale-picker';\n\nexport const localePickerAgent: AgentAdapter<LocalePickerHandle> = {\n id: 'locale-picker',\n capabilities: ['view_change'],\n state: {},\n actions: {\n set_locale: {\n safety: 'write',\n argsType: '{ locale: string }',\n descriptionKey: 'ui.agent.localePicker.actions.setLocale',\n description: 'Switch the active locale to the given IETF tag.',\n invoke: (handle, args: { locale: string }) => {\n // The handle's own implementation gates against\n // `LOCALES_WITH_BUNDLES`, so a tag the kit doesn't ship is a\n // no-op rather than a runtime crash.\n handle.setLocale(args.locale);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'locale-picker',\n description: 'Marks the LocalePicker wrapper.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type Ref,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Check, Globe } from 'lucide-react';\nimport { Command, defaultFilter } from 'cmdk';\nimport { IconButton } from '../button/icon-button';\nimport { Popover } from '../popover/popover';\nimport { Flag, hasFlag } from '../flag/flag';\nimport {\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT,\n INPUT_SURFACE_PADDING_X,\n} from '../_shared/input-surface';\nimport { LOCALE_LIST, LOCALE_META, type Locale } from '../../i18n/locale-meta';\nimport { LOCALES_WITH_BUNDLES } from '../../i18n/config';\nimport { useLocale } from '../../hooks/use-locale';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { localePickerAgent } from './locale-picker.agent';\n\n/* ------------------------------------------------------------------ */\n/* Persistence + browser-locale detection */\n/* */\n/* The first mount of a LocalePicker after a fresh page load runs a */\n/* one-shot detection: if no locale has ever been persisted, read */\n/* navigator.language, normalise to the base tag (`it-IT` → `it`), */\n/* and adopt it if the kit ships a matching bundle. Fall back to */\n/* `en` if not. Result is persisted so a subsequent page load */\n/* respects the user choice without re-detecting. */\n/* */\n/* Module-level flag — the detection must fire once per app */\n/* lifecycle, not once per LocalePicker instance, since HeaderSettings */\n/* + a standalone picker can both be mounted simultaneously. */\n/* ------------------------------------------------------------------ */\n\nexport const LOCALE_STORAGE_KEY = 'alfadocs-ui.locale';\n\nlet detectionFired = false;\n\nfunction isSupportedLocale(value: unknown): value is Locale {\n return (\n typeof value === 'string' &&\n (LOCALES_WITH_BUNDLES as readonly string[]).includes(value)\n );\n}\n\nfunction safeReadStorage(key: string): string | null {\n if (typeof window === 'undefined') return null;\n try {\n return window.localStorage.getItem(key);\n } catch {\n return null;\n }\n}\n\nfunction safeWriteStorage(key: string, value: string): void {\n if (typeof window === 'undefined') return;\n try {\n window.localStorage.setItem(key, value);\n } catch {\n /* Storage can throw in private mode / when quota is exceeded — the\n in-memory state is the source of truth. Same silent-fail shape\n as use-theme.ts. */\n }\n}\n\nfunction detectBrowserLocale(): Locale {\n if (typeof navigator === 'undefined') return 'en';\n const raw = navigator.language;\n if (!raw) return 'en';\n const base = raw.toLowerCase().split('-')[0];\n return isSupportedLocale(base) ? base : 'en';\n}\n\nfunction applyDocumentAttrs(locale: Locale): void {\n if (typeof document === 'undefined') return;\n const root = document.documentElement;\n root.lang = locale;\n root.dir = LOCALE_META[locale].dir;\n}\n\n/* ------------------------------------------------------------------ */\n/* Shared state hook */\n/* */\n/* Centralises the setLocale wrapper so both the standalone picker */\n/* and the inline `LocalePicker.SearchList` share one source of truth: */\n/* 1. delegate to `useLocale().setLocale` (the i18next change) */\n/* 2. set `document.documentElement.dir` + `lang` */\n/* 3. persist to localStorage at `alfadocs-ui.locale` */\n/* ------------------------------------------------------------------ */\n\ninterface LocalePickerState {\n locale: Locale;\n setLocale: (next: Locale) => void;\n}\n\nfunction useLocalePickerState(): LocalePickerState {\n const { locale: rawLocale, setLocale: setLocaleI18n } = useLocale();\n\n // Coerce the i18next-reported locale to the supported set so consumers\n // never see an un-bundled tag (e.g. when the host app pre-loads\n // `en-US` before the kit's resources land).\n const locale: Locale = isSupportedLocale(rawLocale) ? rawLocale : 'en';\n\n const setLocale = useCallback(\n (next: Locale) => {\n if (!isSupportedLocale(next)) return;\n void setLocaleI18n(next);\n applyDocumentAttrs(next);\n safeWriteStorage(LOCALE_STORAGE_KEY, next);\n },\n [setLocaleI18n],\n );\n\n // One-shot detection on first LocalePicker mount per app lifecycle.\n useEffect(() => {\n if (detectionFired) return;\n detectionFired = true;\n const stored = safeReadStorage(LOCALE_STORAGE_KEY);\n if (isSupportedLocale(stored)) {\n // User-chosen value persists — keep i18next + document in sync.\n if (stored !== rawLocale) void setLocaleI18n(stored);\n applyDocumentAttrs(stored);\n return;\n }\n const detected = detectBrowserLocale();\n void setLocaleI18n(detected);\n applyDocumentAttrs(detected);\n safeWriteStorage(LOCALE_STORAGE_KEY, detected);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- intentional one-shot detection\n }, []);\n\n return { locale, setLocale };\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst wrapperVariants = cva('ds:inline-flex ds:items-center', {\n variants: {\n variant: {\n icon: '',\n compact: '',\n },\n },\n defaultVariants: { variant: 'icon' },\n});\n\nconst compactTriggerClasses = [\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-sm)]',\n 'ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]',\n 'ds:bg-transparent ds:text-foreground',\n 'ds:hover:bg-muted',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:disabled:opacity-50 ds:disabled:cursor-not-allowed',\n 'type-body-sm',\n].join(' ');\n\nconst popoverContentClasses = [\n 'ds:w-[18rem] ds:rounded-[var(--radius-md)]',\n 'ds:bg-background ds:text-foreground ds:border ds:border-border',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:overflow-hidden',\n].join(' ');\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type LocalePickerVariant = 'icon' | 'compact';\n\nexport interface LocalePickerProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>,\n VariantProps<typeof wrapperVariants> {\n variant?: LocalePickerVariant;\n /**\n * Controlled escape hatch — when omitted the picker reads/writes\n * `useLocale()` directly so a bare `<LocalePicker />` works with no\n * wiring. Pass both to opt into controlled mode.\n */\n value?: Locale;\n onValueChange?: (next: Locale) => void;\n /** Disable interaction (greys out the trigger). */\n disabled?: boolean;\n /** Mark as busy (kept open / focusable but read-only). */\n loading?: boolean;\n}\n\n/**\n * Curated imperative handle for agent / external automation. The\n * `setLocale` parameter is widened to `string` (rather than the\n * narrower `Locale`) so untyped agent inputs don't have to thread the\n * `LOCALES_WITH_BUNDLES` constraint at the call site — the\n * implementation validates internally and no-ops on an unsupported\n * tag.\n */\nexport interface LocalePickerHandle {\n setLocale: (next: string) => void;\n}\n\n/* ------------------------------------------------------------------ */\n/* LocalePicker.SearchList — the inline searchable list */\n/* */\n/* HeaderSettings renders this directly inside its DropdownMenu so the */\n/* same UX is reused without nesting another popover. Standalone the */\n/* root component renders this same widget inside a Popover. */\n/* ------------------------------------------------------------------ */\n\nexport interface LocalePickerSearchListProps {\n /** Active locale. Defaults to the shared store. */\n value?: Locale;\n /**\n * Fires after a successful selection. Defaults to the shared setter\n * (delegates to useLocale, persists, updates document.dir/lang).\n */\n onValueChange?: (next: Locale) => void;\n /** Optional id for the search input (axe `aria-labelledby` chain). */\n inputId?: string;\n /** Disable the input + list interactions. */\n disabled?: boolean;\n /** Mark as busy (read-only). */\n loading?: boolean;\n className?: string;\n}\n\nconst searchListVariants = cva('ds:flex ds:flex-col', {\n variants: {\n loading: {\n true: 'ds:opacity-60 ds:pointer-events-none',\n false: '',\n },\n },\n defaultVariants: { loading: false },\n});\n\nexport const LocalePickerSearchList = forwardRef<\n HTMLDivElement,\n LocalePickerSearchListProps\n>(\n (\n {\n value: valueProp,\n onValueChange,\n inputId: inputIdProp,\n disabled = false,\n loading = false,\n className,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const store = useLocalePickerState();\n const value = valueProp ?? store.locale;\n const generatedId = useId();\n const inputId = inputIdProp ?? `${generatedId}-search`;\n const [search, setSearch] = useState('');\n\n const handleSelect = useCallback(\n (code: string) => {\n if (!isSupportedLocale(code) || disabled || loading) return;\n if (onValueChange) {\n onValueChange(code);\n } else {\n store.setLocale(code);\n }\n },\n [disabled, loading, onValueChange, store],\n );\n\n return (\n <div\n ref={ref}\n className={[searchListVariants({ loading }), className]\n .filter(Boolean)\n .join(' ')}\n data-component=\"locale-picker-search-list\"\n >\n <Command\n label={t('navigation.localePicker.commandLabel')}\n // Defer to cmdk's defaultFilter — it ranks against both the\n // Item's `value` (the locale code) and `keywords` (the\n // native + English names), which is exactly the haystack we\n // want users to be able to match against. The Item's `value`\n // alone wouldn't surface \"jap\" → 日本語 because the code is\n // `ja`; the keyword \"Japanese\" handles that match.\n filter={defaultFilter}\n shouldFilter\n >\n {/* Input chrome borrows the kit's standard INPUT_SURFACE\n tokens (same as Combobox / Autocomplete) so the search\n field reads as a first-class kit input rather than a\n one-off list header. The wrapper carries the border /\n padding / focus-within ring; the inner Command.Input\n keeps its outline-less peer styling. */}\n <div\n className={[\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT.sm,\n INPUT_SURFACE_PADDING_X.sm,\n 'ds:flex ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:m-[var(--spacing-xs)]',\n ].join(' ')}\n >\n <Globe\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-muted-foreground ds:shrink-0\"\n />\n <Command.Input\n id={inputId}\n value={search}\n onValueChange={setSearch}\n placeholder={t('navigation.localePicker.searchPlaceholder')}\n aria-label={t('navigation.localePicker.searchLabel')}\n disabled={disabled || loading}\n className={[\n 'ds:peer ds:flex-1 ds:bg-transparent ds:border-0 ds:outline-none',\n 'ds:placeholder:text-muted-foreground ds:text-foreground',\n 'ds:text-[length:var(--font-size-sm)]',\n ].join(' ')}\n />\n </div>\n <Command.List\n className={[\n 'ds:max-h-[18rem] ds:overflow-y-auto',\n 'ds:p-[var(--spacing-xs)]',\n ].join(' ')}\n >\n <Command.Empty\n className={[\n 'ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]',\n 'type-body-sm ds:text-muted-foreground',\n ].join(' ')}\n >\n {t('navigation.localePicker.empty')}\n </Command.Empty>\n {LOCALE_LIST.map((entry) => {\n const isSelected = entry.code === value;\n return (\n <Command.Item\n key={entry.code}\n value={entry.code}\n keywords={[entry.nativeName, entry.englishName]}\n disabled={disabled || loading}\n onSelect={handleSelect}\n className={[\n 'ds:relative ds:flex ds:cursor-pointer ds:select-none',\n 'ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:text-foreground ds:outline-none',\n 'ds:data-[highlighted]:bg-muted',\n 'ds:aria-selected:bg-muted',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed',\n ].join(' ')}\n aria-selected={isSelected || undefined}\n data-current={isSelected ? 'true' : undefined}\n // `lang` + `dir` on the row makes the native-name\n // glyphs paint with the correct script + direction\n // (essential for Arabic / Japanese / Chinese rows).\n lang={entry.code}\n dir={entry.dir}\n >\n {hasFlag(entry.countryCode) ? (\n <Flag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className=\"ds:shrink-0\"\n />\n ) : (\n /* hasFlag fallback: render the emoji glyph only\n when the kit doesn't ship an SVG for this\n country code. All 18 bundled locales currently\n have SVG flags, so this is dead code on the\n canonical set — kept for resilience when\n consumers extend the registry. */\n <span\n aria-hidden=\"true\"\n className=\"ds:text-base ds:shrink-0\"\n >\n {entry.flag}\n </span>\n )}\n <span className=\"ds:flex-1 ds:min-w-0 ds:truncate type-body-sm\">\n {entry.nativeName}\n </span>\n {isSelected ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-primary ds:shrink-0\"\n />\n ) : null}\n {isSelected ? (\n <span className=\"ds:sr-only\">\n {t('navigation.localePicker.currentSelection')}\n </span>\n ) : null}\n </Command.Item>\n );\n })}\n </Command.List>\n </Command>\n </div>\n );\n },\n);\nLocalePickerSearchList.displayName = 'LocalePicker.SearchList';\n\n/* ------------------------------------------------------------------ */\n/* LocalePicker root — icon + compact trigger variants */\n/* ------------------------------------------------------------------ */\n\ninterface VariantRenderProps {\n state: LocalePickerState;\n rest: HTMLAttributes<HTMLDivElement>;\n forwardedRef: Ref<HTMLDivElement>;\n className?: string;\n disabled: boolean;\n loading: boolean;\n}\n\nfunction IconTrigger({\n state,\n rest,\n forwardedRef,\n className,\n disabled,\n loading,\n}: VariantRenderProps) {\n const { t } = useTranslation();\n const entry = LOCALE_META[state.locale];\n return (\n <div\n ref={forwardedRef}\n data-component=\"locale-picker\"\n data-component-id={rest.id}\n className={wrapperVariants({ variant: 'icon', className })}\n {...rest}\n >\n <Popover.Root>\n <Popover.Trigger asChild>\n <IconButton\n disabled={disabled || loading}\n icon={\n <span className=\"ds:relative ds:inline-flex ds:items-center ds:justify-center\">\n <Globe aria-hidden className=\"ds:size-5\" />\n {hasFlag(entry.countryCode) ? (\n <Flag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className={[\n // Corner chip overlaying the globe glyph.\n // `outline` paints a thin background-coloured\n // ring around the flag so it reads as a chip\n // rather than blending into the globe edge.\n 'ds:absolute ds:bottom-[-3px] ds:end-[-5px]',\n 'ds:outline ds:outline-2 ds:outline-background',\n // Scale down to chip size — Flag's sm tile is\n // larger than the original emoji glyph.\n 'ds:scale-75 ds:origin-bottom-end',\n ].join(' ')}\n />\n ) : null}\n </span>\n }\n aria-label={t('navigation.localePicker.trigger', {\n locale: entry.nativeName,\n })}\n />\n </Popover.Trigger>\n <Popover.Content\n align=\"end\"\n sideOffset={8}\n className={popoverContentClasses}\n aria-label={t('navigation.localePicker.popupLabel')}\n >\n <LocalePickerSearchList\n value={state.locale}\n onValueChange={state.setLocale}\n disabled={disabled}\n loading={loading}\n />\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n}\n\nfunction CompactTrigger({\n state,\n rest,\n forwardedRef,\n className,\n disabled,\n loading,\n}: VariantRenderProps) {\n const { t } = useTranslation();\n const entry = LOCALE_META[state.locale];\n return (\n <div\n ref={forwardedRef}\n data-component=\"locale-picker\"\n data-component-id={rest.id}\n className={wrapperVariants({ variant: 'compact', className })}\n {...rest}\n >\n <Popover.Root>\n <Popover.Trigger asChild>\n <button\n type=\"button\"\n disabled={disabled || loading}\n className={compactTriggerClasses}\n aria-label={t('navigation.localePicker.trigger', {\n locale: entry.nativeName,\n })}\n >\n {hasFlag(entry.countryCode) ? (\n <Flag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className=\"ds:shrink-0\"\n />\n ) : (\n <Globe aria-hidden className=\"ds:size-4 ds:shrink-0\" />\n )}\n <span\n className=\"ds:flex-1 ds:truncate type-body-sm\"\n lang={entry.code}\n >\n {entry.nativeName}\n </span>\n </button>\n </Popover.Trigger>\n <Popover.Content\n align=\"end\"\n sideOffset={8}\n className={popoverContentClasses}\n aria-label={t('navigation.localePicker.popupLabel')}\n >\n <LocalePickerSearchList\n value={state.locale}\n onValueChange={state.setLocale}\n disabled={disabled}\n loading={loading}\n />\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n}\n\nconst LocalePickerRoot = forwardRef<HTMLDivElement, LocalePickerProps>(\n (props, ref) => {\n const {\n variant = 'icon',\n value,\n onValueChange,\n disabled = false,\n loading = false,\n className,\n id,\n ...rest\n } = props as LocalePickerProps & { id?: string };\n\n const store = useLocalePickerState();\n const resolvedLocale = value ?? store.locale;\n\n // Controlled overlay: when a consumer passes `onValueChange`, route\n // selections to them instead of the shared store. Document attrs +\n // localStorage are still updated so the picker behaves consistently\n // either way.\n const setLocale = useCallback(\n (next: Locale) => {\n if (!isSupportedLocale(next)) return;\n if (onValueChange) {\n onValueChange(next);\n applyDocumentAttrs(next);\n safeWriteStorage(LOCALE_STORAGE_KEY, next);\n return;\n }\n store.setLocale(next);\n },\n [onValueChange, store],\n );\n\n const state: LocalePickerState = useMemo(\n () => ({ locale: resolvedLocale, setLocale }),\n [resolvedLocale, setLocale],\n );\n\n const forwardedRef = useRef<HTMLDivElement | null>(null);\n useImperativeHandle(ref, () => forwardedRef.current as HTMLDivElement, []);\n\n const stateRef = useRef(state);\n stateRef.current = state;\n const agentHandle = useMemo<LocalePickerHandle>(\n () => ({\n setLocale: (next: string) => {\n if (isSupportedLocale(next)) {\n stateRef.current.setLocale(next);\n }\n },\n }),\n [],\n );\n useAgentRegistration(localePickerAgent, agentHandle, id);\n\n if (variant === 'compact') {\n return (\n <CompactTrigger\n state={state}\n rest={rest}\n forwardedRef={forwardedRef}\n className={className}\n disabled={disabled}\n loading={loading}\n />\n );\n }\n return (\n <IconTrigger\n state={state}\n rest={rest}\n forwardedRef={forwardedRef}\n className={className}\n disabled={disabled}\n loading={loading}\n />\n );\n },\n);\nLocalePickerRoot.displayName = 'LocalePicker';\n\nexport const LocalePicker = Object.assign(LocalePickerRoot, {\n SearchList: LocalePickerSearchList,\n});\n"],"names":["LOCALE_META","LOCALE_LIST","LOCALES_WITH_BUNDLES","code","localePickerAgent","handle","args","LOCALE_STORAGE_KEY","detectionFired","isSupportedLocale","value","safeReadStorage","key","safeWriteStorage","detectBrowserLocale","raw","base","applyDocumentAttrs","locale","root","useLocalePickerState","rawLocale","setLocaleI18n","useLocale","setLocale","useCallback","next","useEffect","stored","detected","wrapperVariants","cva","compactTriggerClasses","popoverContentClasses","searchListVariants","LocalePickerSearchList","forwardRef","valueProp","onValueChange","inputIdProp","disabled","loading","className","ref","t","useTranslation","store","generatedId","useId","inputId","search","setSearch","useState","handleSelect","jsx","jsxs","Command","defaultFilter","INPUT_SURFACE_CHROME","INPUT_SURFACE_HEIGHT","INPUT_SURFACE_PADDING_X","Globe","entry","isSelected","hasFlag","Flag","Check","IconTrigger","state","rest","forwardedRef","Popover","IconButton","CompactTrigger","LocalePickerRoot","props","variant","id","resolvedLocale","useMemo","useRef","useImperativeHandle","stateRef","agentHandle","useAgentRegistration","LocalePicker"],"mappings":";;;;;;;;;;;;;;AA0DO,MAAMA,IAA+C;AAAA,EAC1D,IAAI;AAAA,IACF,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,IACN,KAAK;AAAA,EAAA;AAAA,EAEP,IAAI;AAAA,IACF,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,IACN,KAAK;AAAA,EAAA;AAAA,EAEP,IAAI;AAAA,IACF,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,IACN,KAAK;AAAA,EAAA;AAAA,EAEP,IAAI;AAAA,IACF,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,IACN,KAAK;AAAA,EAAA;AAAA,EAEP,IAAI;AAAA,IACF,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,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;AAAA,EAC1D,YAAYvC;AACd,CAAC;"}
|
|
@@ -3,7 +3,7 @@ import { forwardRef as m, useMemo as p, useRef as w, useState as V, useCallback
|
|
|
3
3
|
import { c as b } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as A } from "react-i18next";
|
|
5
5
|
import { A as P } from "./avatar-BpFohgWG.js";
|
|
6
|
-
import { C as N } from "./card-
|
|
6
|
+
import { C as N } from "./card-C353dU-H.js";
|
|
7
7
|
import { T as B } from "./timestamp-BV2lC-wV.js";
|
|
8
8
|
import { u as H } from "./registry-C9nwlNyL.js";
|
|
9
9
|
import { C as q } from "./circle-BkqTgYmt.js";
|
|
@@ -156,7 +156,7 @@ const K = {
|
|
|
156
156
|
}
|
|
157
157
|
);
|
|
158
158
|
E.displayName = "Timeline";
|
|
159
|
-
const
|
|
159
|
+
const k = m(
|
|
160
160
|
({ type: t = "neutral", eventId: r, className: s, children: i, ...n }, a) => {
|
|
161
161
|
const { layout: d } = v(u), { t: o } = A(), l = p(() => ({ type: t }), [t]);
|
|
162
162
|
return d === "alternating" ? /* @__PURE__ */ e(g.Provider, { value: l, children: /* @__PURE__ */ c(
|
|
@@ -186,8 +186,8 @@ const S = m(
|
|
|
186
186
|
) });
|
|
187
187
|
}
|
|
188
188
|
);
|
|
189
|
-
|
|
190
|
-
const
|
|
189
|
+
k.displayName = "Timeline.Event";
|
|
190
|
+
const S = m(
|
|
191
191
|
({ icon: t, className: r, ...s }, i) => {
|
|
192
192
|
const { type: n } = v(g), { layout: a } = v(u), d = /* @__PURE__ */ e(
|
|
193
193
|
"div",
|
|
@@ -213,8 +213,8 @@ const _ = m(
|
|
|
213
213
|
) : d;
|
|
214
214
|
}
|
|
215
215
|
);
|
|
216
|
-
|
|
217
|
-
const
|
|
216
|
+
S.displayName = "Timeline.Dot";
|
|
217
|
+
const _ = m(
|
|
218
218
|
({ title: t, description: r, actor: s, children: i, className: n, ...a }, d) => {
|
|
219
219
|
const { layout: o } = v(u), l = /* @__PURE__ */ e(
|
|
220
220
|
"div",
|
|
@@ -222,7 +222,14 @@ const k = m(
|
|
|
222
222
|
ref: d,
|
|
223
223
|
className: [
|
|
224
224
|
"ds:flex-1 ds:min-w-0 ds:pb-[var(--spacing-md)]",
|
|
225
|
-
|
|
225
|
+
// Wrap policy: `break-word` (not `anywhere`) preserves word-
|
|
226
|
+
// boundary wrapping for natural-language titles / descriptions;
|
|
227
|
+
// only genuinely unbreakable strings (URLs, hashes) break mid-
|
|
228
|
+
// word when they would otherwise overflow. `anywhere` introduces
|
|
229
|
+
// a soft-wrap opportunity at every character boundary, which
|
|
230
|
+
// chopped Italian / German labels mid-word when an event card
|
|
231
|
+
// sat in a narrow context.
|
|
232
|
+
"ds:[&_*]:break-normal ds:[&_*]:[overflow-wrap:break-word]",
|
|
226
233
|
n
|
|
227
234
|
].filter(Boolean).join(" "),
|
|
228
235
|
...a,
|
|
@@ -240,7 +247,7 @@ const k = m(
|
|
|
240
247
|
return o === "alternating" ? /* @__PURE__ */ e("div", { className: "ds:col-span-1 ds:[li:nth-child(even)_&]:col-start-3 ds:[li:nth-child(odd)_&]:col-start-1", children: l }) : l;
|
|
241
248
|
}
|
|
242
249
|
);
|
|
243
|
-
|
|
250
|
+
_.displayName = "Timeline.Content";
|
|
244
251
|
const G = 1440 * 60 * 1e3, j = m(
|
|
245
252
|
({
|
|
246
253
|
date: t,
|
|
@@ -267,13 +274,13 @@ const G = 1440 * 60 * 1e3, j = m(
|
|
|
267
274
|
);
|
|
268
275
|
j.displayName = "Timeline.Timestamp";
|
|
269
276
|
const le = Object.assign(E, {
|
|
270
|
-
Event:
|
|
271
|
-
Dot:
|
|
272
|
-
Content:
|
|
277
|
+
Event: k,
|
|
278
|
+
Dot: S,
|
|
279
|
+
Content: _,
|
|
273
280
|
Timestamp: j
|
|
274
281
|
});
|
|
275
282
|
export {
|
|
276
283
|
le as T,
|
|
277
284
|
K as t
|
|
278
285
|
};
|
|
279
|
-
//# sourceMappingURL=timeline-
|
|
286
|
+
//# sourceMappingURL=timeline-jmd7lfDf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-Czeqr3HF.js","sources":["../../src/components/timeline/timeline.agent.ts","../../src/components/timeline/timeline.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — Timeline. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { TimelineHandle } from './timeline';\n\nexport const timelineAgent: AgentAdapter<TimelineHandle> = {\n id: 'timeline',\n capabilities: ['pick', 'range_navigate'],\n state: {\n selectedEvent: {\n type: 'string | null',\n descriptionKey: 'ui.agent.timeline.state.selectedEvent',\n description: 'Opaque event id of the currently-active event, or null.',\n read: (handle) => handle.getSelectedEvent(),\n },\n },\n actions: {\n select_event: {\n safety: 'read',\n argsType: '{ id: string }',\n descriptionKey: 'ui.agent.timeline.actions.selectEvent',\n description: 'Scroll the given event into view and mark it as selected.',\n invoke: (handle, args: { id: string }) => {\n handle.selectEvent(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'timeline',\n description: 'Marks the Timeline root.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-event-id',\n description:\n 'Opaque event id emitted on each Timeline.Event when the `eventId` prop is provided.',\n },\n },\n};\n","import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type LiHTMLAttributes,\n type OlHTMLAttributes,\n type ReactNode,\n type TimeHTMLAttributes,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { AlertTriangle, Check, Circle, Info, X } from 'lucide-react';\nimport { Avatar } from '../avatar';\nimport { Card } from '../card';\nimport { Timestamp } from '../timestamp';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { timelineAgent } from './timeline.agent';\n\n// TODO: optional @tanstack/react-virtual integration for 500+ events\n\n/* ------------------------------------------------------------------ */\n/* Context */\n/* ------------------------------------------------------------------ */\n\ntype EventType = 'info' | 'success' | 'warning' | 'error' | 'neutral';\ntype Layout = 'rail-start' | 'rail-end' | 'alternating';\n\ninterface TimelineContextValue {\n layout: Layout;\n order: 'newest-first' | 'oldest-first';\n}\n\nconst TimelineContext = createContext<TimelineContextValue>({\n layout: 'rail-start',\n order: 'newest-first',\n});\n\ninterface TimelineEventContextValue {\n type: EventType;\n}\n\nconst TimelineEventContext = createContext<TimelineEventContextValue>({\n type: 'neutral',\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — root */\n/* ------------------------------------------------------------------ */\n\nconst timelineVariants = cva('ds:flex ds:flex-col', {\n variants: {\n layout: {\n 'rail-start': 'ds:ps-4',\n 'rail-end': 'ds:pe-4',\n alternating:\n 'ds:grid ds:grid-cols-[1fr_2rem_1fr] ds:gap-x-[var(--spacing-md)]',\n },\n order: {\n 'newest-first': 'ds:flex-col',\n 'oldest-first': 'ds:flex-col-reverse',\n },\n },\n defaultVariants: { layout: 'rail-start', order: 'newest-first' },\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — event item */\n/* ------------------------------------------------------------------ */\n\nconst eventVariants = cva(\n 'ds:relative ds:flex ds:gap-[var(--spacing-md)] ds:pb-[var(--spacing-md)]',\n {\n variants: {\n layout: {\n 'rail-start': [\n 'ds:flex-row',\n // Rail: continuous border on the inline-start of the event list\n 'ds:before:absolute ds:before:top-8 ds:before:bottom-0',\n 'ds:before:border-inline-start-[2px] ds:before:border-[color:var(--border)]',\n 'ds:before:inset-inline-start-[-1rem]',\n 'ds:last:before:hidden',\n ].join(' '),\n 'rail-end': [\n 'ds:flex-row-reverse',\n 'ds:before:absolute ds:before:top-8 ds:before:bottom-0',\n 'ds:before:border-inline-end-[2px] ds:before:border-[color:var(--border)]',\n 'ds:before:inset-inline-end-[-1rem]',\n 'ds:last:before:hidden',\n ].join(' '),\n alternating: 'ds:contents',\n },\n },\n defaultVariants: { layout: 'rail-start' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* CVA — dot */\n/* ------------------------------------------------------------------ */\n\nconst dotVariants = cva(\n [\n 'ds:relative ds:z-10 ds:flex ds:items-center ds:justify-center',\n 'ds:rounded-[var(--radius-full)] ds:shrink-0',\n 'ds:size-8',\n 'ds:ring-2 ds:ring-[var(--background)]',\n ].join(' '),\n {\n variants: {\n type: {\n info: 'ds:bg-[var(--info)] ds:text-[var(--info-solid-foreground)]',\n success:\n 'ds:bg-[var(--success)] ds:text-[var(--success-solid-foreground)]',\n warning:\n 'ds:bg-[var(--warning)] ds:text-[var(--warning-solid-foreground)]',\n error:\n 'ds:bg-[var(--destructive)] ds:text-[var(--destructive-foreground)]',\n neutral: 'ds:bg-[var(--muted)] ds:text-[var(--muted-foreground)]',\n },\n },\n defaultVariants: { type: 'neutral' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport interface TimelineProps\n extends\n Omit<OlHTMLAttributes<HTMLOListElement>, 'color'>,\n VariantProps<typeof timelineVariants> {\n layout?: Layout;\n order?: 'newest-first' | 'oldest-first';\n children: ReactNode;\n className?: string;\n}\n\nexport interface TimelineEventProps extends LiHTMLAttributes<HTMLLIElement> {\n type?: EventType;\n /** Opaque event id — when set, the component emits `data-event-id` for agent addressing. */\n eventId?: string;\n children: ReactNode;\n className?: string;\n}\n\n/** Curated imperative handle for agent / external automation. */\nexport interface TimelineHandle {\n getSelectedEvent: () => string | null;\n selectEvent: (id: string) => void;\n}\n\nexport interface TimelineDotProps extends HTMLAttributes<HTMLDivElement> {\n icon?: ReactNode;\n className?: string;\n}\n\nexport interface TimelineContentProps extends HTMLAttributes<HTMLDivElement> {\n title: string;\n description?: string;\n actor?: { name: string; src?: string };\n children?: ReactNode;\n className?: string;\n}\n\nexport interface TimelineTimestampProps extends TimeHTMLAttributes<HTMLTimeElement> {\n date: Date | string;\n relative?: boolean;\n format?: Intl.DateTimeFormatOptions;\n className?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Default icons per type */\n/* ------------------------------------------------------------------ */\n\nconst TYPE_ICONS: Record<EventType, ReactNode> = {\n info: <Info size={16} aria-hidden=\"true\" />,\n success: <Check size={16} aria-hidden=\"true\" />,\n warning: <AlertTriangle size={16} aria-hidden=\"true\" />,\n error: <X size={16} aria-hidden=\"true\" />,\n neutral: <Circle size={16} aria-hidden=\"true\" />,\n};\n\n/* ------------------------------------------------------------------ */\n/* Timeline root */\n/* ------------------------------------------------------------------ */\n\nconst TimelineRoot = forwardRef<HTMLOListElement, TimelineProps>(\n (\n {\n layout = 'rail-start',\n order = 'newest-first',\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const ctx = useMemo(() => ({ layout, order }), [layout, order]);\n const olRef = useRef<HTMLOListElement | null>(null);\n const [selectedEvent, setSelectedEvent] = useState<string | null>(null);\n const latestRef = useRef<string | null>(null);\n latestRef.current = selectedEvent;\n\n const selectEvent = useCallback((id: string) => {\n setSelectedEvent(id);\n const target = olRef.current?.querySelector(\n `[data-event-id=\"${id}\"]`,\n ) as HTMLElement | null;\n target?.scrollIntoView({ block: 'center', behavior: 'auto' });\n }, []);\n\n const agentHandle = useMemo<TimelineHandle>(\n () => ({\n getSelectedEvent: () => latestRef.current,\n selectEvent,\n }),\n [selectEvent],\n );\n useImperativeHandle(ref, () => olRef.current as HTMLOListElement, []);\n useAgentRegistration(timelineAgent, agentHandle, props.id);\n\n return (\n <TimelineContext.Provider value={ctx}>\n <ol\n ref={olRef}\n data-component=\"timeline\"\n data-component-id={props.id}\n data-selected-event={selectedEvent ?? undefined}\n className={timelineVariants({ layout, order, className })}\n {...props}\n >\n {children}\n </ol>\n </TimelineContext.Provider>\n );\n },\n);\nTimelineRoot.displayName = 'Timeline';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Event */\n/* ------------------------------------------------------------------ */\n\nconst TimelineEvent = forwardRef<HTMLLIElement, TimelineEventProps>(\n ({ type = 'neutral', eventId, className, children, ...props }, ref) => {\n const { layout } = useContext(TimelineContext);\n const { t } = useTranslation();\n\n const evtCtx = useMemo(() => ({ type }), [type]);\n\n if (layout === 'alternating') {\n // In alternating layout the <li> uses `contents` so its children\n // participate directly in the parent grid.\n return (\n <TimelineEventContext.Provider value={evtCtx}>\n <li\n ref={ref}\n data-event-id={eventId}\n className={['ds:contents', className].filter(Boolean).join(' ')}\n {...props}\n >\n {/* Visually-hidden type prefix for screen readers */}\n <span className=\"ds:sr-only\">{t(`timeline.type.${type}`)}</span>\n {children}\n </li>\n </TimelineEventContext.Provider>\n );\n }\n\n return (\n <TimelineEventContext.Provider value={evtCtx}>\n <li\n ref={ref}\n data-event-id={eventId}\n className={eventVariants({ layout, className })}\n {...props}\n >\n {/* Visually-hidden type prefix for screen readers */}\n <span className=\"ds:sr-only\">{t(`timeline.type.${type}`)}</span>\n {children}\n </li>\n </TimelineEventContext.Provider>\n );\n },\n);\nTimelineEvent.displayName = 'Timeline.Event';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Dot */\n/* ------------------------------------------------------------------ */\n\nconst TimelineDot = forwardRef<HTMLDivElement, TimelineDotProps>(\n ({ icon, className, ...props }, ref) => {\n const { type } = useContext(TimelineEventContext);\n const { layout } = useContext(TimelineContext);\n\n const dot = (\n <div\n ref={ref}\n aria-hidden=\"true\"\n className={dotVariants({ type, className })}\n {...props}\n >\n {icon ?? TYPE_ICONS[type]}\n </div>\n );\n\n if (layout === 'alternating') {\n // In alternating grid: col 2 (centre) for the dot with the rail line\n return (\n <div\n aria-hidden=\"true\"\n className=\"ds:col-start-2 ds:flex ds:flex-col ds:items-center\"\n >\n {/* Rail segment above the dot */}\n <div className=\"ds:w-[var(--border-width-md)] ds:flex-1 ds:bg-[var(--border)] ds:first:hidden\" />\n {dot}\n {/* Rail segment below the dot */}\n <div className=\"ds:w-[var(--border-width-md)] ds:flex-1 ds:bg-[var(--border)]\" />\n </div>\n );\n }\n\n return dot;\n },\n);\nTimelineDot.displayName = 'Timeline.Dot';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Content */\n/* ------------------------------------------------------------------ */\n\nconst TimelineContent = forwardRef<HTMLDivElement, TimelineContentProps>(\n ({ title, description, actor, children, className, ...props }, ref) => {\n const { layout } = useContext(TimelineContext);\n\n const inner = (\n <div\n ref={ref}\n className={[\n 'ds:flex-1 ds:min-w-0 ds:pb-[var(--spacing-md)]',\n 'ds:[&_*]:break-normal ds:[&_*]:[overflow-wrap:anywhere]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n <Card variant=\"outlined\">\n <Card.Body>\n <p className=\"type-label ds:text-[var(--foreground)]\">{title}</p>\n {description && (\n <p className=\"ds:mt-[var(--spacing-xs)] type-body-sm ds:text-[var(--muted-foreground)]\">\n {description}\n </p>\n )}\n {actor && (\n <div className=\"ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <Avatar size=\"xs\" name={actor.name} src={actor.src} />\n <span className=\"type-meta ds:text-[var(--muted-foreground)]\">\n {actor.name}\n </span>\n </div>\n )}\n {children}\n </Card.Body>\n </Card>\n </div>\n );\n\n if (layout === 'alternating') {\n // Alternating: odd events in col 1 (start), even events in col 3 (end).\n // We use CSS nth-child targeting via a wrapper that sets col placement.\n return (\n <div className=\"ds:col-span-1 ds:[li:nth-child(even)_&]:col-start-3 ds:[li:nth-child(odd)_&]:col-start-1\">\n {inner}\n </div>\n );\n }\n\n return inner;\n },\n);\nTimelineContent.displayName = 'Timeline.Content';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Timestamp — thin wrapper over the shared Timestamp */\n/* component. Keeps the existing API (`date`, `relative`, `format`) */\n/* for backward compatibility; adds tabular-nums because timeline */\n/* timestamps sit in a rail gutter and benefit from column-aligned */\n/* digits. */\n/* ------------------------------------------------------------------ */\n\nconst TWENTY_FOUR_HOURS_MS = 24 * 60 * 60 * 1000;\n\nconst TimelineTimestamp = forwardRef<HTMLTimeElement, TimelineTimestampProps>(\n (\n {\n date,\n relative = true,\n format = { dateStyle: 'medium', timeStyle: 'short' },\n className,\n ...props\n },\n ref,\n ) => (\n <Timestamp\n ref={ref}\n value={date}\n format={relative ? 'relative' : 'absolute'}\n relativeWindow={relative ? TWENTY_FOUR_HOURS_MS : undefined}\n absoluteFormat={format}\n className={[\n 'ds:text-[var(--muted-foreground)]',\n 'ds:[font-variant-numeric:var(--font-feature-tabular)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n ),\n);\nTimelineTimestamp.displayName = 'Timeline.Timestamp';\n\n/* ------------------------------------------------------------------ */\n/* Compound export */\n/* ------------------------------------------------------------------ */\n\nexport const Timeline = Object.assign(TimelineRoot, {\n Event: TimelineEvent,\n Dot: TimelineDot,\n Content: TimelineContent,\n Timestamp: TimelineTimestamp,\n});\n"],"names":["timelineAgent","handle","args","TimelineContext","createContext","TimelineEventContext","timelineVariants","cva","eventVariants","dotVariants","TYPE_ICONS","jsx","Info","Check","AlertTriangle","X","Circle","TimelineRoot","forwardRef","layout","order","className","children","props","ref","ctx","useMemo","olRef","useRef","selectedEvent","setSelectedEvent","useState","latestRef","selectEvent","useCallback","id","target","_a","agentHandle","useImperativeHandle","useAgentRegistration","TimelineEvent","type","eventId","useContext","t","useTranslation","evtCtx","jsxs","TimelineDot","icon","dot","TimelineContent","title","description","actor","inner","Card","Avatar","TWENTY_FOUR_HOURS_MS","TimelineTimestamp","date","relative","format","Timestamp","Timeline"],"mappings":";;;;;;;;;;;;;AAOO,MAAMA,IAA8C;AAAA,EACzD,IAAI;AAAA,EACJ,cAAc,CAAC,QAAQ,gBAAgB;AAAA,EACvC,OAAO;AAAA,IACL,eAAe;AAAA,MACb,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,EAC5C;AAAA,EAEF,SAAS;AAAA,IACP,cAAc;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A2C;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,QAAAC,IAAS,EAAE,WAAW,UAAU,WAAW,QAAA;AAAA,IAC3C,WAAA1C;AAAA,IACA,GAAGE;AAAA,EAAA,GAELC,MAEA,gBAAAb;AAAA,IAACqD;AAAA,IAAA;AAAA,MACC,KAAAxC;AAAA,MACA,OAAOqC;AAAA,MACP,QAAQC,IAAW,aAAa;AAAA,MAChC,gBAAgBA,IAAWH,IAAuB;AAAA,MAClD,gBAAgBI;AAAA,MAChB,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA1C;AAAA,MAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACV,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AACAqC,EAAkB,cAAc;AAMzB,MAAMK,KAAW,OAAO,OAAOhD,GAAc;AAAA,EAClD,OAAOwB;AAAA,EACP,KAAKQ;AAAA,EACL,SAASG;AAAA,EACT,WAAWQ;AACb,CAAC;"}
|
|
1
|
+
{"version":3,"file":"timeline-jmd7lfDf.js","sources":["../../src/components/timeline/timeline.agent.ts","../../src/components/timeline/timeline.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — Timeline. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { TimelineHandle } from './timeline';\n\nexport const timelineAgent: AgentAdapter<TimelineHandle> = {\n id: 'timeline',\n capabilities: ['pick', 'range_navigate'],\n state: {\n selectedEvent: {\n type: 'string | null',\n descriptionKey: 'ui.agent.timeline.state.selectedEvent',\n description: 'Opaque event id of the currently-active event, or null.',\n read: (handle) => handle.getSelectedEvent(),\n },\n },\n actions: {\n select_event: {\n safety: 'read',\n argsType: '{ id: string }',\n descriptionKey: 'ui.agent.timeline.actions.selectEvent',\n description: 'Scroll the given event into view and mark it as selected.',\n invoke: (handle, args: { id: string }) => {\n handle.selectEvent(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'timeline',\n description: 'Marks the Timeline root.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-event-id',\n description:\n 'Opaque event id emitted on each Timeline.Event when the `eventId` prop is provided.',\n },\n },\n};\n","import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type LiHTMLAttributes,\n type OlHTMLAttributes,\n type ReactNode,\n type TimeHTMLAttributes,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { AlertTriangle, Check, Circle, Info, X } from 'lucide-react';\nimport { Avatar } from '../avatar';\nimport { Card } from '../card';\nimport { Timestamp } from '../timestamp';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { timelineAgent } from './timeline.agent';\n\n// TODO: optional @tanstack/react-virtual integration for 500+ events\n\n/* ------------------------------------------------------------------ */\n/* Context */\n/* ------------------------------------------------------------------ */\n\ntype EventType = 'info' | 'success' | 'warning' | 'error' | 'neutral';\ntype Layout = 'rail-start' | 'rail-end' | 'alternating';\n\ninterface TimelineContextValue {\n layout: Layout;\n order: 'newest-first' | 'oldest-first';\n}\n\nconst TimelineContext = createContext<TimelineContextValue>({\n layout: 'rail-start',\n order: 'newest-first',\n});\n\ninterface TimelineEventContextValue {\n type: EventType;\n}\n\nconst TimelineEventContext = createContext<TimelineEventContextValue>({\n type: 'neutral',\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — root */\n/* ------------------------------------------------------------------ */\n\nconst timelineVariants = cva('ds:flex ds:flex-col', {\n variants: {\n layout: {\n 'rail-start': 'ds:ps-4',\n 'rail-end': 'ds:pe-4',\n alternating:\n 'ds:grid ds:grid-cols-[1fr_2rem_1fr] ds:gap-x-[var(--spacing-md)]',\n },\n order: {\n 'newest-first': 'ds:flex-col',\n 'oldest-first': 'ds:flex-col-reverse',\n },\n },\n defaultVariants: { layout: 'rail-start', order: 'newest-first' },\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — event item */\n/* ------------------------------------------------------------------ */\n\nconst eventVariants = cva(\n 'ds:relative ds:flex ds:gap-[var(--spacing-md)] ds:pb-[var(--spacing-md)]',\n {\n variants: {\n layout: {\n 'rail-start': [\n 'ds:flex-row',\n // Rail: continuous border on the inline-start of the event list\n 'ds:before:absolute ds:before:top-8 ds:before:bottom-0',\n 'ds:before:border-inline-start-[2px] ds:before:border-[color:var(--border)]',\n 'ds:before:inset-inline-start-[-1rem]',\n 'ds:last:before:hidden',\n ].join(' '),\n 'rail-end': [\n 'ds:flex-row-reverse',\n 'ds:before:absolute ds:before:top-8 ds:before:bottom-0',\n 'ds:before:border-inline-end-[2px] ds:before:border-[color:var(--border)]',\n 'ds:before:inset-inline-end-[-1rem]',\n 'ds:last:before:hidden',\n ].join(' '),\n alternating: 'ds:contents',\n },\n },\n defaultVariants: { layout: 'rail-start' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* CVA — dot */\n/* ------------------------------------------------------------------ */\n\nconst dotVariants = cva(\n [\n 'ds:relative ds:z-10 ds:flex ds:items-center ds:justify-center',\n 'ds:rounded-[var(--radius-full)] ds:shrink-0',\n 'ds:size-8',\n 'ds:ring-2 ds:ring-[var(--background)]',\n ].join(' '),\n {\n variants: {\n type: {\n info: 'ds:bg-[var(--info)] ds:text-[var(--info-solid-foreground)]',\n success:\n 'ds:bg-[var(--success)] ds:text-[var(--success-solid-foreground)]',\n warning:\n 'ds:bg-[var(--warning)] ds:text-[var(--warning-solid-foreground)]',\n error:\n 'ds:bg-[var(--destructive)] ds:text-[var(--destructive-foreground)]',\n neutral: 'ds:bg-[var(--muted)] ds:text-[var(--muted-foreground)]',\n },\n },\n defaultVariants: { type: 'neutral' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport interface TimelineProps\n extends\n Omit<OlHTMLAttributes<HTMLOListElement>, 'color'>,\n VariantProps<typeof timelineVariants> {\n layout?: Layout;\n order?: 'newest-first' | 'oldest-first';\n children: ReactNode;\n className?: string;\n}\n\nexport interface TimelineEventProps extends LiHTMLAttributes<HTMLLIElement> {\n type?: EventType;\n /** Opaque event id — when set, the component emits `data-event-id` for agent addressing. */\n eventId?: string;\n children: ReactNode;\n className?: string;\n}\n\n/** Curated imperative handle for agent / external automation. */\nexport interface TimelineHandle {\n getSelectedEvent: () => string | null;\n selectEvent: (id: string) => void;\n}\n\nexport interface TimelineDotProps extends HTMLAttributes<HTMLDivElement> {\n icon?: ReactNode;\n className?: string;\n}\n\nexport interface TimelineContentProps extends HTMLAttributes<HTMLDivElement> {\n title: string;\n description?: string;\n actor?: { name: string; src?: string };\n children?: ReactNode;\n className?: string;\n}\n\nexport interface TimelineTimestampProps extends TimeHTMLAttributes<HTMLTimeElement> {\n date: Date | string;\n relative?: boolean;\n format?: Intl.DateTimeFormatOptions;\n className?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Default icons per type */\n/* ------------------------------------------------------------------ */\n\nconst TYPE_ICONS: Record<EventType, ReactNode> = {\n info: <Info size={16} aria-hidden=\"true\" />,\n success: <Check size={16} aria-hidden=\"true\" />,\n warning: <AlertTriangle size={16} aria-hidden=\"true\" />,\n error: <X size={16} aria-hidden=\"true\" />,\n neutral: <Circle size={16} aria-hidden=\"true\" />,\n};\n\n/* ------------------------------------------------------------------ */\n/* Timeline root */\n/* ------------------------------------------------------------------ */\n\nconst TimelineRoot = forwardRef<HTMLOListElement, TimelineProps>(\n (\n {\n layout = 'rail-start',\n order = 'newest-first',\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const ctx = useMemo(() => ({ layout, order }), [layout, order]);\n const olRef = useRef<HTMLOListElement | null>(null);\n const [selectedEvent, setSelectedEvent] = useState<string | null>(null);\n const latestRef = useRef<string | null>(null);\n latestRef.current = selectedEvent;\n\n const selectEvent = useCallback((id: string) => {\n setSelectedEvent(id);\n const target = olRef.current?.querySelector(\n `[data-event-id=\"${id}\"]`,\n ) as HTMLElement | null;\n target?.scrollIntoView({ block: 'center', behavior: 'auto' });\n }, []);\n\n const agentHandle = useMemo<TimelineHandle>(\n () => ({\n getSelectedEvent: () => latestRef.current,\n selectEvent,\n }),\n [selectEvent],\n );\n useImperativeHandle(ref, () => olRef.current as HTMLOListElement, []);\n useAgentRegistration(timelineAgent, agentHandle, props.id);\n\n return (\n <TimelineContext.Provider value={ctx}>\n <ol\n ref={olRef}\n data-component=\"timeline\"\n data-component-id={props.id}\n data-selected-event={selectedEvent ?? undefined}\n className={timelineVariants({ layout, order, className })}\n {...props}\n >\n {children}\n </ol>\n </TimelineContext.Provider>\n );\n },\n);\nTimelineRoot.displayName = 'Timeline';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Event */\n/* ------------------------------------------------------------------ */\n\nconst TimelineEvent = forwardRef<HTMLLIElement, TimelineEventProps>(\n ({ type = 'neutral', eventId, className, children, ...props }, ref) => {\n const { layout } = useContext(TimelineContext);\n const { t } = useTranslation();\n\n const evtCtx = useMemo(() => ({ type }), [type]);\n\n if (layout === 'alternating') {\n // In alternating layout the <li> uses `contents` so its children\n // participate directly in the parent grid.\n return (\n <TimelineEventContext.Provider value={evtCtx}>\n <li\n ref={ref}\n data-event-id={eventId}\n className={['ds:contents', className].filter(Boolean).join(' ')}\n {...props}\n >\n {/* Visually-hidden type prefix for screen readers */}\n <span className=\"ds:sr-only\">{t(`timeline.type.${type}`)}</span>\n {children}\n </li>\n </TimelineEventContext.Provider>\n );\n }\n\n return (\n <TimelineEventContext.Provider value={evtCtx}>\n <li\n ref={ref}\n data-event-id={eventId}\n className={eventVariants({ layout, className })}\n {...props}\n >\n {/* Visually-hidden type prefix for screen readers */}\n <span className=\"ds:sr-only\">{t(`timeline.type.${type}`)}</span>\n {children}\n </li>\n </TimelineEventContext.Provider>\n );\n },\n);\nTimelineEvent.displayName = 'Timeline.Event';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Dot */\n/* ------------------------------------------------------------------ */\n\nconst TimelineDot = forwardRef<HTMLDivElement, TimelineDotProps>(\n ({ icon, className, ...props }, ref) => {\n const { type } = useContext(TimelineEventContext);\n const { layout } = useContext(TimelineContext);\n\n const dot = (\n <div\n ref={ref}\n aria-hidden=\"true\"\n className={dotVariants({ type, className })}\n {...props}\n >\n {icon ?? TYPE_ICONS[type]}\n </div>\n );\n\n if (layout === 'alternating') {\n // In alternating grid: col 2 (centre) for the dot with the rail line\n return (\n <div\n aria-hidden=\"true\"\n className=\"ds:col-start-2 ds:flex ds:flex-col ds:items-center\"\n >\n {/* Rail segment above the dot */}\n <div className=\"ds:w-[var(--border-width-md)] ds:flex-1 ds:bg-[var(--border)] ds:first:hidden\" />\n {dot}\n {/* Rail segment below the dot */}\n <div className=\"ds:w-[var(--border-width-md)] ds:flex-1 ds:bg-[var(--border)]\" />\n </div>\n );\n }\n\n return dot;\n },\n);\nTimelineDot.displayName = 'Timeline.Dot';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Content */\n/* ------------------------------------------------------------------ */\n\nconst TimelineContent = forwardRef<HTMLDivElement, TimelineContentProps>(\n ({ title, description, actor, children, className, ...props }, ref) => {\n const { layout } = useContext(TimelineContext);\n\n const inner = (\n <div\n ref={ref}\n className={[\n 'ds:flex-1 ds:min-w-0 ds:pb-[var(--spacing-md)]',\n // Wrap policy: `break-word` (not `anywhere`) preserves word-\n // boundary wrapping for natural-language titles / descriptions;\n // only genuinely unbreakable strings (URLs, hashes) break mid-\n // word when they would otherwise overflow. `anywhere` introduces\n // a soft-wrap opportunity at every character boundary, which\n // chopped Italian / German labels mid-word when an event card\n // sat in a narrow context.\n 'ds:[&_*]:break-normal ds:[&_*]:[overflow-wrap:break-word]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n <Card variant=\"outlined\">\n <Card.Body>\n <p className=\"type-label ds:text-[var(--foreground)]\">{title}</p>\n {description && (\n <p className=\"ds:mt-[var(--spacing-xs)] type-body-sm ds:text-[var(--muted-foreground)]\">\n {description}\n </p>\n )}\n {actor && (\n <div className=\"ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <Avatar size=\"xs\" name={actor.name} src={actor.src} />\n <span className=\"type-meta ds:text-[var(--muted-foreground)]\">\n {actor.name}\n </span>\n </div>\n )}\n {children}\n </Card.Body>\n </Card>\n </div>\n );\n\n if (layout === 'alternating') {\n // Alternating: odd events in col 1 (start), even events in col 3 (end).\n // We use CSS nth-child targeting via a wrapper that sets col placement.\n return (\n <div className=\"ds:col-span-1 ds:[li:nth-child(even)_&]:col-start-3 ds:[li:nth-child(odd)_&]:col-start-1\">\n {inner}\n </div>\n );\n }\n\n return inner;\n },\n);\nTimelineContent.displayName = 'Timeline.Content';\n\n/* ------------------------------------------------------------------ */\n/* Timeline.Timestamp — thin wrapper over the shared Timestamp */\n/* component. Keeps the existing API (`date`, `relative`, `format`) */\n/* for backward compatibility; adds tabular-nums because timeline */\n/* timestamps sit in a rail gutter and benefit from column-aligned */\n/* digits. */\n/* ------------------------------------------------------------------ */\n\nconst TWENTY_FOUR_HOURS_MS = 24 * 60 * 60 * 1000;\n\nconst TimelineTimestamp = forwardRef<HTMLTimeElement, TimelineTimestampProps>(\n (\n {\n date,\n relative = true,\n format = { dateStyle: 'medium', timeStyle: 'short' },\n className,\n ...props\n },\n ref,\n ) => (\n <Timestamp\n ref={ref}\n value={date}\n format={relative ? 'relative' : 'absolute'}\n relativeWindow={relative ? TWENTY_FOUR_HOURS_MS : undefined}\n absoluteFormat={format}\n className={[\n 'ds:text-[var(--muted-foreground)]',\n 'ds:[font-variant-numeric:var(--font-feature-tabular)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n ),\n);\nTimelineTimestamp.displayName = 'Timeline.Timestamp';\n\n/* ------------------------------------------------------------------ */\n/* Compound export */\n/* ------------------------------------------------------------------ */\n\nexport const Timeline = Object.assign(TimelineRoot, {\n Event: TimelineEvent,\n Dot: TimelineDot,\n Content: TimelineContent,\n Timestamp: TimelineTimestamp,\n});\n"],"names":["timelineAgent","handle","args","TimelineContext","createContext","TimelineEventContext","timelineVariants","cva","eventVariants","dotVariants","TYPE_ICONS","jsx","Info","Check","AlertTriangle","X","Circle","TimelineRoot","forwardRef","layout","order","className","children","props","ref","ctx","useMemo","olRef","useRef","selectedEvent","setSelectedEvent","useState","latestRef","selectEvent","useCallback","id","target","_a","agentHandle","useImperativeHandle","useAgentRegistration","TimelineEvent","type","eventId","useContext","t","useTranslation","evtCtx","jsxs","TimelineDot","icon","dot","TimelineContent","title","description","actor","inner","Card","Avatar","TWENTY_FOUR_HOURS_MS","TimelineTimestamp","date","relative","format","Timestamp","Timeline"],"mappings":";;;;;;;;;;;;;AAOO,MAAMA,IAA8C;AAAA,EACzD,IAAI;AAAA,EACJ,cAAc,CAAC,QAAQ,gBAAgB;AAAA,EACvC,OAAO;AAAA,IACL,eAAe;AAAA,MACb,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,EAC5C;AAAA,EAEF,SAAS;AAAA,IACP,cAAc;AAAA,MACZ,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,GAAQC,MAAyB;AACxC,QAAAD,EAAO,YAAYC,EAAK,EAAE;AAAA,MAC5B;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,IAEf,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aACE;AAAA,IAAA;AAAA,EACJ;AAEJ,GCRMC,IAAkBC,EAAoC;AAAA,EAC1D,QAAQ;AAAA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AACAqC,EAAkB,cAAc;AAMzB,MAAMK,KAAW,OAAO,OAAOhD,GAAc;AAAA,EAClD,OAAOwB;AAAA,EACP,KAAKQ;AAAA,EACL,SAASG;AAAA,EACT,WAAWQ;AACb,CAAC;"}
|
|
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as u, Fragment as ve } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as O, useMemo as R, useRef as j, useCallback as W, useState as ge, useImperativeHandle as ke, useEffect as ye } from "react";
|
|
3
3
|
import { c as L } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as z } from "react-i18next";
|
|
5
|
-
import { C } from "./card-
|
|
5
|
+
import { C } from "./card-C353dU-H.js";
|
|
6
6
|
import { B as be } from "./badge-cLYVGlMh.js";
|
|
7
7
|
import { K as Z } from "./key-value-pair-DBuOCtIc.js";
|
|
8
8
|
import { T as xe } from "./timestamp-BV2lC-wV.js";
|
|
@@ -1412,4 +1412,4 @@ export {
|
|
|
1412
1412
|
ee as r,
|
|
1413
1413
|
D as w
|
|
1414
1414
|
};
|
|
1415
|
-
//# sourceMappingURL=workflow-map-
|
|
1415
|
+
//# sourceMappingURL=workflow-map-BR6txfFX.js.map
|