@datum-cloud/datum-ui 2.0.0 → 2.1.0

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.
Files changed (69) hide show
  1. package/dist/autocomplete/index.mjs +1 -1
  2. package/dist/{autocomplete-DM6JYV4W.mjs → autocomplete-DZ_HSBak.mjs} +1 -1
  3. package/dist/autosearch/index.mjs +1 -1
  4. package/dist/{calendar-date-picker-AzvSqjeS.mjs → calendar-date-picker-ynSGADfR.mjs} +1 -1
  5. package/dist/components/base/sheet/sheet.d.ts +2 -1
  6. package/dist/components/features/date-time/date-time.d.ts +6 -0
  7. package/dist/components/features/date-time/formatters.d.ts +13 -0
  8. package/dist/components/features/date-time/index.d.ts +3 -0
  9. package/dist/components/features/date-time/types.d.ts +47 -0
  10. package/dist/components/features/index.d.ts +1 -0
  11. package/dist/components/features/logs/components/detail.d.ts +3 -0
  12. package/dist/components/features/logs/components/explorer.d.ts +3 -0
  13. package/dist/components/features/logs/components/filters.d.ts +11 -0
  14. package/dist/components/features/logs/components/root.d.ts +2 -0
  15. package/dist/components/features/logs/components/status-badge.d.ts +7 -0
  16. package/dist/components/features/logs/components/table.d.ts +3 -0
  17. package/dist/components/features/logs/components/toolbar.d.ts +12 -0
  18. package/dist/components/features/logs/fixtures/index.d.ts +2 -0
  19. package/dist/components/features/logs/hooks/use-controllable-state.d.ts +5 -0
  20. package/dist/components/features/logs/hooks/use-logs.d.ts +3 -0
  21. package/dist/components/features/logs/index.d.ts +4 -0
  22. package/dist/components/features/logs/logs.d.ts +18 -0
  23. package/dist/components/features/logs/types.d.ts +105 -0
  24. package/dist/components/features/logs/utils/build-logql.d.ts +2 -0
  25. package/dist/components/features/logs/utils/constants.d.ts +6 -0
  26. package/dist/components/features/logs/utils/facets.d.ts +3 -0
  27. package/dist/components/features/logs/utils/flatten-loki.d.ts +3 -0
  28. package/dist/components/features/logs/utils/format-timestamp.d.ts +4 -0
  29. package/dist/components/features/logs/utils/index.d.ts +8 -0
  30. package/dist/components/features/logs/utils/parse-log-line.d.ts +7 -0
  31. package/dist/components/features/logs/utils/severity.d.ts +5 -0
  32. package/dist/components/features/logs/utils/time-range.d.ts +3 -0
  33. package/dist/data-table/index.mjs +1 -1
  34. package/dist/{data-table-DjGvAdO_.mjs → data-table-Du7_FLBi.mjs} +4 -4
  35. package/dist/date-picker/index.mjs +3 -3
  36. package/dist/date-time/index.mjs +2 -0
  37. package/dist/date-time-CA-09lnw.mjs +134 -0
  38. package/dist/date-time-picker/index.mjs +1 -1
  39. package/dist/{date-time-picker-D3-DeNo8.mjs → date-time-picker-BzcHrf-A.mjs} +1 -1
  40. package/dist/{picker-b5-x-EHs.mjs → date-time-range-picker-Dog33Ry0.mjs} +22 -456
  41. package/dist/form/index.mjs +1 -1
  42. package/dist/{form-BUUNQfC9.mjs → form-BhBsoMFA.mjs} +4 -4
  43. package/dist/grouped-table/index.mjs +1 -1
  44. package/dist/{grouped-table-D4J3ioHb.mjs → grouped-table--jejU1Jy.mjs} +1 -1
  45. package/dist/index.mjs +19 -18
  46. package/dist/logs/fixtures/index.mjs +231 -0
  47. package/dist/logs/index.mjs +980 -0
  48. package/dist/mobile-sheet/index.mjs +1 -1
  49. package/dist/{mobile-sheet-D9L-JOee.mjs → mobile-sheet-BYp-QQmn.mjs} +1 -1
  50. package/dist/more-actions/index.mjs +1 -1
  51. package/dist/{more-actions-Bx443Ccx.mjs → more-actions-B1FUf2rm.mjs} +1 -1
  52. package/dist/multi-select/index.mjs +1 -1
  53. package/dist/{multi-select-PHaMEbY-.mjs → multi-select-PtdMChPF.mjs} +1 -1
  54. package/dist/picker/index.mjs +2 -1
  55. package/dist/picker-raVuDxsh.mjs +453 -0
  56. package/dist/responsive-dropdown/index.mjs +1 -1
  57. package/dist/{responsive-dropdown-fCmduKaz.mjs → responsive-dropdown-n0Txkax5.mjs} +1 -1
  58. package/dist/responsive-popover/index.mjs +1 -1
  59. package/dist/{responsive-popover-DJZgXWIE.mjs → responsive-popover-C_1nzIvm.mjs} +1 -1
  60. package/dist/rich-text-editor/index.mjs +1 -1
  61. package/dist/{rich-text-editor-CGuSn8xi.mjs → rich-text-editor-Dohp-pbf.mjs} +1 -1
  62. package/dist/sheet/index.mjs +1 -1
  63. package/dist/{sheet-BZViad2U.mjs → sheet-C2i2k5i2.mjs} +2 -2
  64. package/dist/task-queue/index.mjs +1 -1
  65. package/dist/{task-queue-dropdown-pqFd4rSf.mjs → task-queue-dropdown-ClLLTMxU.mjs} +1 -1
  66. package/dist/time-picker/index.mjs +1 -1
  67. package/dist/{time-picker-B_fN5vhO.mjs → time-picker-CFhaHTtI.mjs} +1 -1
  68. package/dist/{to-api-format-43Boq7OR.mjs → to-api-format-WC7b9Mcv.mjs} +2 -2
  69. package/package.json +16 -1
