@parallelworks/ui 0.83.2 → 0.84.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 (44) hide show
  1. package/dist/ai/adapter/openai/createOpenAIStream.js +1 -1
  2. package/dist/ai/adapter/openai/sse.d.ts +3 -2
  3. package/dist/ai/adapter/openai/sse.js +4 -2
  4. package/dist/ai/adapter/types.d.ts +2 -1
  5. package/dist/ai/agent/index.d.ts +1 -1
  6. package/dist/ai/agent/toolfmt.d.ts +1 -0
  7. package/dist/ai/agent/toolfmt.js +6 -2
  8. package/dist/ai/ai.css +30 -0
  9. package/dist/ai/components/ChatActivity.js +6 -4
  10. package/dist/ai/components/ChatInput.js +1 -1
  11. package/dist/ai/components/ChatMessage.js +42 -30
  12. package/dist/ai/components/ChatMessageList.js +18 -10
  13. package/dist/ai/components/agent/AgentMessageParts.d.ts +1 -1
  14. package/dist/ai/components/agent/AgentMessageParts.js +77 -23
  15. package/dist/ai/core/ChatProvider.d.ts +3 -1
  16. package/dist/ai/core/ChatProvider.js +27 -6
  17. package/dist/ai/core/chatReducer.d.ts +6 -1
  18. package/dist/ai/core/chatReducer.js +18 -1
  19. package/dist/ai/core/config.d.ts +2 -1
  20. package/dist/ai/core/parts.d.ts +7 -3
  21. package/dist/ai/core/parts.js +69 -25
  22. package/dist/ai/core/useSSEStream.d.ts +8 -0
  23. package/dist/ai/core/useSSEStream.js +80 -22
  24. package/dist/ai/index.js +2 -2
  25. package/dist/ai/types.d.ts +14 -0
  26. package/dist/components/Avatar.d.ts +4 -2
  27. package/dist/components/Avatar.js +2 -1
  28. package/dist/components/Kbd.d.ts +5 -2
  29. package/dist/components/Kbd.js +4 -1
  30. package/dist/components/LetterBadge.d.ts +7 -3
  31. package/dist/components/LetterBadge.js +2 -3
  32. package/dist/components/MarkdownImpl.d.ts +3 -0
  33. package/dist/components/MarkdownImpl.js +16 -2
  34. package/dist/components/RunStatusIcon.d.ts +5 -2
  35. package/dist/components/RunStatusIcon.js +2 -1
  36. package/dist/components/StatusBadge.d.ts +17 -11
  37. package/dist/components/StatusBadge.js +10 -5
  38. package/dist/components/Tag.d.ts +5 -3
  39. package/dist/components/Tag.js +7 -1
  40. package/dist/components/relativeTime.d.ts +12 -9
  41. package/dist/components/relativeTime.js +4 -2
  42. package/dist/index.d.ts +3 -3
  43. package/dist/styles.css +1 -1
  44. package/package.json +1 -1
@@ -1,10 +1,9 @@
1
1
  import { cx } from "../cx.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/components/LetterBadge.tsx
4
- /** A compact letter badge ("AI", "PUB", "SSH") used as a type mark in place of
5
- * an icon. Size the box and text via className (e.g. "h-5 w-5 text-[8px]"). */
6
- function LetterBadge({ text, className }) {
4
+ function LetterBadge({ text, className, ...rest }) {
7
5
  return /* @__PURE__ */ jsx("span", {
6
+ ...rest,
8
7
  className: cx("inline-flex shrink-0 items-center justify-center rounded-[3px] border theme-border font-bold leading-none tracking-tight text-(--theme-app)", className),
9
8
  children: text
10
9
  });
@@ -1,3 +1,6 @@
1
1
  import 'katex/dist/katex.min.css';
2
2
  import type { MarkdownProps } from './Markdown.js';
3
+ /** While a reply streams, a table's opening rows read as stray pipes until its
4
+ * delimiter row arrives; they are held back until then. */
5
+ export declare function withoutUnfinishedTable(text: string): string;
3
6
  export default function MarkdownImpl({ children, isStreaming, controls, components, httpsImagesOnly, compact, }: MarkdownProps): import("react").JSX.Element;
@@ -112,6 +112,20 @@ function makeCode(controls, diagrams) {
112
112
  });
113
113
  };
