impact-nova 3.0.0-alpha.10 → 3.0.0-alpha.11
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/components/flows/iris-chat/IrisChatHeaderWindowSizeButton.js +45 -36
- package/dist/components/flows/iris-chat/IrisChatSnapTile.d.ts +8 -0
- package/dist/components/flows/iris-chat/IrisChatSnapTile.js +30 -0
- package/dist/components/flows/iris-chat/IrisChatWindowSnapMenu.js +67 -53
- package/dist/components/flows/iris-chat/iris-chat-frame.d.ts +2 -1
- package/dist/components/flows/iris-chat/iris-chat-frame.js +40 -31
- package/dist/components/flows/iris-chat/iris-chat-snap-presets.d.ts +4 -1
- package/dist/components/flows/iris-chat/iris-chat-snap-presets.js +49 -29
- package/dist/components/flows/iris-chat/iris-chat-thread.js +95 -96
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.js +5 -2
- package/dist/components/flows/iris-chat/use-iris-chat-root.js +83 -88
- package/dist/i18n/defaultMessages.d.ts +5 -0
- package/dist/i18n/defaultMessages.js +7 -2
- package/dist/i18n/locales/de.js +5 -0
- package/dist/i18n/locales/es.js +5 -0
- package/dist/i18n/locales/hi.js +5 -0
- package/dist/i18n/locales/kn.js +5 -0
- package/dist/impact-nova.css +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -1,65 +1,64 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e, Fragment as J } from "react/jsx-runtime";
|
|
2
2
|
import { useState as x, useRef as Q, useEffect as X } from "react";
|
|
3
3
|
import { Cross as Z, ChevronRight as P } from "impact-nova-icons";
|
|
4
|
-
import { Popover as $, PopoverTrigger as ee, PopoverContent as te, PopoverHeader as ae, PopoverTitle as re, PopoverBody as
|
|
4
|
+
import { Popover as $, PopoverTrigger as ee, PopoverContent as te, PopoverHeader as ae, PopoverTitle as re, PopoverBody as se } from "../../feedback/popover/popover.js";
|
|
5
5
|
import { ButtonIconTooltip as C } from "../../feedback/tooltip/button-icon-tooltip.js";
|
|
6
|
-
import { Alert as
|
|
6
|
+
import { Alert as ie, AlertIcon as ne, AlertTitle as oe, AlertDescription as le } from "../../feedback/alert/alert.js";
|
|
7
7
|
import { Button as u } from "../../primitives/button/button.js";
|
|
8
8
|
import { IrisAlanGradientIcon as T } from "../../primitives/iris/iris-alan-gradient-icon.js";
|
|
9
|
-
import { useImpactNovaI18n as
|
|
9
|
+
import { useImpactNovaI18n as v } from "../../../i18n/use-impact-nova-i18n.js";
|
|
10
10
|
import { createComponent as m } from "../../../lib/primitives/create-component.js";
|
|
11
11
|
import { cn as o } from "../../../lib/utils.js";
|
|
12
12
|
import { IrisChatLikeIcon as ce, IrisChatDislikeIcon as D, IrisChatCheckIcon as de, IrisChatCopyIcon as me, IrisChatSpeakIcon as he, IrisChatRetryIcon as pe, IrisChatAttachIcon as ue, IrisChatSuggestIcon as fe } from "./iris-chat-icons.js";
|
|
13
|
-
import { irisChatActionIconPressClassName as
|
|
13
|
+
import { irisChatActionIconPressClassName as N, irisChatCopySuccessClassName as be, writeIrisChatClipboardText as ge, IRIS_CHAT_COPY_FEEDBACK_MS as xe } from "./iris-chat-copy-feedback.js";
|
|
14
14
|
import { readIrisChatActionsSpeakText as Ce, cancelPlainTextSpeech as Ie, speakPlainText as ke } from "./iris-chat-speech.js";
|
|
15
|
-
import { useIrisChatOptional as
|
|
16
|
-
import { readIrisChatGreetingCompact as
|
|
17
|
-
import { irisChatMessageVariants as
|
|
18
|
-
import { readIrisGreetingPeriod as
|
|
15
|
+
import { useIrisChatOptional as Ne } from "./iris-chat-context.js";
|
|
16
|
+
import { readIrisChatGreetingCompact as ve, readIrisChatGreetingShowSubtitle as we, readIrisChatGreetingIconSize as ye } from "./iris-chat-window-chrome.js";
|
|
17
|
+
import { irisChatMessageVariants as ze } from "./iris-chat.variants.js";
|
|
18
|
+
import { readIrisGreetingPeriod as _e, readIrisGreetingMark as Ae, readIrisGreetingMessageKey as Se } from "./read-iris-greeting-period.js";
|
|
19
19
|
const Je = m(
|
|
20
20
|
"IrisChatGreeting",
|
|
21
|
-
({ className:
|
|
22
|
-
const { t: f } =
|
|
21
|
+
({ className: s, name: a, greeting: t, subtitle: r, children: n, mark: d }, b) => {
|
|
22
|
+
const { t: f } = v(), c = Ne(), h = c != null ? ve({
|
|
23
23
|
isWindowPlacement: c.isWindowPlacement,
|
|
24
24
|
placement: c.placement,
|
|
25
25
|
frame: c.frame
|
|
26
26
|
}) : !1, I = c != null ? we({
|
|
27
27
|
isWindowPlacement: c.isWindowPlacement,
|
|
28
28
|
frame: c.frame
|
|
29
|
-
}) : !0,
|
|
29
|
+
}) : !0, z = c != null ? ye({
|
|
30
30
|
isWindowPlacement: c.isWindowPlacement,
|
|
31
31
|
placement: c.placement,
|
|
32
32
|
frame: c.frame,
|
|
33
33
|
compact: h
|
|
34
|
-
}) : h ? 56 : 84, y =
|
|
34
|
+
}) : h ? 56 : 84, y = _e(), _ = d ?? Ae(), A = t ?? f(Se(y)), i = h ? "text-lg font-semibold leading-6 text-content" : "text-[26px] font-semibold leading-[46.8px] text-content", g = h ? "bg-clip-text text-lg font-extrabold leading-6 text-transparent" : "bg-clip-text text-[26px] font-extrabold leading-[46.8px] text-transparent";
|
|
35
35
|
return /* @__PURE__ */ l(
|
|
36
36
|
"div",
|
|
37
37
|
{
|
|
38
|
-
ref:
|
|
38
|
+
ref: b,
|
|
39
39
|
"data-component": "iris-chat-greeting",
|
|
40
40
|
"data-compact": h ? "" : void 0,
|
|
41
41
|
className: o(
|
|
42
42
|
"relative flex flex-col items-center justify-center text-center",
|
|
43
|
-
h ? "gap-1.5 py-2" : "gap-
|
|
44
|
-
"bg-[radial-gradient(
|
|
45
|
-
|
|
46
|
-
i
|
|
43
|
+
h ? "gap-1.5 py-2" : "gap-2 py-8",
|
|
44
|
+
"bg-[radial-gradient(ellipse_80%_70%_at_50%_45%,var(--color-iris-menu-surface-from),transparent_70%),radial-gradient(ellipse_70%_50%_at_50%_85%,color-mix(in_srgb,var(--color-iris-control-glow-cyan)_16%,transparent),transparent_72%)]",
|
|
45
|
+
s
|
|
47
46
|
),
|
|
48
47
|
children: [
|
|
49
|
-
/* @__PURE__ */ e(T, { size:
|
|
48
|
+
/* @__PURE__ */ e(T, { size: z }),
|
|
50
49
|
/* @__PURE__ */ l("div", { className: "flex flex-wrap items-center justify-center gap-1", children: [
|
|
51
|
-
/* @__PURE__ */ e("p", { className:
|
|
50
|
+
/* @__PURE__ */ e("p", { className: i, children: A }),
|
|
52
51
|
a ? /* @__PURE__ */ e(
|
|
53
52
|
"p",
|
|
54
53
|
{
|
|
55
|
-
className:
|
|
54
|
+
className: g,
|
|
56
55
|
style: {
|
|
57
56
|
backgroundImage: "linear-gradient(90deg, var(--color-header-bot-gradient-orange), var(--color-header-bot-gradient-purple))"
|
|
58
57
|
},
|
|
59
58
|
children: a
|
|
60
59
|
}
|
|
61
60
|
) : null,
|
|
62
|
-
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: h ? "text-base" : "text-[23px]", children:
|
|
61
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: h ? "text-base" : "text-[23px]", children: _ })
|
|
63
62
|
] }),
|
|
64
63
|
I ? /* @__PURE__ */ e(
|
|
65
64
|
"p",
|
|
@@ -73,8 +72,8 @@ const Je = m(
|
|
|
73
72
|
}
|
|
74
73
|
);
|
|
75
74
|
}
|
|
76
|
-
), Qe = m("IrisChatSuggestions", ({ className:
|
|
77
|
-
const { t: n } =
|
|
75
|
+
), Qe = m("IrisChatSuggestions", ({ className: s, children: a, ...t }, r) => {
|
|
76
|
+
const { t: n } = v();
|
|
78
77
|
return /* @__PURE__ */ l(
|
|
79
78
|
"div",
|
|
80
79
|
{
|
|
@@ -82,7 +81,7 @@ const Je = m(
|
|
|
82
81
|
"data-component": "iris-chat-suggestions",
|
|
83
82
|
className: o(
|
|
84
83
|
"flex flex-col gap-2 bg-[radial-gradient(ellipse_at_center,color-mix(in_srgb,var(--color-iris-control-glow-cyan)_12%,transparent),transparent_72%)] pb-6",
|
|
85
|
-
|
|
84
|
+
s
|
|
86
85
|
),
|
|
87
86
|
...t,
|
|
88
87
|
children: [
|
|
@@ -93,7 +92,7 @@ const Je = m(
|
|
|
93
92
|
);
|
|
94
93
|
}), Xe = m(
|
|
95
94
|
"IrisChatSuggestion",
|
|
96
|
-
({ className:
|
|
95
|
+
({ className: s, children: a, type: t = "button", ...r }, n) => /* @__PURE__ */ l(
|
|
97
96
|
"button",
|
|
98
97
|
{
|
|
99
98
|
ref: n,
|
|
@@ -101,7 +100,7 @@ const Je = m(
|
|
|
101
100
|
"data-component": "iris-chat-suggestion",
|
|
102
101
|
className: o(
|
|
103
102
|
"flex h-8 items-center gap-1 rounded-md px-2 text-start text-sm font-medium leading-5 text-content-secondary hover:bg-accent",
|
|
104
|
-
|
|
103
|
+
s
|
|
105
104
|
),
|
|
106
105
|
...r,
|
|
107
106
|
children: [
|
|
@@ -110,14 +109,14 @@ const Je = m(
|
|
|
110
109
|
]
|
|
111
110
|
}
|
|
112
111
|
)
|
|
113
|
-
), Ze = m("IrisChatWorkflows", ({ className:
|
|
114
|
-
const { t: d } =
|
|
112
|
+
), Ze = m("IrisChatWorkflows", ({ className: s, children: a, onShowMore: t, ...r }, n) => {
|
|
113
|
+
const { t: d } = v();
|
|
115
114
|
return /* @__PURE__ */ l(
|
|
116
115
|
"div",
|
|
117
116
|
{
|
|
118
117
|
ref: n,
|
|
119
118
|
"data-component": "iris-chat-workflows",
|
|
120
|
-
className: o("flex flex-col gap-2 pb-6",
|
|
119
|
+
className: o("flex flex-col gap-2 pb-6", s),
|
|
121
120
|
...r,
|
|
122
121
|
children: [
|
|
123
122
|
/* @__PURE__ */ e("p", { className: "text-xs font-medium capitalize leading-4 text-content-secondary", children: d("irisChat.suggestedWorkflows") }),
|
|
@@ -140,7 +139,7 @@ const Je = m(
|
|
|
140
139
|
);
|
|
141
140
|
}), $e = m(
|
|
142
141
|
"IrisChatWorkflow",
|
|
143
|
-
({ className:
|
|
142
|
+
({ className: s, title: a, description: t, type: r = "button", ...n }, d) => /* @__PURE__ */ l(
|
|
144
143
|
"button",
|
|
145
144
|
{
|
|
146
145
|
ref: d,
|
|
@@ -148,7 +147,7 @@ const Je = m(
|
|
|
148
147
|
"data-component": "iris-chat-workflow",
|
|
149
148
|
className: o(
|
|
150
149
|
"flex items-center gap-2 rounded-md py-2 text-start hover:bg-accent",
|
|
151
|
-
|
|
150
|
+
s
|
|
152
151
|
),
|
|
153
152
|
...n,
|
|
154
153
|
children: [
|
|
@@ -163,7 +162,7 @@ const Je = m(
|
|
|
163
162
|
)
|
|
164
163
|
), et = m(
|
|
165
164
|
"IrisChatThread",
|
|
166
|
-
({ className:
|
|
165
|
+
({ className: s, ...a }, t) => /* @__PURE__ */ e(
|
|
167
166
|
"div",
|
|
168
167
|
{
|
|
169
168
|
ref: t,
|
|
@@ -171,37 +170,37 @@ const Je = m(
|
|
|
171
170
|
role: "log",
|
|
172
171
|
"aria-live": "polite",
|
|
173
172
|
"aria-relevant": "additions",
|
|
174
|
-
className: o("flex min-w-0 w-full flex-col gap-4 py-4",
|
|
173
|
+
className: o("flex min-w-0 w-full flex-col gap-4 py-4", s),
|
|
175
174
|
...a
|
|
176
175
|
}
|
|
177
176
|
)
|
|
178
177
|
), tt = m(
|
|
179
178
|
"IrisChatDay",
|
|
180
|
-
({ className:
|
|
179
|
+
({ className: s, children: a, ...t }, r) => /* @__PURE__ */ e(
|
|
181
180
|
"div",
|
|
182
181
|
{
|
|
183
182
|
ref: r,
|
|
184
183
|
"data-component": "iris-chat-day",
|
|
185
|
-
className: o("flex justify-center",
|
|
184
|
+
className: o("flex justify-center", s),
|
|
186
185
|
...t,
|
|
187
186
|
children: /* @__PURE__ */ e("span", { className: "rounded-full bg-secondary px-3 py-1 text-xs font-medium text-content-secondary", children: a })
|
|
188
187
|
}
|
|
189
188
|
)
|
|
190
189
|
), at = m(
|
|
191
190
|
"IrisChatMessage",
|
|
192
|
-
({ className:
|
|
191
|
+
({ className: s, role: a, time: t, framed: r, children: n, ...d }, b) => /* @__PURE__ */ e(
|
|
193
192
|
"article",
|
|
194
193
|
{
|
|
195
|
-
ref:
|
|
194
|
+
ref: b,
|
|
196
195
|
"data-component": "iris-chat-message",
|
|
197
196
|
"data-role": a,
|
|
198
197
|
className: o(
|
|
199
198
|
"flex min-w-0 w-full flex-col gap-1",
|
|
200
199
|
a === "user" ? "items-end" : "items-start",
|
|
201
|
-
|
|
200
|
+
s
|
|
202
201
|
),
|
|
203
202
|
...d,
|
|
204
|
-
children: /* @__PURE__ */ l("div", { "data-slot": "bubble", className:
|
|
203
|
+
children: /* @__PURE__ */ l("div", { "data-slot": "bubble", className: ze({ role: a, framed: r }), children: [
|
|
205
204
|
n,
|
|
206
205
|
t ? /* @__PURE__ */ e(
|
|
207
206
|
"time",
|
|
@@ -216,22 +215,22 @@ const Je = m(
|
|
|
216
215
|
), Pe = ["notAsked", "tone", "incorrect", "other"], rt = m(
|
|
217
216
|
"IrisChatActions",
|
|
218
217
|
({
|
|
219
|
-
className:
|
|
218
|
+
className: s,
|
|
220
219
|
liked: a,
|
|
221
220
|
disliked: t,
|
|
222
221
|
copyText: r,
|
|
223
222
|
speakText: n,
|
|
224
223
|
speechLocale: d,
|
|
225
|
-
onLike:
|
|
224
|
+
onLike: b,
|
|
226
225
|
onDislike: f,
|
|
227
226
|
onCopy: c,
|
|
228
227
|
onRetry: h,
|
|
229
228
|
onSpeak: I,
|
|
230
|
-
onSpeechNotice:
|
|
229
|
+
onSpeechNotice: z,
|
|
231
230
|
onFeedback: y,
|
|
232
|
-
...
|
|
231
|
+
..._
|
|
233
232
|
}, A) => {
|
|
234
|
-
const { t:
|
|
233
|
+
const { t: i } = v(), [g, W] = x(!1), [R, S] = x(!1), k = Q(null);
|
|
235
234
|
X(
|
|
236
235
|
() => () => {
|
|
237
236
|
k.current !== null && window.clearTimeout(k.current);
|
|
@@ -239,17 +238,17 @@ const Je = m(
|
|
|
239
238
|
[]
|
|
240
239
|
);
|
|
241
240
|
const [w, E] = x(!1), [K, G] = x(!1), [O, U] = x("notAsked"), [j, F] = x(""), [H, B] = x(!1), L = {
|
|
242
|
-
notAsked:
|
|
243
|
-
tone:
|
|
244
|
-
incorrect:
|
|
245
|
-
other:
|
|
241
|
+
notAsked: i("irisChat.feedbackNotAsked"),
|
|
242
|
+
tone: i("irisChat.feedbackTone"),
|
|
243
|
+
incorrect: i("irisChat.feedbackIncorrect"),
|
|
244
|
+
other: i("irisChat.feedbackOther")
|
|
246
245
|
}, M = Ce({ speakText: n, copyText: r }), V = M.length > 0 || !!I, Y = () => {
|
|
247
246
|
(async () => {
|
|
248
247
|
if (!r) {
|
|
249
248
|
c?.();
|
|
250
249
|
return;
|
|
251
250
|
}
|
|
252
|
-
await
|
|
251
|
+
await ge(r) && (c?.(), W(!0), S(!0), k.current !== null && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
|
|
253
252
|
W(!1), S(!1), k.current = null;
|
|
254
253
|
}, xe));
|
|
255
254
|
})();
|
|
@@ -266,7 +265,7 @@ const Je = m(
|
|
|
266
265
|
text: n ?? r ?? "",
|
|
267
266
|
locale: d,
|
|
268
267
|
onSpeakingChange: E,
|
|
269
|
-
onNotice:
|
|
268
|
+
onNotice: z
|
|
270
269
|
});
|
|
271
270
|
};
|
|
272
271
|
return /* @__PURE__ */ l(
|
|
@@ -274,19 +273,19 @@ const Je = m(
|
|
|
274
273
|
{
|
|
275
274
|
ref: A,
|
|
276
275
|
"data-component": "iris-chat-actions",
|
|
277
|
-
className: o("flex items-center gap-0.5",
|
|
278
|
-
...
|
|
276
|
+
className: o("flex items-center gap-0.5", s),
|
|
277
|
+
..._,
|
|
279
278
|
children: [
|
|
280
|
-
/* @__PURE__ */ e(C, { label:
|
|
279
|
+
/* @__PURE__ */ e(C, { label: i("irisChat.like"), children: /* @__PURE__ */ e(
|
|
281
280
|
u,
|
|
282
281
|
{
|
|
283
282
|
type: "button",
|
|
284
283
|
variant: "ghost",
|
|
285
284
|
size: "icon",
|
|
286
|
-
"aria-label":
|
|
285
|
+
"aria-label": i("irisChat.like"),
|
|
287
286
|
"aria-pressed": a,
|
|
288
|
-
className: o(
|
|
289
|
-
onClick:
|
|
287
|
+
className: o(N, a && "text-brand bg-brand-subtle"),
|
|
288
|
+
onClick: b,
|
|
290
289
|
children: /* @__PURE__ */ e(ce, { size: 16 })
|
|
291
290
|
}
|
|
292
291
|
) }),
|
|
@@ -298,22 +297,22 @@ const Je = m(
|
|
|
298
297
|
G(p), p || (B(!1), F(""));
|
|
299
298
|
},
|
|
300
299
|
children: [
|
|
301
|
-
/* @__PURE__ */ e(C, { label:
|
|
300
|
+
/* @__PURE__ */ e(C, { label: i("irisChat.dislike"), children: /* @__PURE__ */ e(ee, { asChild: !0, children: /* @__PURE__ */ e(
|
|
302
301
|
u,
|
|
303
302
|
{
|
|
304
303
|
type: "button",
|
|
305
304
|
variant: "ghost",
|
|
306
305
|
size: "icon",
|
|
307
|
-
"aria-label":
|
|
306
|
+
"aria-label": i("irisChat.dislike"),
|
|
308
307
|
"aria-pressed": t,
|
|
309
|
-
className: o(
|
|
308
|
+
className: o(N, t && "text-brand bg-brand-subtle"),
|
|
310
309
|
onClick: f,
|
|
311
310
|
children: /* @__PURE__ */ e(D, { size: 16 })
|
|
312
311
|
}
|
|
313
312
|
) }) }),
|
|
314
|
-
/* @__PURE__ */ e(te, { align: "start", side: "top", className: "w-[320px] rounded-xl p-4", children: H ? /* @__PURE__ */ e("p", { className: "text-sm font-medium text-content", children:
|
|
315
|
-
/* @__PURE__ */ e(ae, { className: "mb-3", children: /* @__PURE__ */ e(re, { className: "text-sm font-semibold", children:
|
|
316
|
-
/* @__PURE__ */ l(
|
|
313
|
+
/* @__PURE__ */ e(te, { align: "start", side: "top", className: "w-[320px] rounded-xl p-4", children: H ? /* @__PURE__ */ e("p", { className: "text-sm font-medium text-content", children: i("irisChat.feedbackThanks") }) : /* @__PURE__ */ l(J, { children: [
|
|
314
|
+
/* @__PURE__ */ e(ae, { className: "mb-3", children: /* @__PURE__ */ e(re, { className: "text-sm font-semibold", children: i("irisChat.feedbackTitle") }) }),
|
|
315
|
+
/* @__PURE__ */ l(se, { className: "flex flex-col gap-3", children: [
|
|
317
316
|
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: Pe.map((p) => /* @__PURE__ */ e(
|
|
318
317
|
"button",
|
|
319
318
|
{
|
|
@@ -331,7 +330,7 @@ const Je = m(
|
|
|
331
330
|
"textarea",
|
|
332
331
|
{
|
|
333
332
|
value: j,
|
|
334
|
-
placeholder:
|
|
333
|
+
placeholder: i("irisChat.feedbackPlaceholder"),
|
|
335
334
|
className: "min-h-16 w-full resize-none rounded-lg border border-stroke-subtle bg-transparent px-3 py-2 text-sm outline-none",
|
|
336
335
|
onChange: (p) => F(p.target.value)
|
|
337
336
|
}
|
|
@@ -345,22 +344,22 @@ const Je = m(
|
|
|
345
344
|
onClick: () => {
|
|
346
345
|
y({ reason: O, details: j }), B(!0), window.setTimeout(() => G(!1), 1200);
|
|
347
346
|
},
|
|
348
|
-
children:
|
|
347
|
+
children: i("irisChat.feedbackSubmit")
|
|
349
348
|
}
|
|
350
349
|
)
|
|
351
350
|
] })
|
|
352
351
|
] }) })
|
|
353
352
|
]
|
|
354
353
|
}
|
|
355
|
-
) : /* @__PURE__ */ e(C, { label:
|
|
354
|
+
) : /* @__PURE__ */ e(C, { label: i("irisChat.dislike"), children: /* @__PURE__ */ e(
|
|
356
355
|
u,
|
|
357
356
|
{
|
|
358
357
|
type: "button",
|
|
359
358
|
variant: "ghost",
|
|
360
359
|
size: "icon",
|
|
361
|
-
"aria-label":
|
|
360
|
+
"aria-label": i("irisChat.dislike"),
|
|
362
361
|
"aria-pressed": t,
|
|
363
|
-
className: o(
|
|
362
|
+
className: o(N, t && "text-brand bg-brand-subtle"),
|
|
364
363
|
onClick: f,
|
|
365
364
|
children: /* @__PURE__ */ e(D, { size: 16 })
|
|
366
365
|
}
|
|
@@ -368,7 +367,7 @@ const Je = m(
|
|
|
368
367
|
r || c ? /* @__PURE__ */ e(
|
|
369
368
|
C,
|
|
370
369
|
{
|
|
371
|
-
label:
|
|
370
|
+
label: i(g ? "irisChat.copied" : "irisChat.copy"),
|
|
372
371
|
open: R,
|
|
373
372
|
onOpenChange: S,
|
|
374
373
|
children: /* @__PURE__ */ e(
|
|
@@ -377,43 +376,43 @@ const Je = m(
|
|
|
377
376
|
type: "button",
|
|
378
377
|
variant: "ghost",
|
|
379
378
|
size: "icon",
|
|
380
|
-
"aria-label":
|
|
379
|
+
"aria-label": i(g ? "irisChat.copied" : "irisChat.copy"),
|
|
381
380
|
"data-testid": "iris-chat-copy",
|
|
382
|
-
"data-copied":
|
|
381
|
+
"data-copied": g ? "" : void 0,
|
|
383
382
|
className: o(
|
|
384
|
-
|
|
385
|
-
|
|
383
|
+
N,
|
|
384
|
+
g && be
|
|
386
385
|
),
|
|
387
386
|
onClick: Y,
|
|
388
|
-
children:
|
|
387
|
+
children: g ? /* @__PURE__ */ e(de, { size: 16 }) : /* @__PURE__ */ e(me, { size: 16 })
|
|
389
388
|
}
|
|
390
389
|
)
|
|
391
390
|
}
|
|
392
391
|
) : null,
|
|
393
|
-
V ? /* @__PURE__ */ e(C, { label:
|
|
392
|
+
V ? /* @__PURE__ */ e(C, { label: i(w ? "irisChat.stopSpeaking" : "irisChat.speak"), children: /* @__PURE__ */ e(
|
|
394
393
|
u,
|
|
395
394
|
{
|
|
396
395
|
type: "button",
|
|
397
396
|
variant: "ghost",
|
|
398
397
|
size: "icon",
|
|
399
|
-
"aria-label":
|
|
398
|
+
"aria-label": i(w ? "irisChat.stopSpeaking" : "irisChat.speak"),
|
|
400
399
|
"aria-pressed": w,
|
|
401
400
|
"data-testid": "iris-chat-speak",
|
|
402
401
|
disabled: !I && M.length === 0,
|
|
403
|
-
className: o(
|
|
402
|
+
className: o(N, w && "text-brand bg-brand-subtle"),
|
|
404
403
|
onClick: q,
|
|
405
404
|
children: /* @__PURE__ */ e(he, { size: 16 })
|
|
406
405
|
}
|
|
407
406
|
) }) : null,
|
|
408
|
-
h ? /* @__PURE__ */ e(C, { label:
|
|
407
|
+
h ? /* @__PURE__ */ e(C, { label: i("irisChat.retry"), children: /* @__PURE__ */ e(
|
|
409
408
|
u,
|
|
410
409
|
{
|
|
411
410
|
type: "button",
|
|
412
411
|
variant: "ghost",
|
|
413
412
|
size: "icon",
|
|
414
|
-
"aria-label":
|
|
413
|
+
"aria-label": i("irisChat.retry"),
|
|
415
414
|
"data-testid": "iris-chat-retry",
|
|
416
|
-
className:
|
|
415
|
+
className: N,
|
|
417
416
|
onClick: h,
|
|
418
417
|
children: /* @__PURE__ */ e(pe, { size: 16 })
|
|
419
418
|
}
|
|
@@ -422,20 +421,20 @@ const Je = m(
|
|
|
422
421
|
}
|
|
423
422
|
);
|
|
424
423
|
}
|
|
425
|
-
),
|
|
424
|
+
), st = m(
|
|
426
425
|
"IrisChatFollowUps",
|
|
427
|
-
({ className:
|
|
426
|
+
({ className: s, ...a }, t) => /* @__PURE__ */ e(
|
|
428
427
|
"div",
|
|
429
428
|
{
|
|
430
429
|
ref: t,
|
|
431
430
|
"data-component": "iris-chat-follow-ups",
|
|
432
|
-
className: o("flex w-full flex-col overflow-hidden rounded-xl border border-stroke-subtle",
|
|
431
|
+
className: o("flex w-full flex-col overflow-hidden rounded-xl border border-stroke-subtle", s),
|
|
433
432
|
...a
|
|
434
433
|
}
|
|
435
434
|
)
|
|
436
|
-
),
|
|
435
|
+
), it = m(
|
|
437
436
|
"IrisChatFollowUp",
|
|
438
|
-
({ className:
|
|
437
|
+
({ className: s, children: a, type: t = "button", ...r }, n) => /* @__PURE__ */ l(
|
|
439
438
|
"button",
|
|
440
439
|
{
|
|
441
440
|
ref: n,
|
|
@@ -443,7 +442,7 @@ const Je = m(
|
|
|
443
442
|
"data-component": "iris-chat-follow-up",
|
|
444
443
|
className: o(
|
|
445
444
|
"flex w-full items-center justify-between gap-3 border-b border-stroke-subtle px-3 py-2.5 text-start text-sm last:border-b-0 hover:bg-accent",
|
|
446
|
-
|
|
445
|
+
s
|
|
447
446
|
),
|
|
448
447
|
...r,
|
|
449
448
|
children: [
|
|
@@ -457,17 +456,17 @@ const Je = m(
|
|
|
457
456
|
)
|
|
458
457
|
), nt = m(
|
|
459
458
|
"IrisChatAttachment",
|
|
460
|
-
({ className:
|
|
461
|
-
const { t: f } =
|
|
459
|
+
({ className: s, name: a, kind: t = "file", sizeLabel: r, previewUrl: n, onRemove: d }, b) => {
|
|
460
|
+
const { t: f } = v();
|
|
462
461
|
return /* @__PURE__ */ l(
|
|
463
462
|
"div",
|
|
464
463
|
{
|
|
465
|
-
ref:
|
|
464
|
+
ref: b,
|
|
466
465
|
"data-component": "iris-chat-attachment",
|
|
467
466
|
"data-kind": t,
|
|
468
467
|
className: o(
|
|
469
468
|
"flex max-w-full items-center gap-2 rounded-xl bg-canvas-elevated px-2 py-1.5 text-xs text-content",
|
|
470
|
-
|
|
469
|
+
s
|
|
471
470
|
),
|
|
472
471
|
children: [
|
|
473
472
|
t === "image" && n ? /* @__PURE__ */ e("img", { src: n, alt: "", className: "size-10 shrink-0 rounded-lg object-cover" }) : /* @__PURE__ */ e(ue, { size: 14 }),
|
|
@@ -493,9 +492,9 @@ const Je = m(
|
|
|
493
492
|
}
|
|
494
493
|
), ot = m(
|
|
495
494
|
"IrisChatError",
|
|
496
|
-
({ className:
|
|
497
|
-
const { t: d } =
|
|
498
|
-
return /* @__PURE__ */ e("div", { ref: n, "data-component": "iris-chat-error", className: o("w-full",
|
|
495
|
+
({ className: s, title: a, description: t, onRetry: r }, n) => {
|
|
496
|
+
const { t: d } = v();
|
|
497
|
+
return /* @__PURE__ */ e("div", { ref: n, "data-component": "iris-chat-error", className: o("w-full", s), children: /* @__PURE__ */ l(ie, { variant: "error", children: [
|
|
499
498
|
/* @__PURE__ */ e(ne, { variant: "error" }),
|
|
500
499
|
/* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
|
|
501
500
|
/* @__PURE__ */ e(oe, { children: a ?? d("irisChat.generationError") }),
|
|
@@ -517,7 +516,7 @@ const Je = m(
|
|
|
517
516
|
}
|
|
518
517
|
), lt = m(
|
|
519
518
|
"IrisChatChip",
|
|
520
|
-
({ className:
|
|
519
|
+
({ className: s, type: a = "button", variant: t = "default", ...r }, n) => /* @__PURE__ */ e(
|
|
521
520
|
"button",
|
|
522
521
|
{
|
|
523
522
|
ref: n,
|
|
@@ -527,7 +526,7 @@ const Je = m(
|
|
|
527
526
|
className: o(
|
|
528
527
|
"rounded-full px-3 py-1.5 text-sm font-medium leading-5 disabled:pointer-events-none disabled:opacity-50",
|
|
529
528
|
t === "outline" ? "border border-stroke bg-canvas text-content hover:bg-accent" : "border border-stroke-subtle bg-secondary text-content hover:bg-accent",
|
|
530
|
-
|
|
529
|
+
s
|
|
531
530
|
),
|
|
532
531
|
...r
|
|
533
532
|
}
|
|
@@ -539,8 +538,8 @@ export {
|
|
|
539
538
|
lt as IrisChatChip,
|
|
540
539
|
tt as IrisChatDay,
|
|
541
540
|
ot as IrisChatError,
|
|
542
|
-
|
|
543
|
-
|
|
541
|
+
it as IrisChatFollowUp,
|
|
542
|
+
st as IrisChatFollowUps,
|
|
544
543
|
Je as IrisChatGreeting,
|
|
545
544
|
at as IrisChatMessage,
|
|
546
545
|
Xe as IrisChatSuggestion,
|
|
@@ -28,3 +28,6 @@ export declare function readIrisChatComposerLayout(input: {
|
|
|
28
28
|
export declare function readIrisChatDisclaimerPaddingClass(input: {
|
|
29
29
|
isWindowPlacement: boolean;
|
|
30
30
|
}): string;
|
|
31
|
+
/** Deliberate hover before Move & Resize (~macOS green-button tile feel, ~0.7–1s). */
|
|
32
|
+
export declare const IRIS_CHAT_SNAP_MENU_OPEN_DELAY_MS = 900;
|
|
33
|
+
export declare const IRIS_CHAT_SNAP_MENU_CLOSE_DELAY_MS = 300;
|
|
@@ -21,12 +21,15 @@ function a(e) {
|
|
|
21
21
|
}
|
|
22
22
|
return "stacked";
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function c(e) {
|
|
25
25
|
return e.isWindowPlacement ? "px-3 py-2" : "px-4 py-3";
|
|
26
26
|
}
|
|
27
|
+
const m = 900, o = 300;
|
|
27
28
|
export {
|
|
29
|
+
o as IRIS_CHAT_SNAP_MENU_CLOSE_DELAY_MS,
|
|
30
|
+
m as IRIS_CHAT_SNAP_MENU_OPEN_DELAY_MS,
|
|
28
31
|
a as readIrisChatComposerLayout,
|
|
29
|
-
|
|
32
|
+
c as readIrisChatDisclaimerPaddingClass,
|
|
30
33
|
n as readIrisChatGreetingCompact,
|
|
31
34
|
t as readIrisChatGreetingIconSize,
|
|
32
35
|
i as readIrisChatGreetingShowSubtitle,
|