@ciridae/ui 1.0.3 → 1.0.4

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 (124) hide show
  1. package/dist/chat/conversation-source.d.ts +15 -1
  2. package/dist/chat/describe-tool-call.d.ts +3 -3
  3. package/dist/chat/describe-tool-call.js +3 -3
  4. package/dist/chat/message-text.js +2 -2
  5. package/dist/ciridae.css +16 -4
  6. package/dist/components/activity-feed.d.ts +1 -0
  7. package/dist/components/activity-feed.js +1 -0
  8. package/dist/components/app-frame.d.ts +13 -1
  9. package/dist/components/app-frame.js +45 -3
  10. package/dist/components/app-navigation.d.ts +28 -1
  11. package/dist/components/app-navigation.js +105 -14
  12. package/dist/components/badge.d.ts +29 -4
  13. package/dist/components/badge.js +134 -15
  14. package/dist/components/bulk-action-bar.js +3 -3
  15. package/dist/components/button.d.ts +10 -3
  16. package/dist/components/button.js +77 -44
  17. package/dist/components/calendar.js +44 -17
  18. package/dist/components/centered-page.js +2 -2
  19. package/dist/components/chart.d.ts +1 -1
  20. package/dist/components/chart.js +16 -11
  21. package/dist/components/chat-client-source.js +47 -6
  22. package/dist/components/chat-sheet-controller.d.ts +1 -0
  23. package/dist/components/chat-sheet-controller.js +1 -0
  24. package/dist/components/chat-sheet.d.ts +10 -2
  25. package/dist/components/chat-sheet.js +76 -39
  26. package/dist/components/chat.d.ts +90 -14
  27. package/dist/components/chat.js +402 -101
  28. package/dist/components/checkbox-item.d.ts +5 -2
  29. package/dist/components/checkbox-item.js +9 -5
  30. package/dist/components/chip.d.ts +5 -0
  31. package/dist/components/chip.js +27 -1
  32. package/dist/components/column-settings.js +1 -1
  33. package/dist/components/command-menu.d.ts +5 -1
  34. package/dist/components/command-menu.js +98 -32
  35. package/dist/components/command-palette.d.ts +6 -2
  36. package/dist/components/command-palette.js +20 -10
  37. package/dist/components/data-display.d.ts +35 -4
  38. package/dist/components/data-display.js +138 -19
  39. package/dist/components/data-grid.d.ts +14 -2
  40. package/dist/components/data-grid.js +61 -26
  41. package/dist/components/date-range-picker.js +9 -20
  42. package/dist/components/drawer.d.ts +5 -0
  43. package/dist/components/drawer.js +91 -54
  44. package/dist/components/editable-field.d.ts +12 -3
  45. package/dist/components/editable-field.js +57 -27
  46. package/dist/components/email-input.js +6 -5
  47. package/dist/components/environment-frame.d.ts +1 -1
  48. package/dist/components/environment-frame.js +37 -6
  49. package/dist/components/filter-bar.js +39 -28
  50. package/dist/components/form-controls.d.ts +9 -0
  51. package/dist/components/form-controls.js +46 -22
  52. package/dist/components/form-layout.d.ts +7 -3
  53. package/dist/components/form-layout.js +68 -23
  54. package/dist/components/glass-menu.d.ts +3 -0
  55. package/dist/components/glass-menu.js +63 -0
  56. package/dist/components/gradient-edge.d.ts +9 -0
  57. package/dist/components/gradient-edge.js +31 -0
  58. package/dist/components/input.d.ts +4 -2
  59. package/dist/components/input.js +26 -15
  60. package/dist/components/keycap.d.ts +9 -5
  61. package/dist/components/keycap.js +57 -19
  62. package/dist/components/lightbox.js +2 -1
  63. package/dist/components/locale.d.ts +10 -0
  64. package/dist/components/locale.js +18 -2
  65. package/dist/components/log-entry.d.ts +40 -0
  66. package/dist/components/log-entry.js +146 -0
  67. package/dist/components/mention-input.js +4 -3
  68. package/dist/components/menu.d.ts +6 -2
  69. package/dist/components/menu.js +34 -37
  70. package/dist/components/meter.d.ts +9 -1
  71. package/dist/components/meter.js +64 -6
  72. package/dist/components/navigation.d.ts +21 -4
  73. package/dist/components/navigation.js +84 -19
  74. package/dist/components/notification-tray.js +5 -4
  75. package/dist/components/overlays.d.ts +3 -1
  76. package/dist/components/overlays.js +69 -40
  77. package/dist/components/page-frame.js +1 -1
  78. package/dist/components/panel.d.ts +1 -1
  79. package/dist/components/panel.js +18 -12
  80. package/dist/components/radio-card.js +10 -9
  81. package/dist/components/record.d.ts +25 -1
  82. package/dist/components/record.js +147 -18
  83. package/dist/components/segmented-bar.d.ts +3 -1
  84. package/dist/components/segmented-bar.js +16 -6
  85. package/dist/components/select.d.ts +5 -2
  86. package/dist/components/select.js +103 -127
  87. package/dist/components/shell-skeleton.js +1 -1
  88. package/dist/components/shell.d.ts +2 -2
  89. package/dist/components/shell.js +43 -45
  90. package/dist/components/sidebar.d.ts +7 -2
  91. package/dist/components/sidebar.js +55 -27
  92. package/dist/components/single-line-text.d.ts +2 -0
  93. package/dist/components/single-line-text.js +16 -0
  94. package/dist/components/site-banner.d.ts +5 -2
  95. package/dist/components/site-banner.js +17 -6
  96. package/dist/components/skeleton.d.ts +7 -6
  97. package/dist/components/skeleton.js +28 -16
  98. package/dist/components/skeletons.d.ts +12 -0
  99. package/dist/components/skeletons.js +71 -8
  100. package/dist/components/stages.d.ts +78 -6
  101. package/dist/components/stages.js +512 -156
  102. package/dist/components/stat-card.d.ts +10 -2
  103. package/dist/components/stat-card.js +92 -37
  104. package/dist/components/status-banner.js +1 -1
  105. package/dist/components/tabs.js +26 -13
  106. package/dist/components/theme-toggle.d.ts +4 -0
  107. package/dist/components/theme-toggle.js +67 -0
  108. package/dist/components/toast.d.ts +9 -2
  109. package/dist/components/toast.js +78 -29
  110. package/dist/preset.js +289 -33
  111. package/dist/styled-system/styles.css +3115 -1044
  112. package/dist/styled-system/tokens/index.mjs +598 -22
  113. package/dist/styled-system/tokens/tokens.d.ts +11 -11
  114. package/dist/styled-system/types/prop-type.d.ts +2 -2
  115. package/dist/styles.css +16 -4
  116. package/dist/theme/color.d.ts +3 -0
  117. package/dist/theme/color.js +5 -0
  118. package/dist/theme/derive.d.ts +9 -2
  119. package/dist/theme/derive.js +72 -12
  120. package/dist/theme/palettes.d.ts +49 -6
  121. package/dist/theme/palettes.js +84 -15
  122. package/dist/theme/tokens.d.ts +3 -3
  123. package/dist/theme/tokens.js +107 -32
  124. package/package.json +9 -1