114
114
  }
115
+ var TABLE_ROW = /^\s*\|/;
116
+ var TABLE_DELIMITER = /^\s*\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)*\|?\s*$/;
117
+ /** While a reply streams, a table's opening rows read as stray pipes until its
118
+ * delimiter row arrives; they are held back until then. */
119
+ function withoutUnfinishedTable(text) {
120
+ if ((text.match(/^\s*(```|~~~)/gm)?.length ?? 0) % 2 === 1) return text;
121
+ const lines = text.split("\n");
122
+ let start = lines.length;
123
+ while (start > 0 && TABLE_ROW.test(lines[start - 1] ?? "")) start--;
124
+ if (start === lines.length) return text;
125
+ const rows = lines.slice(start);
126
+ if (rows.length >= 2 && TABLE_DELIMITER.test(rows[1] ?? "")) return text;
127
+ return lines.slice(0, start).join("\n");
128
+ }
115
129
  function MarkdownImpl({ children, isStreaming, controls, components, httpsImagesOnly, compact }) {
116
130
  const needsMermaid = !!children && children.includes("```mermaid");
117
131
  const [, setMermaidReady] = useState(() => !!pluginsWithMermaid);
@@ -158,9 +172,9 @@ function MarkdownImpl({ children, isStreaming, controls, components, httpsImages
158
172
  }),
159
173
  ...components
160
174
  },
161
- children: children || ""
175
+ children: (isStreaming ? withoutUnfinishedTable(children || "") : children) || ""
162
176
  })
163
177
  });
164
178
  }
165
179
  //#endregion
166
- export { MarkdownImpl as default };
180
+ export { MarkdownImpl as default, withoutUnfinishedTable };
@@ -1,3 +1,4 @@
1
+ import type { ComponentPropsWithRef } from 'react';
1
2
  import type { RunStatus } from '../engine.js';
2
3
  import { type Tone } from './tone.js';
3
4
  /** A status the icon shows: a run's, or one a host maps onto it, such as
@@ -6,7 +7,9 @@ export type RunStatusIconStatus = RunStatus | 'pending' | 'warning';
6
7
  /** The tone a run status reads in, so a badge that says the status in words matches the
7
8
  * icon: `<StatusBadge variant={runStatusTone(status)}>`. */
8
9
  export declare function runStatusTone(status: RunStatusIconStatus): Tone;