@@ -1,2 +1,2 @@
1
- import { t as Autocomplete } from "../autocomplete-DM6JYV4W.mjs";
1
+ import { t as Autocomplete } from "../autocomplete-DZ_HSBak.mjs";
2
2
  export { Autocomplete };
@@ -1,5 +1,5 @@
1
1
  import { t as cn } from "./utils-Bu32wN-x.mjs";
2
- import { t as ResponsivePopover } from "./responsive-popover-DJZgXWIE.mjs";
2
+ import { t as ResponsivePopover } from "./responsive-popover-C_1nzIvm.mjs";
3
3
  import { t as LoaderOverlay } from "./loader-overlay-DD94azZX.mjs";
4
4
  import { n as OptionList, t as useOptionPicker } from "./use-option-picker-s2bUYwXC.mjs";
5
5
  import { ChevronDown } from "lucide-react";
@@ -1,7 +1,7 @@
1
1
  import { t as cn } from "../utils-Bu32wN-x.mjs";
2
2
  import { t as Button } from "../button-A1qTjZ8U.mjs";
3
3
  import { t as Input } from "../input-j4tbmYYz.mjs";
4
- import { t as ResponsivePopover } from "../responsive-popover-DJZgXWIE.mjs";
4
+ import { t as ResponsivePopover } from "../responsive-popover-C_1nzIvm.mjs";
5
5
  import { t as Tooltip } from "../tooltip-C_SL1imw.mjs";
6
6
  import { n as OptionList, t as useOptionPicker } from "../use-option-picker-s2bUYwXC.mjs";
7
7
  import { AlertCircle, Loader2, X } from "lucide-react";
@@ -1,5 +1,5 @@
1
- import { o as DateRangePicker } from "./picker-b5-x-EHs.mjs";
2
1
  import { t as useDeprecationWarning } from "./use-deprecation-warning-DXrGc0jX.mjs";