@@ -26,6 +26,12 @@ export type ChatComposerProps = Omit<ComponentProps<"div">, "onSubmit"> & {
26
26
  * attach as a drop or the picker would. Rich text pasted with a picture of itself stays text.
27
27
  */
28
28
  onPasteFiles?: (files: File[]) => void;
29
+ /**
30
+ * While the host takes dictation: the microphone's levels, drawn as a waveform beside the
31
+ * tools. The host owns the microphone and its controls, such as Cancel and Insert in `actions`,
32
+ * and writes what it heard into the text.
33
+ */
34
+ dictation?: ChatDictation;
29
35
  /**
30
36
  * `page` is a chat page's wide card; `sheet` the field at the foot of the agent sheet; `feed`
31
37
  * a comment field, which sends on Cmd/Ctrl+Enter rather than Enter.
@@ -41,21 +47,49 @@ export type ChatComposerProps = Omit<ComponentProps<"div">, "onSubmit"> & {
41
47
  /** Props for the text field itself, such as a ref. */
42
48
  inputProps?: Omit<ComponentProps<"div">, "children" | "defaultValue" | "onChange" | "onSubmit" | "placeholder">;
43
49
  };
44
- export declare function ChatComposer({ value, defaultValue, onValueChange, onSend, placeholder, ariaLabel: ownAriaLabel, tools, actions, submitLabel: ownSubmitLabel, sendDisabled, sendsWithoutText, attachments, onPasteFiles, variant, autoFocus, mentions, mentionMark, mentionsLabel, inputProps, className, ...props }: ChatComposerProps): import("react").JSX.Element;
50
+ export declare function ChatComposer({ value, defaultValue, onValueChange, onSend, placeholder, ariaLabel: ownAriaLabel, tools, actions, submitLabel: ownSubmitLabel, sendDisabled, sendsWithoutText, attachments, onPasteFiles, dictation, variant, autoFocus, mentions, mentionMark, mentionsLabel, inputProps, className, ...props }: ChatComposerProps): import("react").JSX.Element;
51
+ /** A tool for the sheet composer's bar, such as the paperclip: its icon alone. */
52
+ export declare function ChatComposerTool({ className, ...props }: Omit<ComponentProps<"button">, "aria-label"> & {
53
+ "aria-label": string;
54
+ }): import("react").JSX.Element;
55
+ /** The microphone's loudness while the host takes dictation, each level 0 to 1, newest last. */
56
+ export type ChatDictation = {
57
+ levels: readonly number[];
58
+ listening: boolean;
59
+ };
60
+ /**
61
+ * Dictation's waveform: a bar per level, each as tall as its level; flat while `listening` is
62
+ * off, such as while the host turns what it heard into text.
63
+ */
64
+ export declare function ChatDictationWaveform({ levels, listening, className, ...props }: ComponentProps<"div"> & ChatDictation): import("react").JSX.Element;
45
65
  export type ChatBubbleProps = ComponentProps<"div"> & {
46
66
  side: "user" | "assistant";
47
67
  /** Where the bubble sits in its run of messages from one side; see `listMessageGroupPositions`. */
48
68
  groupPosition?: "single" | "first" | "middle" | "last";
49
69
  };