9
- export interface RunStatusIconProps {
10
+ /** Any other span attribute and the ref reach the icon's element, so it can be a Tooltip's or a
11
+ * popover's direct child. */
12
+ export interface RunStatusIconProps extends Omit<ComponentPropsWithRef<'span'>, 'children' | 'className'> {
10
13
  status: RunStatusIconStatus;
11
14
  /** Names the icon in place of `strings.dag.statusLabel`, for a host's own status
12
15
  * shown in a run's look, such as "Provisioning" as running. */
@@ -18,4 +21,4 @@ export interface RunStatusIconProps {
18
21
  /** A run's, job's or step's status as an icon in its tone, beside the name of what ran. It
19
22
  * is named by `label`, or else `strings.dag.statusLabel`. To say the status in words, use
20
23
  * `StatusBadge` with `runStatusTone`. */
21
- export declare function RunStatusIcon({ status, label: ownLabel, tooltip, className, }: RunStatusIconProps): import("react").JSX.Element;
24
+ export declare function RunStatusIcon({ status, label: ownLabel, tooltip, className, ...rest }: RunStatusIconProps): import("react").JSX.Element;
@@ -71,12 +71,13 @@ function runStatusTone(status) {
71
71
  /** A run's, job's or step's status as an icon in its tone, beside the name of what ran. It
72
72
  * is named by `label`, or else `strings.dag.statusLabel`. To say the status in words, use
73
73
  * `StatusBadge` with `runStatusTone`. */
74
- function RunStatusIcon({ status, label: ownLabel, tooltip = false, className }) {
74
+ function RunStatusIcon({ status, label: ownLabel, tooltip = false, className, ...rest }) {
75
75
  const { dag } = useStrings();
76
76
  const look = looks[status ?? ""];
77
77
  const Icon = look.icon;
78
78
  const label = ownLabel ?? dag.statusLabel(status ?? "");
79
79
  const icon = /* @__PURE__ */ jsx("span", {
80
+ ...rest,
80
81
  ...label ? {
81
82
  role: "img",
82
83
  "aria-label": label
@@ -1,4 +1,4 @@
1
- import type { ReactElement, ReactNode } from 'react';
1
+ import type { ComponentPropsWithRef, ReactElement, ReactNode } from 'react';
2
2
  import { type Tone } from './tone.js';
3
3
  /** A badge's tone: a status, or the theme's accent for something set apart that
4
4
  * isn't a status, such as "New". */
@@ -13,7 +13,9 @@ declare const sizeClasses: {
13
13
  readonly md: 'gap-1.5 py-0.5 text-[11px] leading-4';
14
14
  };
15
15
  export type BadgeSize = keyof typeof sizeClasses;
16
- export interface StatusBadgeProps {
16
+ /** Any other span attribute and the ref reach its element, so it can be a Tooltip's or a popover's
17
+ * direct child. */
18
+ export interface StatusBadgeProps extends Omit<ComponentPropsWithRef<'span'>, 'children' | 'className'> {
17
19
  /** Badge content */
18
20
  children: ReactNode;
19
21
  /** Visual variant */
@@ -41,8 +43,10 @@ export interface StatusBadgeProps {
41
43
  * dot rather than inside a badge. */
42
44
  export declare function statusTextClass(variant: BadgeVariant): string;
43
45
  /** A short status or label in a tone, such as "Running" or "Preview". */
44
- export declare function StatusBadge({ children, variant, emphasis, shape, caps, truncate, pulse, dot, size, render, className, }: StatusBadgeProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
45
- export interface CountBadgeProps {
46
+ export declare function StatusBadge({ children, variant, emphasis, shape, caps, truncate, pulse, dot, size, render, className, ref, ...rest }: StatusBadgeProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
47
+ /** Any other span attribute and the ref reach its element, so it can be a Tooltip's or a popover's
48
+ * direct child. */
49
+ export interface CountBadgeProps extends Omit<ComponentPropsWithRef<'span'>, 'children' | 'className'> {
46
50
  count: number;
47
51
  /** Above it, the count reads as `max` and a plus, such as "99+". */
48
52
  max?: number | undefined;
@@ -64,12 +68,14 @@ export interface CountBadgeProps {
64
68
  }
65
69
  /** A number beside a link or tab, such as unread messages or items waiting,
66
70
  * capped at `max` so a big count doesn't widen what it sits in. */
67
- export declare function CountBadge({ count, max, variant, emphasis, size, label, showZero, locale, className, }: CountBadgeProps): import("react").JSX.Element | null;
68
- interface StatusDotProps {
69
- variant?: BadgeVariant;
70
- pulse?: boolean;
71
- size?: number;
72
- className?: string;
71
+ export declare function CountBadge({ count, max, variant, emphasis, size, label, showZero, locale, className, ...rest }: CountBadgeProps): import("react").JSX.Element | null;
72
+ /** Any other span attribute and the ref reach its element, so it can be a Tooltip's or a popover's
73
+ * direct child. */
74
+ export interface StatusDotProps extends Omit<ComponentPropsWithRef<'span'>, 'children' | 'className'> {
75
+ variant?: BadgeVariant | undefined;
76
+ pulse?: boolean | undefined;
77
+ size?: number | undefined;
78
+ className?: string | undefined;
73
79
  }
74
- export declare function StatusDot({ variant, pulse, size, className, }: StatusDotProps): import("react").JSX.Element;
80
+ export declare function StatusDot({ variant, pulse, size, className, style, ...rest }: StatusDotProps): import("react").JSX.Element;
75
81
  export {};
@@ -3,6 +3,7 @@ import { toneFill, toneSurface, toneText } from "./tone.js";
3
3
  import { useStrings } from "./Provider.js";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { useRender } from "@base-ui/react/use-render";
6
+ import { mergeProps } from "@base-ui/react/merge-props";
6
7
  //#region src/components/StatusBadge.tsx
7
8
  var emphasisClasses = {
8
9
  soft: {
@@ -56,11 +57,12 @@ function statusTextClass(variant) {
56
57
  return variant === "accent" ? "text-(--theme-link)" : toneText[variant];
57
58
  }
58
59
  /** A short status or label in a tone, such as "Running" or "Preview". */
59
- function StatusBadge({ children, variant = "default", emphasis = "soft", shape = "pill", caps = false, truncate = false, pulse = false, dot = false, size = "sm", render, className }) {
60
+ function StatusBadge({ children, variant = "default", emphasis = "soft", shape = "pill", caps = false, truncate = false, pulse = false, dot = false, size = "sm", render, className, ref, ...rest }) {
60
61
  const indicator = emphasis === "solid" ? "bg-current" : dotFill[variant];
61
62
  return useRender({
62
63
  render: render ?? /* @__PURE__ */ jsx("span", {}),
63
- props: {
64
+ ref,
65
+ props: mergeProps(rest, {
64
66
  className: cx("inline-flex items-center border font-medium no-underline", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--theme-focus)", sizeClasses[size], padClasses[shape][size], shapeClasses[shape], caps && "uppercase tracking-wider", truncate && "min-w-0 max-w-full", emphasisClasses[emphasis][variant], className),
65
67
  children: /* @__PURE__ */ jsxs(Fragment, { children: [
66
68
  pulse && /* @__PURE__ */ jsxs("span", {
@@ -73,7 +75,7 @@ function StatusBadge({ children, variant = "default", emphasis = "soft", shape =
73
75
  children
74
76
  }) : children
75
77
  ] })
76
- }
78
+ })
77
79
  });
78
80
  }
79
81
  var countSizeClasses = {
@@ -82,12 +84,13 @@ var countSizeClasses = {
82
84
  };
83
85
  /** A number beside a link or tab, such as unread messages or items waiting,
84
86
  * capped at `max` so a big count doesn't widen what it sits in. */
85
- function CountBadge({ count, max = 99, variant = "accent", emphasis = "solid", size = "md", label, showZero = false, locale, className }) {
87
+ function CountBadge({ count, max = 99, variant = "accent", emphasis = "solid", size = "md", label, showZero = false, locale, className, ...rest }) {
86
88
  const { common } = useStrings();
87
89
  if (count <= 0 && !showZero) return null;
88
90
  const number = new Intl.NumberFormat(locale);
89
91
  const text = count > max ? common.countOverflow(number.format(max)) : number.format(count);
90
92
  return /* @__PURE__ */ jsxs("span", {
93
+ ...rest,
91
94
  "data-count": count,
92
95
  className: cx("inline-flex shrink-0 items-center justify-center rounded-full font-semibold tabular-nums", countSizeClasses[size], emphasisClasses[emphasis][variant], className),
93
96
  children: [text, label && /* @__PURE__ */ jsxs("span", {
@@ -96,10 +99,12 @@ function CountBadge({ count, max = 99, variant = "accent", emphasis = "solid", s
96
99
  })]
97
100
  });
98
101
  }
99
- function StatusDot({ variant = "default", pulse = false, size = 8, className }) {
102
+ function StatusDot({ variant = "default", pulse = false, size = 8, className, style, ...rest }) {
100
103
  return /* @__PURE__ */ jsxs("span", {
104
+ ...rest,
101
105
  className: cx("relative inline-flex", className),
102
106
  style: {
107
+ ...style,
103
108
  width: size,
104
109
  height: size
105
110
  },
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
2
  export interface TagStyle {
3
3
  /** Monospace text, for a value read as code, such as a key=value label. */
4
4
  mono?: boolean | undefined;
@@ -8,7 +8,9 @@ export interface TagStyle {
8
8
  /** The one tag look: a pill with a hairline border and 11px text. Another component's chip,
9
9
  * such as a picker's chosen value, uses it to look the same. */
10
10
  export declare function tagClasses({ mono, caps }?: TagStyle): string;
11
- export interface TagProps extends TagStyle {
11
+ /** Any other attribute and the ref reach the tag's element, its link with `href` and no `onRemove`,
12
+ * so it can be a Tooltip's or a popover's direct child. */
13
+ export interface TagProps extends TagStyle, Omit<ComponentPropsWithRef<'span'>, 'children' | 'className' | 'color' | 'title'> {
12
14
  children: ReactNode;
13
15
  /** A dot before the text in this color, any CSS color, such as a label's own. */
14
16
  color?: string | undefined;
@@ -23,7 +25,7 @@ export interface TagProps extends TagStyle {
23
25
  }
24
26
  /** A tag or label on a thing: a pill with an optional color dot, a link with `href`, and an ×
25
27
  * with `onRemove`. */
26
- export declare function Tag({ children, color, href, onRemove, removeLabel, title, mono, caps, className, }: TagProps): import("react").JSX.Element;
28
+ export declare function Tag({ children, color, href, onRemove, removeLabel, title, mono, caps, className, ref, ...rest }: TagProps): import("react").JSX.Element;
27
29
  /** One tag of a `TagList`: a string is its own key and label. */
28
30
  export type TagItem = string | {
29
31
  key: string;
@@ -13,7 +13,7 @@ function tagClasses({ mono = false, caps = false } = {}) {
13
13
  }
14
14
  /** A tag or label on a thing: a pill with an optional color dot, a link with `href`, and an ×
15
15
  * with `onRemove`. */
16
- function Tag({ children, color, href, onRemove, removeLabel, title, mono, caps, className }) {
16
+ function Tag({ children, color, href, onRemove, removeLabel, title, mono, caps, className, ref, ...rest }) {
17
17
  const { dropdown } = useStrings();
18
18
  const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [color && /* @__PURE__ */ jsx("span", {
19
19
  "aria-hidden": "true",
@@ -29,17 +29,23 @@ function Tag({ children, color, href, onRemove, removeLabel, title, mono, caps,
29
29
  }), className);
30
30
  const hover = "transition-colors hover:bg-(--theme-hover)";
31
31
  if (!onRemove) return href ? /* @__PURE__ */ jsx(AppLink, {
32
+ ...rest,
33
+ ref,
32
34
  href,
33
35
  title,
34
36
  className: cx(classes, hover, "no-underline"),
35
37
  children: content
36
38
  }) : /* @__PURE__ */ jsx("span", {
39
+ ...rest,
40
+ ref,
37
41
  title,
38
42
  className: classes,
39
43
  children: content
40
44
  });
41
45
  const name = removeLabel ?? dropdown.removeValue(typeof children === "string" ? children : "");
42
46
  return /* @__PURE__ */ jsxs("span", {
47
+ ...rest,
48
+ ref,
43
49
  title,
44
50
  className: cx(classes, "pr-0.5"),
45
51
  children: [href ? /* @__PURE__ */ jsx(AppLink, {
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
2
  import { type DateTimeStyle, type TimeValue } from '../format.js';
3
3
  export type { TimeValue };
4
4
  /** Something worked out from the time, kept current by one clock that ticks
@@ -15,7 +15,8 @@ export type RelativeTimeFormat = 'long' | 'compact';
15
15
  /** How long ago, or until, `value` is, kept current as time passes. Empty for
16
16
  * a missing or invalid time. */
17
17
  export declare function useRelativeTime(value: TimeValue, format?: RelativeTimeFormat): string;
18
- export interface RelativeTimeProps {
18
+ /** Any other attribute and the ref reach the `<time>`, so it can be a popover's direct child. */
19
+ export interface RelativeTimeProps extends Omit<ComponentPropsWithRef<'time'>, 'children' | 'className' | 'dateTime'> {
19
20
  value: TimeValue;
20
21
  format?: RelativeTimeFormat | undefined;
21
22
  /** Shown in place of a missing or invalid time, such as "Never" or "—". Default nothing. */
@@ -31,17 +32,19 @@ export interface RelativeTimeProps {
31
32
  /** A time shown relative to now ("5 minutes ago", or "5m" compact), counting
32
33
  * on while it stays on screen, with the exact time on hover. Renders the
33
34
  * `fallback`, or nothing, for a missing time. */
34
- export declare function RelativeTime({ value, format, fallback, exact, show, className, }: RelativeTimeProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null;
35
+ export declare function RelativeTime({ value, format, fallback, exact, show, className, ...rest }: RelativeTimeProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null;
35
36
  /** Milliseconds from `start` to `end`, or to now while `running`, in whole
36
37
  * seconds so it changes at most once a second. Running defaults to having no
37
38
  * end; pass false for something that stopped without recording when. Null
38
39
  * without a start. */
39
40
  export declare function useElapsed(start: TimeValue, end?: TimeValue, running?: boolean): number | null;
40
- /** How long something took, or has taken so far while it runs: 45s, 2m 13s.
41
- * Renders nothing without a start. */
42
- export declare function Elapsed({ start, end, running, className, }: {
41
+ /** Any other attribute and the ref reach the `<time>`, so it can be a Tooltip's direct child. */
42
+ export interface ElapsedProps extends Omit<ComponentPropsWithRef<'time'>, 'children' | 'className' | 'dateTime'> {
43
43
  start: TimeValue;
44
44
  end?: TimeValue;
45
- running?: boolean;
46
- className?: string;
47
- }): import("react").JSX.Element | null;
45
+ running?: boolean | undefined;
46
+ className?: string | undefined;
47
+ }
48
+ /** How long something took, or has taken so far while it runs: 45s, 2m 13s.
49
+ * Renders nothing without a start. */
50
+ export declare function Elapsed({ start, end, running, className, ...rest }: ElapsedProps): import("react").JSX.Element | null;
@@ -100,7 +100,7 @@ function useRelativeTime(value, format = "long") {
100
100
  /** A time shown relative to now ("5 minutes ago", or "5m" compact), counting
101
101
  * on while it stays on screen, with the exact time on hover. Renders the
102
102
  * `fallback`, or nothing, for a missing time. */
103
- function RelativeTime({ value, format = "long", fallback = null, exact = "seconds", show = "relative", className }) {
103
+ function RelativeTime({ value, format = "long", fallback = null, exact = "seconds", show = "relative", className, ...rest }) {
104
104
  const label = useRelativeTime(value, format);
105
105
  const locale = useLocale();
106
106
  const time = toDateTime(value);
@@ -108,6 +108,7 @@ function RelativeTime({ value, format = "long", fallback = null, exact = "second
108
108
  const absolute = formatDateTime(time, exact || "seconds", locale);
109
109
  const [text, tip] = show === "absolute" ? [absolute, label] : [label, exact ? absolute : null];
110
110
  const element = /* @__PURE__ */ jsx("time", {
111
+ ...rest,
111
112
  dateTime: time.toISO() ?? void 0,
112
113
  className,
113
114
  children: text
@@ -129,11 +130,12 @@ function useElapsed(start, end, running = toDateTime(end) === null) {
129
130
  }
130
131
  /** How long something took, or has taken so far while it runs: 45s, 2m 13s.
131
132
  * Renders nothing without a start. */
132
- function Elapsed({ start, end, running, className }) {
133
+ function Elapsed({ start, end, running, className, ...rest }) {
133
134
  const elapsed = useElapsed(start, end, running);
134
135
  const locale = useLocale();
135
136
  if (elapsed === null) return null;
136
137
  return /* @__PURE__ */ jsx("time", {
138
+ ...rest,
137
139
  dateTime: Duration.fromMillis(elapsed).toISO() ?? void 0,
138
140
  className,
139
141
  children: formatDuration(elapsed, locale)
package/dist/index.d.ts CHANGED
@@ -32,7 +32,7 @@ export { IconButton, type IconButtonProps } from './components/IconButton.js';
32
32
  export { formatInfoTipContent, InfoTip } from './components/InfoTip.js';
33
33
  export { Input, type InputProps, Textarea, type TextareaProps, TitleInput, type TitleInputProps, } from './components/Input.js';
34
34
  export { ariaKeyShortcuts, formatShortcut, isApplePlatform, Kbd, type KbdProps, type KbdSize, type KbdVariant, type KeyPlatform, shortcutText, useShortcutFormat, } from './components/Kbd.js';
35
- export { LetterBadge } from './components/LetterBadge.js';
35
+ export { LetterBadge, type LetterBadgeProps } from './components/LetterBadge.js';
36
36
  export { ListboxGroup, type ListboxNavigation, type ListboxNavigationOptions, ListboxOption, type ListboxOptionProps, ListboxPanel, type ListboxPanelProps, useListboxNavigation, } from './components/Listbox.js';
37
37
  export { Loader, type LoaderProps } from './components/Loader.js';
38
38
  export type { MarkdownProps } from './components/Markdown.js';
@@ -53,7 +53,7 @@ export { Radio, RadioGroup, type RadioProps } from './components/Radio.js';
53
53
  export { RefreshButton, type RefreshButtonProps } from './components/RefreshButton.js';
54
54
  export { RequiredMark } from './components/RequiredMark.js';
55
55
  export { RunStatusIcon, type RunStatusIconProps, type RunStatusIconStatus, runStatusTone, } from './components/RunStatusIcon.js';
56
- export { Elapsed, RelativeTime, type RelativeTimeFormat, type RelativeTimeProps, useClock, useElapsed, useRelativeTime, } from './components/relativeTime.js';
56
+ export { Elapsed, type ElapsedProps, RelativeTime, type RelativeTimeFormat, type RelativeTimeProps, useClock, useElapsed, useRelativeTime, } from './components/relativeTime.js';
57
57
  export { SearchInput, type SearchInputProps } from './components/SearchInput.js';
58
58
  export { Section, type SectionProps, type SectionTone, type SectionVariant, } from './components/Section.js';
59
59
  export { SegmentedControl, type SegmentedControlRootProps, type SegmentedOption, } from './components/SegmentedControl.js';
@@ -63,7 +63,7 @@ export { SettingModeOption } from './components/SettingModeOption.js';
63
63
  export { SettingRow, SettingsCard, type SettingsCardProps, SettingsHeading, } from './components/SettingsCard.js';
64
64
  export { LoadingRegion, Skeleton, type SkeletonProps } from './components/Skeleton.js';
65
65
  export { Slider, type SliderProps } from './components/Slider.js';
66
- export { type BadgeEmphasis, type BadgeShape, type BadgeSize, type BadgeVariant, CountBadge, type CountBadgeProps, StatusBadge, type StatusBadgeProps, StatusDot, statusTextClass, } from './components/StatusBadge.js';
66
+ export { type BadgeEmphasis, type BadgeShape, type BadgeSize, type BadgeVariant, CountBadge, type CountBadgeProps, StatusBadge, type StatusBadgeProps, StatusDot, type StatusDotProps, statusTextClass, } from './components/StatusBadge.js';
67
67
  export { StickyBar, type StickyBarProps } from './components/StickyBar.js';
68
68
  export { Switch, type SwitchProps } from './components/Switch.js';
69
69
  export type { SegmentTone } from './components/segmented.js';