2
+ import { a as DateRangePicker } from "./picker-raVuDxsh.mjs";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/components/features/calendar-date-picker/calendar-date-picker.tsx
5
5
  /**
@@ -7,8 +7,9 @@ interface SheetOverlayProps extends React.ComponentProps<typeof SheetPrimitive.O
7
7
  declare function SheetOverlay({ className, ...props }: SheetOverlayProps): React.JSX.Element;
8
8
  interface SheetContentProps extends React.ComponentProps<typeof SheetPrimitive.Content> {
9
9
  side?: 'top' | 'right' | 'bottom' | 'left';
10
+ showCloseButton?: boolean;
10
11
  }
11
- declare function SheetContent({ className, children, side, ...props }: SheetContentProps): React.JSX.Element;
12
+ declare function SheetContent({ className, children, side, showCloseButton, ...props }: SheetContentProps): React.JSX.Element;
12
13
  interface SheetComponent extends React.FC<React.ComponentProps<typeof ShadcnSheet>> {
13
14
  Trigger: typeof SheetTrigger;
14
15
  Content: typeof SheetContent;
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { DateTimeProps } from './types';
3
+ /**
4
+ * Date display with the shared Datum hover tooltip (UTC, local zone, relative, epoch).
5
+ */
6
+ export declare function DateTime({ date, variant, format, addSuffix, tooltip, timezone, disableTimezone, className, separator, timestamp, children, }: DateTimeProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null;
@@ -0,0 +1,13 @@
1
+ import type { FormatterOptions } from './types';
2
+ /** e.g. "June 12th at 11:30 AM" — used for absolute / table dates. */
3
+ export declare const DEFAULT_DATE_FORMAT = "MMMM do 'at' h:mm a";
4
+ export declare function getBrowserTimezone(): string;
5
+ export declare function parseDate(date: string | Date): Date | null;
6
+ export declare function formatAbsoluteDate(date: Date, options: FormatterOptions): string;
7
+ export declare function formatRelativeDate(date: Date, options: FormatterOptions): string;
8
+ export declare function getTimezoneAbbreviation(date: Date, timezone: string): string;
9
+ export declare function formatCombinedDate(date: Date, options: FormatterOptions, separator?: string): string;
10
+ export declare function formatUTCDate(date: Date, format?: string): string;
11
+ export declare function formatTimezoneDate(date: Date, timezone: string, format?: string): string;
12
+ /** Microseconds since epoch, matching the Datum DateTime tooltip. */
13
+ export declare function getTimestamp(date: Date): string;
@@ -0,0 +1,3 @@
1
+ export { DateTime } from './date-time';
2
+ export { DEFAULT_DATE_FORMAT, formatAbsoluteDate, formatCombinedDate, formatRelativeDate, formatTimezoneDate, formatUTCDate, getTimestamp, getTimezoneAbbreviation, parseDate, } from './formatters';
3
+ export type { DateTimeProps, DateTimeVariant, FormatterOptions, TooltipMode } from './types';
@@ -0,0 +1,47 @@
1
+ import type { ReactNode } from 'react';
2
+ export type DateTimeVariant = 'absolute' | 'relative' | 'both' | 'detailed';
3
+ export type TooltipMode = boolean | 'auto' | 'timezone' | 'alternate' | 'detailed';
4
+ export interface DateTimeProps {
5
+ /** Date to format — a `Date` or parseable ISO string. */
6
+ date?: string | Date;
7
+ /**
8
+ * `absolute` — formatted date.
9
+ * `relative` — "X ago".
10
+ * `both` — absolute plus relative.
11
+ * `detailed` — absolute in the trigger; tooltip lists UTC, local, relative, and epoch.
12
+ */
13
+ variant?: DateTimeVariant;
14
+ /** date-fns format string for absolute dates. */
15
+ format?: string;
16
+ /** Append "ago" (and similar) to relative dates. Defaults to true. */
17
+ addSuffix?: boolean;
18
+ /**
19
+ * Tooltip behavior:
20
+ * - true/false: show or hide
21
+ * - `auto`: opposite format, or timezone for absolute dates
22
+ * - `timezone`: timezone name and abbreviation
23
+ * - `alternate`: opposite of the visible variant
24
+ * - `detailed`: UTC, local zone, relative, and epoch
25
+ */
26
+ tooltip?: TooltipMode;
27
+ /** IANA timezone. Defaults to the browser timezone. */
28
+ timezone?: string;
29
+ /** Skip timezone conversion and format in the runtime local zone. */
30
+ disableTimezone?: boolean;
31
+ className?: string;
32
+ /** Separator between absolute and relative when `variant="both"`. */
33
+ separator?: string;
34
+ /**
35
+ * Epoch shown on the `detailed` tooltip Timestamp row.
36
+ * Defaults to microseconds derived from the date.
37
+ */
38
+ timestamp?: string;
39
+ /** Replace the formatted trigger. Must be a single element (Tooltip `asChild`). */
40
+ children?: ReactNode;
41
+ }
42
+ export interface FormatterOptions {
43
+ timezone: string;
44
+ disableTimezone: boolean;
45
+ format?: string;
46
+ addSuffix?: boolean;
47
+ }
@@ -10,6 +10,7 @@ export * from './avatar-stack';
10
10
  export * from './calendar-date-picker';
11
11
  export * from './code-editor';
12
12
  export * from './data-table';
13
+ export * from './date-time';
13
14
  export * from './date-time-picker';
14
15
  export * from './dropdown';
15
16
  export * from './dropzone';
@@ -0,0 +1,3 @@
1
+ export declare function LogsDetail({ className }: {
2
+ className?: string;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function LogsExplorer({ className }: {
2
+ className?: string;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { LogFacet } from '../types';
2
+ export declare function LogsFilterGroup({ facet, defaultOpen, }: {
3
+ facet: LogFacet;
4
+ defaultOpen?: boolean;
5
+ }): import("react").JSX.Element;
6
+ export declare function LogsTimeRangeFilter({ className }: {
7
+ className?: string;
8
+ }): import("react").JSX.Element;
9
+ export declare function LogsFilters({ className }: {
10
+ className?: string;
11
+ }): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { LogsRootProps } from '../types';
2
+ export declare function LogsRoot({ entries, facets, timeRange, defaultTimeRange, filters, defaultFilters, search, defaultSearch, live, defaultLive, selectedId, defaultSelectedId, isLoading, error, columns, onTimeRangeChange, onFiltersChange, onSearchChange, onLiveChange, onSelectedIdChange, onRefresh, onExport, className, children, }: LogsRootProps): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { ParsedLogLine } from '../types';
2
+ export declare function LogsSeverityBadge({ severity }: {
3
+ severity?: string;
4
+ }): import("react").JSX.Element;
5
+ export declare function LogsStatusBadge({ parsed }: {
6
+ parsed: ParsedLogLine;
7
+ }): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function LogsTable({ className }: {
2
+ className?: string;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from 'react';
2
+ export declare function LogsSearch({ placeholder, className, }: {
3
+ placeholder?: string;
4
+ className?: string;
5
+ }): import("react").JSX.Element;
6
+ export declare function LogsLiveToggle({ className }: {
7
+ className?: string;
8
+ }): import("react").JSX.Element;
9
+ export declare function LogsToolbar({ children, className, }: {
10
+ children?: ReactNode;
11
+ className?: string;
12
+ }): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { LokiQueryRangeResponse } from '../types';
2
+ export declare const queryRangeFixture: LokiQueryRangeResponse;
@@ -0,0 +1,5 @@
1
+ export declare function useControllableState<T>({ value, defaultValue, onChange, }: {
2
+ value?: T;
3
+ defaultValue: T;
4
+ onChange?: (value: T) => void;
5
+ }): [T, (value: T) => void];
@@ -0,0 +1,3 @@
1
+ import type { LogsContextValue } from '../types';
2
+ export declare const LogsContext: import("react").Context<LogsContextValue | null>;
3
+ export declare function useLogs(): LogsContextValue;
@@ -0,0 +1,4 @@
1
+ export { useLogs } from './hooks/use-logs';
2
+ export { Logs } from './logs';
3
+ export type { BuildLogQLOptions, LogColumnId, LogEntry, LogFacet, LogFacetOption, LogFilters, LogsContextValue, LogsRootProps, LogTimeRange, LokiQueryRangeResponse, LokiStream, ParsedHttpLogLine, ParsedLogLine, ParsedTextLogLine, } from './types';
4
+ export { buildLogQL, facetsFromEntries, filterEntries, flattenLokiStreams, httpStatusBadgeType, httpStatusTextClass, lastThirtyMinutes, logLineDisplay, nsToDate, parseLogLine, severityBadgeType, } from './utils';
@@ -0,0 +1,18 @@
1
+ import { LogsDetail } from './components/detail';
2
+ import { LogsExplorer } from './components/explorer';
3
+ import { LogsFilterGroup, LogsFilters, LogsTimeRangeFilter } from './components/filters';
4
+ import { LogsRoot } from './components/root';
5
+ import { LogsTable } from './components/table';
6
+ import { LogsLiveToggle, LogsSearch, LogsToolbar } from './components/toolbar';
7
+ export declare const Logs: {
8
+ readonly Root: typeof LogsRoot;
9
+ readonly Explorer: typeof LogsExplorer;
10
+ readonly Filters: typeof LogsFilters;
11
+ readonly FilterGroup: typeof LogsFilterGroup;
12
+ readonly TimeRangeFilter: typeof LogsTimeRangeFilter;
13
+ readonly Toolbar: typeof LogsToolbar;
14
+ readonly Search: typeof LogsSearch;
15
+ readonly LiveToggle: typeof LogsLiveToggle;
16
+ readonly Table: typeof LogsTable;
17
+ readonly Detail: typeof LogsDetail;
18
+ };
@@ -0,0 +1,105 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface LokiStream {
3
+ stream: Record<string, string>;
4
+ values: Array<[timestampNs: string, line: string]>;
5
+ }
6
+ export interface LokiQueryRangeResponse {
7
+ status: 'success' | 'error';
8
+ data?: {
9
+ resultType: 'streams' | 'vector';
10
+ result: LokiStream[];
11
+ };
12
+ errorType?: string;
13
+ error?: string;
14
+ }
15
+ export interface LogEntry {
16
+ id: string;
17
+ timestamp: Date;
18
+ timestampNs: string;
19
+ line: string;
20
+ labels: Record<string, string>;
21
+ }
22
+ export interface LogFacetOption {
23
+ value: string;
24
+ count?: number;
25
+ }
26
+ export interface LogFacet {
27
+ name: string;
28
+ label: string;
29
+ options: LogFacetOption[];
30
+ }
31
+ export interface LogTimeRange {
32
+ from: string;
33
+ to: string;
34
+ }
35
+ export type LogFilters = Record<string, string[]>;
36
+ export type LogColumnId = 'time' | 'severity' | 'status' | 'service' | 'resource' | 'path' | 'message';
37
+ export interface ParsedHttpLogLine {
38
+ kind: 'http';
39
+ method: string;
40
+ path: string;
41
+ status: number;
42
+ durationMs: number;
43
+ }
44
+ export interface ParsedTextLogLine {
45
+ kind: 'text';
46
+ line: string;
47
+ }
48
+ export type ParsedLogLine = ParsedHttpLogLine | ParsedTextLogLine;
49
+ export interface BuildLogQLOptions {
50
+ matchers?: LogFilters;
51
+ lineContains?: string;
52
+ }
53
+ export type LogSeverity = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' | 'FATAL' | (string & {});
54
+ export interface LogsRootProps {
55
+ entries: readonly LogEntry[];
56
+ facets?: readonly LogFacet[];
57
+ timeRange?: LogTimeRange;
58
+ defaultTimeRange?: LogTimeRange;
59
+ filters?: LogFilters;
60
+ defaultFilters?: LogFilters;
61
+ search?: string;
62
+ defaultSearch?: string;
63
+ live?: boolean;
64
+ defaultLive?: boolean;
65
+ selectedId?: string | null;
66
+ defaultSelectedId?: string | null;
67
+ isLoading?: boolean;
68
+ error?: ReactNode;
69
+ columns?: readonly LogColumnId[];
70
+ onTimeRangeChange?: (range: LogTimeRange) => void;
71
+ onFiltersChange?: (filters: LogFilters) => void;
72
+ onSearchChange?: (search: string) => void;
73
+ onLiveChange?: (live: boolean) => void;
74
+ onSelectedIdChange?: (id: string | null) => void;
75
+ onRefresh?: () => void;
76
+ onExport?: (entries: readonly LogEntry[]) => void;
77
+ className?: string;
78
+ children: ReactNode;
79
+ }
80
+ export interface LogsContextValue {
81
+ entries: readonly LogEntry[];
82
+ facets: readonly LogFacet[];
83
+ timeRange: LogTimeRange;
84
+ setTimeRange: (range: LogTimeRange) => void;
85
+ filters: LogFilters;
86
+ setFilters: (filters: LogFilters) => void;
87
+ toggleFilterValue: (name: string, value: string) => void;
88
+ resetFilters: () => void;
89
+ search: string;
90
+ setSearch: (search: string) => void;
91
+ live: boolean;
92
+ setLive: (live: boolean) => void;
93
+ selectedId: string | null;
94
+ setSelectedId: (id: string | null) => void;
95
+ selectedEntry: LogEntry | null;
96
+ selectedIndex: number;
97
+ selectPrevious: () => void;
98
+ selectNext: () => void;
99
+ isLoading: boolean;
100
+ error: ReactNode;
101
+ columns: readonly LogColumnId[];
102
+ hasActiveFilters: boolean;
103
+ onRefresh?: () => void;
104
+ onExport?: (entries: readonly LogEntry[]) => void;
105
+ }
@@ -0,0 +1,2 @@
1
+ import type { BuildLogQLOptions } from '../types';
2
+ export declare function buildLogQL({ matchers, lineContains }?: BuildLogQLOptions): string;
@@ -0,0 +1,6 @@
1
+ import type { LogColumnId } from '../types';
2
+ export declare const DEFAULT_LOG_COLUMNS: readonly LogColumnId[];
3
+ export declare const CANONICAL_FACET_NAMES: readonly ["severity", "service_name", "resource_name"];
4
+ export declare const FACET_LABELS: Record<string, string>;
5
+ export declare const SEVERITY_ORDER: readonly ["ERROR", "FATAL", "WARN", "WARNING", "INFO", "DEBUG", "TRACE"];
6
+ export declare const DEFAULT_LOGQL_MATCHER = "{service_name=~\".+\"}";
@@ -0,0 +1,3 @@
1
+ import type { LogEntry, LogFacet, LogFilters } from '../types';
2
+ export declare function facetsFromEntries(entries: readonly LogEntry[], names?: readonly string[]): LogFacet[];
3
+ export declare function filterEntries(entries: readonly LogEntry[], filters: LogFilters, search?: string): LogEntry[];
@@ -0,0 +1,3 @@
1
+ import type { LogEntry, LokiQueryRangeResponse } from '../types';
2
+ export declare function nsToDate(timestampNs: string): Date;
3
+ export declare function flattenLokiStreams(response: LokiQueryRangeResponse): LogEntry[];
@@ -0,0 +1,4 @@
1
+ export declare function formatLogTimestamp(date: Date): string;
2
+ export declare function formatRelativeTimestamp(date: Date, now?: Date): string;
3
+ export declare function formatUtcTimestamp(date: Date): string;
4
+ export declare function formatLocalTimestamp(date: Date): string;
@@ -0,0 +1,8 @@
1
+ export { buildLogQL } from './build-logql';
2
+ export { CANONICAL_FACET_NAMES, DEFAULT_LOG_COLUMNS, DEFAULT_LOGQL_MATCHER, FACET_LABELS, SEVERITY_ORDER, } from './constants';
3
+ export { facetsFromEntries, filterEntries } from './facets';
4
+ export { flattenLokiStreams, nsToDate } from './flatten-loki';
5
+ export { formatLocalTimestamp, formatLogTimestamp, formatRelativeTimestamp, formatUtcTimestamp, } from './format-timestamp';
6
+ export { logLineDisplay, parseLogLine } from './parse-log-line';
7
+ export { httpStatusBadgeType, httpStatusTextClass, severityBadgeType } from './severity';
8
+ export { filtersAreActive, lastThirtyMinutes } from './time-range';
@@ -0,0 +1,7 @@
1
+ import type { ParsedLogLine } from '../types';
2
+ export declare function parseLogLine(line: string): ParsedLogLine;
3
+ export declare function logLineDisplay(line: string): {
4
+ parsed: ParsedLogLine;
5
+ path: string | null;
6
+ message: string;
7
+ };
@@ -0,0 +1,5 @@
1
+ import type { BadgeProps } from '../../../base/badge';
2
+ export type SeverityBadgeType = NonNullable<BadgeProps['type']>;
3
+ export declare function severityBadgeType(severity: string | undefined): SeverityBadgeType;
4
+ export declare function httpStatusBadgeType(status: number): SeverityBadgeType;
5
+ export declare function httpStatusTextClass(status: number): string;
@@ -0,0 +1,3 @@
1
+ import type { LogTimeRange } from '../types';
2
+ export declare function lastThirtyMinutes(now?: Date): LogTimeRange;
3
+ export declare function filtersAreActive(filters: Record<string, string[]>): boolean;
@@ -1,2 +1,2 @@
1
- import { _ as useNuqsAdapter, a as useDataTablePagination, b as DEFAULT_PAGE_SIZE, c as useDataTableSelection, d as resolvePath, f as rowMatchesSearch, g as createSelectionColumn, h as DataTableColumnHeader, i as useDataTableLoading, l as useDataTableSorting, m as DataTableRowActions, n as useDataTableFilters, o as useDataTableRows, p as dataTableFeatures, r as useDataTableInlineContents, s as useDataTableSearch, t as DataTable, u as createDataTableStore, v as DEFAULT_DEBOUNCE_MS, x as DEFAULT_PAGE_SIZES, y as DEFAULT_LOADING_ROWS } from "../data-table-DjGvAdO_.mjs";
1
+ import { _ as useNuqsAdapter, a as useDataTablePagination, b as DEFAULT_PAGE_SIZE, c as useDataTableSelection, d as resolvePath, f as rowMatchesSearch, g as createSelectionColumn, h as DataTableColumnHeader, i as useDataTableLoading, l as useDataTableSorting, m as DataTableRowActions, n as useDataTableFilters, o as useDataTableRows, p as dataTableFeatures, r as useDataTableInlineContents, s as useDataTableSearch, t as DataTable, u as createDataTableStore, v as DEFAULT_DEBOUNCE_MS, x as DEFAULT_PAGE_SIZES, y as DEFAULT_LOADING_ROWS } from "../data-table-Du7_FLBi.mjs";
2
2
  export { DEFAULT_DEBOUNCE_MS, DEFAULT_LOADING_ROWS, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZES, DataTable, DataTableColumnHeader, DataTableRowActions, createDataTableStore, createSelectionColumn, dataTableFeatures, resolvePath, rowMatchesSearch, useDataTableFilters, useDataTableInlineContents, useDataTableLoading, useDataTablePagination, useDataTableRows, useDataTableSearch, useDataTableSelection, useDataTableSorting, useNuqsAdapter };
@@ -3,15 +3,15 @@ import { t as Badge } from "./badge-BTNW_FEU.mjs";
3
3
  import { t as Button } from "./button-A1qTjZ8U.mjs";
4
4
  import { t as Checkbox } from "./checkbox-C6P12fio.mjs";
5
5
  import { t as Input } from "./input-j4tbmYYz.mjs";
6
- import { t as ResponsiveDropdown } from "./responsive-dropdown-fCmduKaz.mjs";
6
+ import { t as ResponsiveDropdown } from "./responsive-dropdown-n0Txkax5.mjs";
7
7
  import { i as SelectItem, l as SelectTrigger, n as SelectContent, t as Select, u as SelectValue } from "./select-DCU44UO6.mjs";
8
8
  import { Skeleton } from "./skeleton/index.mjs";
9
9
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "./table/index.mjs";
10
- import { t as Autocomplete } from "./autocomplete-DM6JYV4W.mjs";
11
- import { t as CalendarDatePicker } from "./calendar-date-picker-AzvSqjeS.mjs";
10
+ import { t as Autocomplete } from "./autocomplete-DZ_HSBak.mjs";
11
+ import { t as CalendarDatePicker } from "./calendar-date-picker-ynSGADfR.mjs";
12
12
  import { t as ActionRow } from "./action-row-DTvs91_3.mjs";
13
13
  import { n as useDebouncedSearchInput } from "./use-debounced-search-input-yu_F0QBt.mjs";
14
- import { t as MultiSelect } from "./multi-select-PHaMEbY-.mjs";
14
+ import { t as MultiSelect } from "./multi-select-PtdMChPF.mjs";
15
15
  import { ArrowDown, ArrowUp, ArrowUpDown, ChevronLeft, ChevronRight, MoreHorizontal, X } from "lucide-react";
16
16
  import { createContext, memo, use, useCallback, useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from "react";
17
17
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { G as getTimezoneOffset, U as formatTimezoneLabel, W as getBrowserTimezone } from "../picker-b5-x-EHs.mjs";
2
- import { t as CalendarDatePicker } from "../calendar-date-picker-AzvSqjeS.mjs";
3
- import { _ as getShortTimezoneDisplay, a as TimeRangePicker, b as utcToLocalInputString, c as getPresetByKey, d as TimezoneSelector, f as QuickRangesPanel, g as getDefaultTimezoneOptions, h as formatUtcForDisplay, i as formatTimeRangeDisplay, l as getPresetByShortcut, m as createTimezoneOption, n as formatDateForInput, o as DEFAULT_PRESETS, p as CustomRangePanel, r as formatSingleTimeDisplay, s as getDefaultPreset, t as toApiTimeRange, u as getPresetRange, v as localInputStringToUtc, x as zonedDateToUtcString, y as utcStringToZonedDate } from "../to-api-format-43Boq7OR.mjs";
1
+ import { M as getBrowserTimezone, N as getTimezoneOffset, j as formatTimezoneLabel } from "../date-time-range-picker-Dog33Ry0.mjs";
2
+ import { t as CalendarDatePicker } from "../calendar-date-picker-ynSGADfR.mjs";
3
+ import { _ as getShortTimezoneDisplay, a as TimeRangePicker, b as utcToLocalInputString, c as getPresetByKey, d as TimezoneSelector, f as QuickRangesPanel, g as getDefaultTimezoneOptions, h as formatUtcForDisplay, i as formatTimeRangeDisplay, l as getPresetByShortcut, m as createTimezoneOption, n as formatDateForInput, o as DEFAULT_PRESETS, p as CustomRangePanel, r as formatSingleTimeDisplay, s as getDefaultPreset, t as toApiTimeRange, u as getPresetRange, v as localInputStringToUtc, x as zonedDateToUtcString, y as utcStringToZonedDate } from "../to-api-format-WC7b9Mcv.mjs";
4
4
  export { CustomRangePanel as AbsoluteRangePanel, CustomRangePanel, CalendarDatePicker, DEFAULT_PRESETS, QuickRangesPanel, TimeRangePicker, TimezoneSelector, createTimezoneOption, formatDateForInput, formatSingleTimeDisplay, formatTimeRangeDisplay, formatTimezoneLabel, formatUtcForDisplay, getBrowserTimezone, getDefaultPreset, getDefaultTimezoneOptions, getPresetByKey, getPresetByShortcut, getPresetRange, getShortTimezoneDisplay, getTimezoneOffset, localInputStringToUtc, toApiTimeRange, utcStringToZonedDate, utcToLocalInputString, zonedDateToUtcString };
@@ -0,0 +1,2 @@
1
+ import { a as formatRelativeDate, c as getTimestamp, i as formatCombinedDate, l as getTimezoneAbbreviation, n as DEFAULT_DATE_FORMAT, o as formatTimezoneDate, r as formatAbsoluteDate, s as formatUTCDate, t as DateTime, u as parseDate } from "../date-time-CA-09lnw.mjs";
2
+ export { DEFAULT_DATE_FORMAT, DateTime, formatAbsoluteDate, formatCombinedDate, formatRelativeDate, formatTimezoneDate, formatUTCDate, getTimestamp, getTimezoneAbbreviation, parseDate };
@@ -0,0 +1,134 @@
1
+ import { t as cn } from "./utils-Bu32wN-x.mjs";
2
+ import { t as Tooltip } from "./tooltip-C_SL1imw.mjs";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { formatInTimeZone } from "date-fns-tz";
5
+ import { format, formatDistanceToNowStrict } from "date-fns";
6
+ import { enUS } from "date-fns/locale/en-US";
7
+ //#region src/components/features/date-time/formatters.ts
8
+ /** e.g. "June 12th at 11:30 AM" — used for absolute / table dates. */
9
+ const DEFAULT_DATE_FORMAT = "MMMM do 'at' h:mm a";
10
+ function getBrowserTimezone() {
11
+ try {
12
+ return new Intl.DateTimeFormat().resolvedOptions().timeZone;
13
+ } catch {
14
+ return "UTC";
15
+ }
16
+ }
17
+ function parseDate(date) {
18
+ const parsedDate = date instanceof Date ? date : new Date(date);
19
+ if (!date || Number.isNaN(parsedDate.getTime())) return null;
20
+ return parsedDate;
21
+ }
22
+ function formatAbsoluteDate(date, options) {
23
+ const formatString = options.format || "MMMM do 'at' h:mm a";
24
+ if (options.disableTimezone) return format(date, formatString, { locale: enUS });
25
+ return formatInTimeZone(date, options.timezone, formatString, { locale: enUS });
26
+ }
27
+ function formatRelativeDate(date, options) {
28
+ return formatDistanceToNowStrict(date, { addSuffix: options.addSuffix ?? true });
29
+ }
30
+ function getTimezoneAbbreviation(date, timezone) {
31
+ return formatInTimeZone(date, timezone, "zzz", { locale: enUS });
32
+ }
33
+ function formatCombinedDate(date, options, separator = " ") {
34
+ return `${formatAbsoluteDate(date, options)}${separator}(${formatRelativeDate(date, options)})`;
35
+ }
36
+ function formatUTCDate(date, format = "dd MMM yy HH:mm:ss") {
37
+ return formatInTimeZone(date, "UTC", format, { locale: enUS });
38
+ }
39
+ function formatTimezoneDate(date, timezone, format = "dd MMM yy HH:mm:ss") {
40
+ return formatInTimeZone(date, timezone, format, { locale: enUS });
41
+ }
42
+ /** Microseconds since epoch, matching the Datum DateTime tooltip. */
43
+ function getTimestamp(date) {
44
+ return (date.getTime() * 1e3).toString();
45
+ }
46
+ //#endregion
47
+ //#region src/components/features/date-time/date-time.tsx
48
+ /**
49
+ * Date display with the shared Datum hover tooltip (UTC, local zone, relative, epoch).
50
+ */
51
+ function DateTime({ date, variant = "detailed", format, addSuffix, tooltip = "auto", timezone, disableTimezone = false, className, separator = " ", timestamp, children }) {
52
+ if (!date) return null;
53
+ const parsedDate = parseDate(date);
54
+ if (!parsedDate) return null;
55
+ const timeZone = timezone ?? getBrowserTimezone();
56
+ const formatterOptions = {
57
+ timezone: timeZone,
58
+ disableTimezone,
59
+ format,
60
+ addSuffix
61
+ };
62
+ const shouldShowTooltip = tooltip !== false && !disableTimezone;
63
+ const textClass = cn("text-sm", shouldShowTooltip && "cursor-pointer", className);
64
+ const trigger = children ?? /* @__PURE__ */ jsx("time", {
65
+ dateTime: parsedDate.toISOString(),
66
+ className: textClass,
67
+ children: formatTriggerContent(parsedDate, variant, formatterOptions, separator)
68
+ });
69
+ if (!shouldShowTooltip) return trigger;
70
+ const showDetailedTooltip = variant === "detailed" || tooltip === "detailed";
71
+ return /* @__PURE__ */ jsx(Tooltip, {
72
+ message: getTooltipContent(parsedDate, variant, tooltip, formatterOptions, timeZone, timestamp),
73
+ contentClassName: showDetailedTooltip ? "min-w-64 text-left" : void 0,
74
+ children: trigger
75
+ });
76
+ }
77
+ function formatTriggerContent(date, variant, options, separator) {
78
+ switch (variant) {
79
+ case "relative": return formatRelativeDate(date, options);
80
+ case "both": return formatCombinedDate(date, options, separator);
81
+ default: return formatAbsoluteDate(date, options);
82
+ }
83
+ }
84
+ function getTooltipContent(date, variant, tooltip, options, timeZone, timestamp) {
85
+ if (variant === "detailed" || tooltip === "detailed") {
86
+ const rows = [
87
+ {
88
+ label: "UTC",
89
+ value: formatUTCDate(date)
90
+ },
91
+ {
92
+ label: timeZone.replaceAll("_", " "),
93
+ value: formatTimezoneDate(date, timeZone)
94
+ },
95
+ {
96
+ label: "Relative",
97
+ value: formatRelativeDate(date, options)
98
+ },
99
+ {
100
+ label: "Timestamp",
101
+ value: timestamp ?? getTimestamp(date)
102
+ }
103
+ ];
104
+ return /* @__PURE__ */ jsx("div", {
105
+ className: "space-y-2 text-xs",
106
+ children: rows.map((row) => /* @__PURE__ */ jsxs("div", {
107
+ className: "flex items-center justify-between gap-2",
108
+ children: [
109
+ /* @__PURE__ */ jsx("span", {
110
+ className: "font-medium",
111
+ children: row.label
112
+ }),
113
+ /* @__PURE__ */ jsx("span", { className: "mx-1 flex-1 border-b border-dotted border-current/50" }),
114
+ /* @__PURE__ */ jsx("span", {
115
+ className: "text-right",
116
+ children: row.value
117
+ })
118
+ ]
119
+ }, row.label))
120
+ });
121
+ }
122
+ if (tooltip === "timezone") return /* @__PURE__ */ jsx("p", { children: `${timeZone.replaceAll("_", " ")} (${getTimezoneAbbreviation(date, timeZone)})` });
123
+ if (tooltip === "alternate") {
124
+ if (variant === "relative") return formatAbsoluteDate(date, options);
125
+ if (variant === "absolute" || variant === "both") return formatRelativeDate(date, options);
126
+ }
127
+ if (tooltip === "auto" || tooltip === true) switch (variant) {
128
+ case "relative": return formatAbsoluteDate(date, options);
129
+ default: return /* @__PURE__ */ jsx("p", { children: `${timeZone.replaceAll("_", " ")} (${getTimezoneAbbreviation(date, timeZone)})` });
130
+ }
131
+ return null;
132
+ }
133
+ //#endregion
134
+ export { formatRelativeDate as a, getTimestamp as c, formatCombinedDate as i, getTimezoneAbbreviation as l, DEFAULT_DATE_FORMAT as n, formatTimezoneDate as o, formatAbsoluteDate as r, formatUTCDate as s, DateTime as t, parseDate as u };
@@ -1,2 +1,2 @@
1
- import { t as DateTimePicker } from "../date-time-picker-D3-DeNo8.mjs";
1
+ import { t as DateTimePicker } from "../date-time-picker-BzcHrf-A.mjs";
2
2
  export { DateTimePicker };
@@ -1,5 +1,5 @@
1
- import { i as DateTimePicker$1 } from "./picker-b5-x-EHs.mjs";
2
1
  import { t as useDeprecationWarning } from "./use-deprecation-warning-DXrGc0jX.mjs";
2
+ import { r as DateTimePicker$1 } from "./picker-raVuDxsh.mjs";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/components/features/date-time-picker/date-time-picker.tsx
5
5
  /**