50
- /** A message bubble in the agent sheet. */
70
+ /** A message bubble: the user's raised on the right, another author's filled on the left. */
51
71
  export declare function ChatBubble({ side, groupPosition, className, ...props }: ChatBubbleProps): import("react").JSX.Element;
52
72
  /** A centered line between bubbles: a finished tool call, a decision, something the page did. */
53
73
  export declare function ChatSystemLine({ tone, className, ...props }: ComponentProps<"div"> & {
54
74
  tone?: "muted" | "error";
55
75
  }): import("react").JSX.Element;
56
- /** Three pulsing dots: the assistant is typing. */
57
- export declare function ChatTypingDots({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
58
76
  export declare function ChatAction({ className, ...props }: ComponentProps<"button">): import("react").JSX.Element;
77
+ export type ChatSourceCardProps = {
78
+ /** The source's name, such as "Vendor portal" or a rule's. */
79
+ label: ReactNode;
80
+ icon?: ReactNode;
81
+ /** What the source says that the reply relies on. */
82
+ children: ReactNode;
83
+ /** Under it, who entered it or when. */
84
+ meta?: ReactNode;
85
+ /** `yellow` marks a source the reply weighs, such as one of two rules in conflict. */
86
+ tone?: "neutral" | "yellow";
87
+ /** Makes the card a link to the source. */
88
+ href?: string;
89
+ className?: string;
90
+ };
91
+ /** A source cited in a reply, as a card of what it says under its name. */
92
+ export declare function ChatSourceCard({ label, icon, children, meta, tone, href, className, }: ChatSourceCardProps): import("react").JSX.Element;
59
93
  /** Who wrote a message: drawn as the avatar beside its group and named in the group's footer. */
60
94
  export type ChatAuthor = {
61
95
  name: string;
@@ -75,16 +109,39 @@ export type ChatAttachment = {
75
109
  url?: string | null;
76
110
  mediaType?: string;
77
111
  };
78
- /** A source a reply cites, linked when it has an `href`. */
112
+ /**
113
+ * A source a reply cites: a link in the row under it, linked when it has an `href`; with a
114
+ * `quote`, a `ChatSourceCard` of what it says.
115
+ */
79
116
  export type ChatSource = {
80
117
  id: string;
81
118
  label: ReactNode;
82
119
  href?: string;
120
+ /** What the source says that the reply relies on, such as a value or a rule. */
121
+ quote?: ReactNode;
122
+ /** Leads the card's label, such as the source's kind as an icon. */
123
+ icon?: ReactNode;
124
+ /** Under the card's quote: who entered it, or when. */
125
+ meta?: ReactNode;
126
+ tone?: ChatSourceCardProps["tone"];
127
+ };
128
+ /** A step the agent took on its way to a reply: a thought, or a tool it called. */
129
+ export type ChatStep = {
130
+ id: string;
131
+ kind: "reasoning" | "tool";
132
+ /** What it did, as one line, such as "Search invoices". */
133
+ title: string;
134
+ /**
135
+ * More about it, such as the rest of the thought. Everyone reading the thread sees it, so never
136
+ * a tool call's raw arguments.
137
+ */
138
+ detail?: string;
139
+ status: "running" | "completed" | "failed";
83
140
  };
84
141
  /**
85
- * One entry of a thread: a message from either side, a centered line, the assistant typing, a
86
- * failure with its retry, or something of the caller's own, such as an
87
- * approval card, drawn by `renderCustom` in the side's flow.
142
+ * One entry of a thread: a message from either side, a centered line, the agent at work, the
143
+ * steps it took, a failure with its retry, or something of the caller's own, such as an approval
144
+ * card, drawn by `renderCustom` in the side's flow.
88
145
  */
89
146
  export type ChatThreadEntry<Custom = never> = {
90
147
  id: string;
@@ -98,20 +155,32 @@ export type ChatThreadEntry<Custom = never> = {
98
155
  attachments?: readonly ChatAttachment[];
99
156
  /** Still on its way: the footer says Sending in place of the time. */
100
157
  sending?: boolean;
101
- /** What the reply cites, in a row under it. */
158
+ /** What the reply cites: links in a row under it, and the ones with a quote as cards. */
102
159
  sources?: readonly ChatSource[];
103
- /** Controls at the end of the group's footer, such as Copy. */
160
+ /** Controls beside the message, shown while it is hovered or focused, such as Copy. */
104
161
  actions?: ReactNode;
162
+ /** Buttons under the message for what it suggests doing, always shown. */
163
+ suggestedActions?: ReactNode;
164
+ /** A closing line under the message, such as what the reply read. */
165
+ footnote?: ReactNode;
105
166
  } | {
106
167
  kind: "line";
107
168
  text: ReactNode;
108
169
  tone?: "muted" | "error";
109
- } | {
170
+ }
171
+ /** The agent at work before its reply: what it is doing, the locale's "Working" by default. */
172
+ | {
110
173
  kind: "typing";
111
174
  label?: ReactNode;
112
175
  } | {
176
+ kind: "steps";
177
+ steps: readonly ChatStep[];
178
+ }
179
+ /** A reply that did not finish: `title` over why, and Try again under it. */
180
+ | {
113
181
  kind: "failure";
114
- message: ReactNode;
182
+ title?: ReactNode;
183
+ message?: ReactNode;
115
184
  onRetry: () => void;
116
185
  } | {
117
186
  kind: "custom";
@@ -126,8 +195,15 @@ export type ChatThreadProps<Custom = never> = {
126
195
  renderCustom?: (data: Custom) => ReactNode;
127
196
  /** How a footer writes the time; the time of day, dated once not today, otherwise. */
128
197
  formatTime?: (at: number) => string;
129
- /** `compact` trims the padding around the thread and between groups, as the agent sheet does. */
198
+ /** `compact` trims the padding around the thread and between groups. */
130
199
  density?: "comfortable" | "compact";
200
+ /**
201
+ * `bubble`, the default, draws every message in a bubble, the assistant's beside its author's
202
+ * avatar, with the author and time under each group. `plain` draws the assistant's replies as
203
+ * text on the sheet, the thread's full width, with no avatar and no author or time, as the
204
+ * agent sheet does.
205
+ */
206
+ replyStyle?: "bubble" | "plain";
131
207
  /** Draws a message's files as tiles over its bubble, rather than as names inside it. */
132
208
  attachmentTiles?: boolean;
133
209
  /** Heads each day's entries with its date, for a thread that runs over days. */
@@ -139,7 +215,7 @@ export type ChatThreadProps<Custom = never> = {
139
215
  resolveAttachmentUrl?: ResolveFileUrl<ChatAttachment>;
140
216
  className?: string;
141
217
  };
142
- export declare function ChatThread<Custom = never>({ entries, assistant, renderCustom, formatTime, density, attachmentTiles, dayLabels, resolveAttachmentUrl, className, }: ChatThreadProps<Custom>): import("react").JSX.Element;
218
+ export declare function ChatThread<Custom = never>({ entries, assistant, renderCustom, formatTime, density, replyStyle, attachmentTiles, dayLabels, resolveAttachmentUrl, className, }: ChatThreadProps<Custom>): import("react").JSX.Element;
143
219
  export type ChatSuggestionsProps = {
144
220
  suggestions: readonly string[];
145
221
  onSelect: (suggestion: string) => void;