impact-nova 3.0.0-alpha.7 → 3.0.0-alpha.9
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/README.md +1 -1
- package/dist/components/data/expandable-list-item/sku-picker-chrome.d.ts +4 -0
- package/dist/components/data/expandable-list-item/sku-picker-chrome.js +37 -42
- package/dist/components/data-display/stereo-scatter/index.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/index.js +10 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-frame.d.ts +41 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-frame.js +178 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-theme.d.ts +14 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-theme.js +29 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-wedges.d.ts +23 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-wedges.js +80 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine.d.ts +120 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine.js +519 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-math.d.ts +64 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-math.js +129 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-model.d.ts +37 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-model.js +71 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-context.d.ts +33 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-context.js +19 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-key.d.ts +4 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-key.js +19 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-legend.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-legend.js +75 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-scene.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-scene.js +149 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-toolbar.d.ts +13 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-toolbar.js +93 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-tooltip.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-tooltip.js +62 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-viewport.d.ts +3 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-viewport.js +41 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.d.ts +12 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.js +107 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.stories-data.d.ts +11 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.types.d.ts +69 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.variants.d.ts +13 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.variants.js +42 -0
- package/dist/components/feedback/tooltip/button-icon-tooltip.d.ts +3 -1
- package/dist/components/feedback/tooltip/button-icon-tooltip.js +22 -19
- package/dist/components/flows/iris-chat/IrisChatComposerVoiceCapture.d.ts +5 -0
- package/dist/components/flows/iris-chat/IrisChatComposerVoiceCapture.js +73 -0
- package/dist/components/flows/iris-chat/IrisChatVoiceWaveform.d.ts +3 -0
- package/dist/components/flows/iris-chat/IrisChatVoiceWaveform.js +25 -0
- package/dist/components/flows/iris-chat/index.d.ts +3 -1
- package/dist/components/flows/iris-chat/index.js +58 -53
- package/dist/components/flows/iris-chat/iris-chat-chrome.d.ts +39 -0
- package/dist/components/flows/iris-chat/iris-chat-chrome.js +325 -0
- package/dist/components/flows/iris-chat/iris-chat-close-animation.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-close-animation.js +21 -0
- package/dist/components/flows/iris-chat/iris-chat-composer.js +266 -238
- package/dist/components/flows/iris-chat/iris-chat-context.d.ts +13 -0
- package/dist/components/flows/iris-chat/iris-chat-context.js +14 -10
- package/dist/components/flows/iris-chat/iris-chat-copy-feedback.d.ts +4 -0
- package/dist/components/flows/iris-chat/iris-chat-copy-feedback.js +16 -0
- package/dist/components/flows/iris-chat/iris-chat-frame.d.ts +31 -0
- package/dist/components/flows/iris-chat/iris-chat-frame.js +79 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.d.ts +1 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.js +28 -15
- package/dist/components/flows/iris-chat/iris-chat-launch-animation.d.ts +11 -0
- package/dist/components/flows/iris-chat/iris-chat-launch-animation.js +35 -0
- package/dist/components/flows/iris-chat/iris-chat-markdown.js +70 -50
- package/dist/components/flows/iris-chat/iris-chat-menu.js +91 -86
- package/dist/components/flows/iris-chat/iris-chat-speech.d.ts +52 -0
- package/dist/components/flows/iris-chat/iris-chat-speech.js +121 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.js +241 -190
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.d.ts +30 -0
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.js +34 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry-context.d.ts +14 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry-context.js +15 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry.js +113 -0
- package/dist/components/flows/iris-chat/iris-chat-window-handles.d.ts +6 -0
- package/dist/components/flows/iris-chat/iris-chat-window-handles.js +50 -0
- package/dist/components/flows/iris-chat/iris-chat-window-shell.d.ts +8 -0
- package/dist/components/flows/iris-chat/iris-chat-window-shell.js +37 -0
- package/dist/components/flows/iris-chat/iris-chat.d.ts +3 -39
- package/dist/components/flows/iris-chat/iris-chat.js +22 -330
- package/dist/components/flows/iris-chat/iris-chat.types.d.ts +18 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +3 -3
- package/dist/components/flows/iris-chat/iris-chat.variants.js +21 -16
- package/dist/components/flows/iris-chat/use-iris-chat-root.d.ts +26 -0
- package/dist/components/flows/iris-chat/use-iris-chat-root.js +140 -0
- package/dist/components/forms/choice-card/choice-card.d.ts +1 -0
- package/dist/components/forms/choice-card/choice-card.js +183 -186
- package/dist/components/layout/header/header.js +1 -0
- package/dist/form-react/Fields/SelectField.js +66 -57
- package/dist/form-react/Fields/VirtualizedListField.js +140 -96
- package/dist/form-react/index.d.ts +1 -1
- package/dist/form-react/types/fields.types.d.ts +27 -0
- package/dist/form-react/types/reactHookForm.types.d.ts +18 -1
- package/dist/i18n/defaultMessages.d.ts +37 -0
- package/dist/i18n/defaultMessages.js +54 -18
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +36 -0
- package/dist/i18n/locales/es.js +36 -0
- package/dist/i18n/locales/hi.js +36 -0
- package/dist/i18n/locales/kn.js +36 -0
- package/dist/impact-nova-components.css +19 -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 +5 -1
|
@@ -1,70 +1,85 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as x } from "react";
|
|
3
|
-
import { Cross as
|
|
4
|
-
import { Popover as
|
|
5
|
-
import { ButtonIconTooltip as
|
|
6
|
-
import { Alert as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { IrisAlanGradientIcon as
|
|
9
|
-
import { useImpactNovaI18n as
|
|
10
|
-
import { createComponent as
|
|
11
|
-
import { cn as
|
|
12
|
-
import { IrisChatLikeIcon as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as J } from "react/jsx-runtime";
|
|
2
|
+
import { useState as x, useRef as Q, useEffect as X } from "react";
|
|
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 se } from "../../feedback/popover/popover.js";
|
|
5
|
+
import { ButtonIconTooltip as C } from "../../feedback/tooltip/button-icon-tooltip.js";
|
|
6
|
+
import { Alert as ie, AlertIcon as ne, AlertTitle as oe, AlertDescription as le } from "../../feedback/alert/alert.js";
|
|
7
|
+
import { Button as u } from "../../primitives/button/button.js";
|
|
8
|
+
import { IrisAlanGradientIcon as T } from "../../primitives/iris/iris-alan-gradient-icon.js";
|
|
9
|
+
import { useImpactNovaI18n as v } from "../../../i18n/use-impact-nova-i18n.js";
|
|
10
|
+
import { createComponent as m } from "../../../lib/primitives/create-component.js";
|
|
11
|
+
import { cn as o } from "../../../lib/utils.js";
|
|
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 N, irisChatCopySuccessClassName as be, writeIrisChatClipboardText as ge, IRIS_CHAT_COPY_FEEDBACK_MS as xe } from "./iris-chat-copy-feedback.js";
|
|
14
|
+
import { readIrisChatActionsSpeakText as Ce, cancelPlainTextSpeech as Ie, speakPlainText as ke } from "./iris-chat-speech.js";
|
|
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
|
+
const Je = m(
|
|
17
20
|
"IrisChatGreeting",
|
|
18
|
-
({ className: s, name: a, greeting: t, subtitle: r, children: n, mark:
|
|
19
|
-
const { t: f } =
|
|
20
|
-
|
|
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
|
+
isWindowPlacement: c.isWindowPlacement,
|
|
24
|
+
placement: c.placement,
|
|
25
|
+
frame: c.frame
|
|
26
|
+
}) : !1, I = c != null ? we({
|
|
27
|
+
isWindowPlacement: c.isWindowPlacement,
|
|
28
|
+
frame: c.frame
|
|
29
|
+
}) : !0, z = c != null ? ye({
|
|
30
|
+
isWindowPlacement: c.isWindowPlacement,
|
|
31
|
+
placement: c.placement,
|
|
32
|
+
frame: c.frame,
|
|
33
|
+
compact: h
|
|
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
|
+
return /* @__PURE__ */ l(
|
|
21
36
|
"div",
|
|
22
37
|
{
|
|
23
|
-
ref:
|
|
38
|
+
ref: b,
|
|
24
39
|
"data-component": "iris-chat-greeting",
|
|
25
|
-
"data-compact":
|
|
26
|
-
className:
|
|
40
|
+
"data-compact": h ? "" : void 0,
|
|
41
|
+
className: o(
|
|
27
42
|
"relative flex flex-col items-center justify-center text-center",
|
|
28
|
-
|
|
43
|
+
h ? "gap-1.5 py-2" : "gap-2 py-8",
|
|
29
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%)]",
|
|
30
45
|
s
|
|
31
46
|
),
|
|
32
47
|
children: [
|
|
33
|
-
/* @__PURE__ */ e(
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */ e("p", { className:
|
|
48
|
+
/* @__PURE__ */ e(T, { size: z }),
|
|
49
|
+
/* @__PURE__ */ l("div", { className: "flex flex-wrap items-center justify-center gap-1", children: [
|
|
50
|
+
/* @__PURE__ */ e("p", { className: i, children: A }),
|
|
36
51
|
a ? /* @__PURE__ */ e(
|
|
37
52
|
"p",
|
|
38
53
|
{
|
|
39
|
-
className:
|
|
54
|
+
className: g,
|
|
40
55
|
style: {
|
|
41
56
|
backgroundImage: "linear-gradient(90deg, var(--color-header-bot-gradient-orange), var(--color-header-bot-gradient-purple))"
|
|
42
57
|
},
|
|
43
58
|
children: a
|
|
44
59
|
}
|
|
45
60
|
) : null,
|
|
46
|
-
/* @__PURE__ */ e("span", { "aria-hidden": !0, className:
|
|
61
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: h ? "text-base" : "text-[23px]", children: _ })
|
|
47
62
|
] }),
|
|
48
|
-
/* @__PURE__ */ e(
|
|
63
|
+
I ? /* @__PURE__ */ e(
|
|
49
64
|
"p",
|
|
50
65
|
{
|
|
51
|
-
className:
|
|
66
|
+
className: h ? "max-w-[20rem] text-sm font-medium leading-5 text-content-caption" : "text-base font-medium leading-5 text-content-caption",
|
|
52
67
|
children: r ?? f("irisChat.greetingSubtitle")
|
|
53
68
|
}
|
|
54
|
-
),
|
|
69
|
+
) : null,
|
|
55
70
|
n
|
|
56
71
|
]
|
|
57
72
|
}
|
|
58
73
|
);
|
|
59
74
|
}
|
|
60
|
-
),
|
|
61
|
-
const { t: n } =
|
|
62
|
-
return /* @__PURE__ */
|
|
75
|
+
), Qe = m("IrisChatSuggestions", ({ className: s, children: a, ...t }, r) => {
|
|
76
|
+
const { t: n } = v();
|
|
77
|
+
return /* @__PURE__ */ l(
|
|
63
78
|
"div",
|
|
64
79
|
{
|
|
65
80
|
ref: r,
|
|
66
81
|
"data-component": "iris-chat-suggestions",
|
|
67
|
-
className:
|
|
82
|
+
className: o(
|
|
68
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",
|
|
69
84
|
s
|
|
70
85
|
),
|
|
@@ -75,77 +90,77 @@ const we = d(
|
|
|
75
90
|
]
|
|
76
91
|
}
|
|
77
92
|
);
|
|
78
|
-
}),
|
|
93
|
+
}), Xe = m(
|
|
79
94
|
"IrisChatSuggestion",
|
|
80
|
-
({ className: s, children: a, type: t = "button", ...r }, n) => /* @__PURE__ */
|
|
95
|
+
({ className: s, children: a, type: t = "button", ...r }, n) => /* @__PURE__ */ l(
|
|
81
96
|
"button",
|
|
82
97
|
{
|
|
83
98
|
ref: n,
|
|
84
99
|
type: t,
|
|
85
100
|
"data-component": "iris-chat-suggestion",
|
|
86
|
-
className:
|
|
101
|
+
className: o(
|
|
87
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",
|
|
88
103
|
s
|
|
89
104
|
),
|
|
90
105
|
...r,
|
|
91
106
|
children: [
|
|
92
|
-
/* @__PURE__ */ e(
|
|
107
|
+
/* @__PURE__ */ e(fe, { size: 14 }),
|
|
93
108
|
/* @__PURE__ */ e("span", { className: "truncate", children: a })
|
|
94
109
|
]
|
|
95
110
|
}
|
|
96
111
|
)
|
|
97
|
-
),
|
|
98
|
-
const { t:
|
|
99
|
-
return /* @__PURE__ */
|
|
112
|
+
), Ze = m("IrisChatWorkflows", ({ className: s, children: a, onShowMore: t, ...r }, n) => {
|
|
113
|
+
const { t: d } = v();
|
|
114
|
+
return /* @__PURE__ */ l(
|
|
100
115
|
"div",
|
|
101
116
|
{
|
|
102
117
|
ref: n,
|
|
103
118
|
"data-component": "iris-chat-workflows",
|
|
104
|
-
className:
|
|
119
|
+
className: o("flex flex-col gap-2 pb-6", s),
|
|
105
120
|
...r,
|
|
106
121
|
children: [
|
|
107
|
-
/* @__PURE__ */ e("p", { className: "text-xs font-medium capitalize leading-4 text-content-secondary", children:
|
|
122
|
+
/* @__PURE__ */ e("p", { className: "text-xs font-medium capitalize leading-4 text-content-secondary", children: d("irisChat.suggestedWorkflows") }),
|
|
108
123
|
/* @__PURE__ */ e("div", { className: "flex flex-col", children: a }),
|
|
109
|
-
t ? /* @__PURE__ */
|
|
110
|
-
|
|
124
|
+
t ? /* @__PURE__ */ l(
|
|
125
|
+
u,
|
|
111
126
|
{
|
|
112
127
|
type: "button",
|
|
113
128
|
variant: "link",
|
|
114
129
|
className: "h-auto justify-start px-0 text-sm",
|
|
115
130
|
onClick: t,
|
|
116
131
|
children: [
|
|
117
|
-
|
|
118
|
-
/* @__PURE__ */ e(
|
|
132
|
+
d("irisChat.showMore"),
|
|
133
|
+
/* @__PURE__ */ e(P, { size: 16, className: "rotate-90" })
|
|
119
134
|
]
|
|
120
135
|
}
|
|
121
136
|
) : null
|
|
122
137
|
]
|
|
123
138
|
}
|
|
124
139
|
);
|
|
125
|
-
}),
|
|
140
|
+
}), $e = m(
|
|
126
141
|
"IrisChatWorkflow",
|
|
127
|
-
({ className: s, title: a, description: t, type: r = "button", ...n },
|
|
142
|
+
({ className: s, title: a, description: t, type: r = "button", ...n }, d) => /* @__PURE__ */ l(
|
|
128
143
|
"button",
|
|
129
144
|
{
|
|
130
|
-
ref:
|
|
145
|
+
ref: d,
|
|
131
146
|
type: r,
|
|
132
147
|
"data-component": "iris-chat-workflow",
|
|
133
|
-
className:
|
|
148
|
+
className: o(
|
|
134
149
|
"flex items-center gap-2 rounded-md py-2 text-start hover:bg-accent",
|
|
135
150
|
s
|
|
136
151
|
),
|
|
137
152
|
...n,
|
|
138
153
|
children: [
|
|
139
|
-
/* @__PURE__ */ e(
|
|
140
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ e(T, { size: 16 }),
|
|
155
|
+
/* @__PURE__ */ l("span", { className: "min-w-0 flex-1", children: [
|
|
141
156
|
/* @__PURE__ */ e("span", { className: "block truncate text-sm font-medium text-content", children: a }),
|
|
142
157
|
t ? /* @__PURE__ */ e("span", { className: "block truncate text-xs text-content-caption", children: t }) : null
|
|
143
158
|
] }),
|
|
144
|
-
/* @__PURE__ */ e(
|
|
159
|
+
/* @__PURE__ */ e(P, { size: 16, className: "text-content-secondary" })
|
|
145
160
|
]
|
|
146
161
|
}
|
|
147
162
|
)
|
|
148
|
-
),
|
|
163
|
+
), et = m(
|
|
149
164
|
"IrisChatThread",
|
|
150
165
|
({ className: s, ...a }, t) => /* @__PURE__ */ e(
|
|
151
166
|
"div",
|
|
@@ -155,37 +170,37 @@ const we = d(
|
|
|
155
170
|
role: "log",
|
|
156
171
|
"aria-live": "polite",
|
|
157
172
|
"aria-relevant": "additions",
|
|
158
|
-
className:
|
|
173
|
+
className: o("flex min-w-0 w-full flex-col gap-4 py-4", s),
|
|
159
174
|
...a
|
|
160
175
|
}
|
|
161
176
|
)
|
|
162
|
-
),
|
|
177
|
+
), tt = m(
|
|
163
178
|
"IrisChatDay",
|
|
164
179
|
({ className: s, children: a, ...t }, r) => /* @__PURE__ */ e(
|
|
165
180
|
"div",
|
|
166
181
|
{
|
|
167
182
|
ref: r,
|
|
168
183
|
"data-component": "iris-chat-day",
|
|
169
|
-
className:
|
|
184
|
+
className: o("flex justify-center", s),
|
|
170
185
|
...t,
|
|
171
186
|
children: /* @__PURE__ */ e("span", { className: "rounded-full bg-secondary px-3 py-1 text-xs font-medium text-content-secondary", children: a })
|
|
172
187
|
}
|
|
173
188
|
)
|
|
174
|
-
),
|
|
189
|
+
), at = m(
|
|
175
190
|
"IrisChatMessage",
|
|
176
|
-
({ className: s, role: a, time: t, framed: r, children: n, ...
|
|
191
|
+
({ className: s, role: a, time: t, framed: r, children: n, ...d }, b) => /* @__PURE__ */ e(
|
|
177
192
|
"article",
|
|
178
193
|
{
|
|
179
|
-
ref:
|
|
194
|
+
ref: b,
|
|
180
195
|
"data-component": "iris-chat-message",
|
|
181
196
|
"data-role": a,
|
|
182
|
-
className:
|
|
197
|
+
className: o(
|
|
183
198
|
"flex min-w-0 w-full flex-col gap-1",
|
|
184
199
|
a === "user" ? "items-end" : "items-start",
|
|
185
200
|
s
|
|
186
201
|
),
|
|
187
|
-
...
|
|
188
|
-
children: /* @__PURE__ */
|
|
202
|
+
...d,
|
|
203
|
+
children: /* @__PURE__ */ l("div", { "data-slot": "bubble", className: ze({ role: a, framed: r }), children: [
|
|
189
204
|
n,
|
|
190
205
|
t ? /* @__PURE__ */ e(
|
|
191
206
|
"time",
|
|
@@ -197,118 +212,137 @@ const we = d(
|
|
|
197
212
|
] })
|
|
198
213
|
}
|
|
199
214
|
)
|
|
200
|
-
),
|
|
215
|
+
), Pe = ["notAsked", "tone", "incorrect", "other"], rt = m(
|
|
201
216
|
"IrisChatActions",
|
|
202
217
|
({
|
|
203
218
|
className: s,
|
|
204
219
|
liked: a,
|
|
205
220
|
disliked: t,
|
|
206
221
|
copyText: r,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
222
|
+
speakText: n,
|
|
223
|
+
speechLocale: d,
|
|
224
|
+
onLike: b,
|
|
225
|
+
onDislike: f,
|
|
226
|
+
onCopy: c,
|
|
227
|
+
onRetry: h,
|
|
228
|
+
onSpeak: I,
|
|
229
|
+
onSpeechNotice: z,
|
|
230
|
+
onFeedback: y,
|
|
231
|
+
..._
|
|
232
|
+
}, A) => {
|
|
233
|
+
const { t: i } = v(), [g, W] = x(!1), [R, S] = x(!1), k = Q(null);
|
|
234
|
+
X(
|
|
235
|
+
() => () => {
|
|
236
|
+
k.current !== null && window.clearTimeout(k.current);
|
|
237
|
+
},
|
|
238
|
+
[]
|
|
239
|
+
);
|
|
240
|
+
const [w, E] = x(!1), [K, G] = x(!1), [O, U] = x("notAsked"), [j, F] = x(""), [H, B] = x(!1), L = {
|
|
216
241
|
notAsked: i("irisChat.feedbackNotAsked"),
|
|
217
242
|
tone: i("irisChat.feedbackTone"),
|
|
218
243
|
incorrect: i("irisChat.feedbackIncorrect"),
|
|
219
244
|
other: i("irisChat.feedbackOther")
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
245
|
+
}, M = Ce({ speakText: n, copyText: r }), V = M.length > 0 || !!I, Y = () => {
|
|
246
|
+
(async () => {
|
|
247
|
+
if (!r) {
|
|
248
|
+
c?.();
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
await ge(r) && (c?.(), W(!0), S(!0), k.current !== null && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
|
|
252
|
+
W(!1), S(!1), k.current = null;
|
|
253
|
+
}, xe));
|
|
254
|
+
})();
|
|
255
|
+
}, q = () => {
|
|
256
|
+
if (I) {
|
|
257
|
+
I();
|
|
226
258
|
return;
|
|
227
259
|
}
|
|
228
|
-
if (
|
|
229
|
-
|
|
230
|
-
if (N) {
|
|
231
|
-
window.speechSynthesis.cancel(), y(!1);
|
|
260
|
+
if (w) {
|
|
261
|
+
Ie(), E(!1);
|
|
232
262
|
return;
|
|
233
263
|
}
|
|
234
|
-
|
|
235
|
-
|
|
264
|
+
ke({
|
|
265
|
+
text: n ?? r ?? "",
|
|
266
|
+
locale: d,
|
|
267
|
+
onSpeakingChange: E,
|
|
268
|
+
onNotice: z
|
|
269
|
+
});
|
|
236
270
|
};
|
|
237
|
-
return /* @__PURE__ */
|
|
271
|
+
return /* @__PURE__ */ l(
|
|
238
272
|
"div",
|
|
239
273
|
{
|
|
240
|
-
ref:
|
|
274
|
+
ref: A,
|
|
241
275
|
"data-component": "iris-chat-actions",
|
|
242
|
-
className:
|
|
243
|
-
...
|
|
276
|
+
className: o("flex items-center gap-0.5", s),
|
|
277
|
+
..._,
|
|
244
278
|
children: [
|
|
245
|
-
/* @__PURE__ */ e(
|
|
246
|
-
|
|
279
|
+
/* @__PURE__ */ e(C, { label: i("irisChat.like"), children: /* @__PURE__ */ e(
|
|
280
|
+
u,
|
|
247
281
|
{
|
|
248
282
|
type: "button",
|
|
249
283
|
variant: "ghost",
|
|
250
284
|
size: "icon",
|
|
251
285
|
"aria-label": i("irisChat.like"),
|
|
252
286
|
"aria-pressed": a,
|
|
253
|
-
className:
|
|
254
|
-
onClick:
|
|
255
|
-
children: /* @__PURE__ */ e(
|
|
287
|
+
className: o(N, a && "text-brand bg-brand-subtle"),
|
|
288
|
+
onClick: b,
|
|
289
|
+
children: /* @__PURE__ */ e(ce, { size: 16 })
|
|
256
290
|
}
|
|
257
291
|
) }),
|
|
258
|
-
|
|
259
|
-
|
|
292
|
+
y ? /* @__PURE__ */ l(
|
|
293
|
+
$,
|
|
260
294
|
{
|
|
261
|
-
open:
|
|
262
|
-
onOpenChange: (
|
|
263
|
-
|
|
295
|
+
open: K,
|
|
296
|
+
onOpenChange: (p) => {
|
|
297
|
+
G(p), p || (B(!1), F(""));
|
|
264
298
|
},
|
|
265
299
|
children: [
|
|
266
|
-
/* @__PURE__ */ e(
|
|
267
|
-
|
|
300
|
+
/* @__PURE__ */ e(C, { label: i("irisChat.dislike"), children: /* @__PURE__ */ e(ee, { asChild: !0, children: /* @__PURE__ */ e(
|
|
301
|
+
u,
|
|
268
302
|
{
|
|
269
303
|
type: "button",
|
|
270
304
|
variant: "ghost",
|
|
271
305
|
size: "icon",
|
|
272
306
|
"aria-label": i("irisChat.dislike"),
|
|
273
307
|
"aria-pressed": t,
|
|
274
|
-
className:
|
|
275
|
-
onClick:
|
|
276
|
-
children: /* @__PURE__ */ e(
|
|
308
|
+
className: o(N, t && "text-brand bg-brand-subtle"),
|
|
309
|
+
onClick: f,
|
|
310
|
+
children: /* @__PURE__ */ e(D, { size: 16 })
|
|
277
311
|
}
|
|
278
312
|
) }) }),
|
|
279
|
-
/* @__PURE__ */ e(
|
|
280
|
-
/* @__PURE__ */ e(
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children:
|
|
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: [
|
|
316
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: Pe.map((p) => /* @__PURE__ */ e(
|
|
283
317
|
"button",
|
|
284
318
|
{
|
|
285
319
|
type: "button",
|
|
286
|
-
className:
|
|
320
|
+
className: o(
|
|
287
321
|
"rounded-full border px-3 py-1 text-xs font-medium",
|
|
288
|
-
|
|
322
|
+
O === p ? "border-brand bg-brand-subtle text-brand" : "border-stroke-subtle text-content"
|
|
289
323
|
),
|
|
290
|
-
onClick: () =>
|
|
291
|
-
children:
|
|
324
|
+
onClick: () => U(p),
|
|
325
|
+
children: L[p]
|
|
292
326
|
},
|
|
293
|
-
|
|
327
|
+
p
|
|
294
328
|
)) }),
|
|
295
329
|
/* @__PURE__ */ e(
|
|
296
330
|
"textarea",
|
|
297
331
|
{
|
|
298
|
-
value:
|
|
332
|
+
value: j,
|
|
299
333
|
placeholder: i("irisChat.feedbackPlaceholder"),
|
|
300
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",
|
|
301
|
-
onChange: (
|
|
335
|
+
onChange: (p) => F(p.target.value)
|
|
302
336
|
}
|
|
303
337
|
),
|
|
304
338
|
/* @__PURE__ */ e(
|
|
305
|
-
|
|
339
|
+
u,
|
|
306
340
|
{
|
|
307
341
|
type: "button",
|
|
308
342
|
size: "sm",
|
|
309
343
|
className: "self-end",
|
|
310
344
|
onClick: () => {
|
|
311
|
-
|
|
345
|
+
y({ reason: O, details: j }), B(!0), window.setTimeout(() => G(!1), 1200);
|
|
312
346
|
},
|
|
313
347
|
children: i("irisChat.feedbackSubmit")
|
|
314
348
|
}
|
|
@@ -317,139 +351,156 @@ const we = d(
|
|
|
317
351
|
] }) })
|
|
318
352
|
]
|
|
319
353
|
}
|
|
320
|
-
) : /* @__PURE__ */ e(
|
|
321
|
-
|
|
354
|
+
) : /* @__PURE__ */ e(C, { label: i("irisChat.dislike"), children: /* @__PURE__ */ e(
|
|
355
|
+
u,
|
|
322
356
|
{
|
|
323
357
|
type: "button",
|
|
324
358
|
variant: "ghost",
|
|
325
359
|
size: "icon",
|
|
326
360
|
"aria-label": i("irisChat.dislike"),
|
|
327
361
|
"aria-pressed": t,
|
|
328
|
-
className:
|
|
329
|
-
onClick:
|
|
330
|
-
children: /* @__PURE__ */ e(
|
|
362
|
+
className: o(N, t && "text-brand bg-brand-subtle"),
|
|
363
|
+
onClick: f,
|
|
364
|
+
children: /* @__PURE__ */ e(D, { size: 16 })
|
|
331
365
|
}
|
|
332
366
|
) }),
|
|
333
|
-
r ||
|
|
334
|
-
|
|
367
|
+
r || c ? /* @__PURE__ */ e(
|
|
368
|
+
C,
|
|
335
369
|
{
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
370
|
+
label: i(g ? "irisChat.copied" : "irisChat.copy"),
|
|
371
|
+
open: R,
|
|
372
|
+
onOpenChange: S,
|
|
373
|
+
children: /* @__PURE__ */ e(
|
|
374
|
+
u,
|
|
375
|
+
{
|
|
376
|
+
type: "button",
|
|
377
|
+
variant: "ghost",
|
|
378
|
+
size: "icon",
|
|
379
|
+
"aria-label": i(g ? "irisChat.copied" : "irisChat.copy"),
|
|
380
|
+
"data-testid": "iris-chat-copy",
|
|
381
|
+
"data-copied": g ? "" : void 0,
|
|
382
|
+
className: o(
|
|
383
|
+
N,
|
|
384
|
+
g && be
|
|
385
|
+
),
|
|
386
|
+
onClick: Y,
|
|
387
|
+
children: g ? /* @__PURE__ */ e(de, { size: 16 }) : /* @__PURE__ */ e(me, { size: 16 })
|
|
388
|
+
}
|
|
389
|
+
)
|
|
343
390
|
}
|
|
344
|
-
)
|
|
345
|
-
/* @__PURE__ */ e(
|
|
346
|
-
|
|
391
|
+
) : null,
|
|
392
|
+
V ? /* @__PURE__ */ e(C, { label: i(w ? "irisChat.stopSpeaking" : "irisChat.speak"), children: /* @__PURE__ */ e(
|
|
393
|
+
u,
|
|
347
394
|
{
|
|
348
395
|
type: "button",
|
|
349
396
|
variant: "ghost",
|
|
350
397
|
size: "icon",
|
|
351
|
-
"aria-label": i(
|
|
352
|
-
"aria-pressed":
|
|
353
|
-
|
|
354
|
-
|
|
398
|
+
"aria-label": i(w ? "irisChat.stopSpeaking" : "irisChat.speak"),
|
|
399
|
+
"aria-pressed": w,
|
|
400
|
+
"data-testid": "iris-chat-speak",
|
|
401
|
+
disabled: !I && M.length === 0,
|
|
402
|
+
className: o(N, w && "text-brand bg-brand-subtle"),
|
|
403
|
+
onClick: q,
|
|
404
|
+
children: /* @__PURE__ */ e(he, { size: 16 })
|
|
355
405
|
}
|
|
356
|
-
) }),
|
|
357
|
-
|
|
358
|
-
|
|
406
|
+
) }) : null,
|
|
407
|
+
h ? /* @__PURE__ */ e(C, { label: i("irisChat.retry"), children: /* @__PURE__ */ e(
|
|
408
|
+
u,
|
|
359
409
|
{
|
|
360
410
|
type: "button",
|
|
361
411
|
variant: "ghost",
|
|
362
412
|
size: "icon",
|
|
363
413
|
"aria-label": i("irisChat.retry"),
|
|
364
414
|
"data-testid": "iris-chat-retry",
|
|
365
|
-
|
|
366
|
-
|
|
415
|
+
className: N,
|
|
416
|
+
onClick: h,
|
|
417
|
+
children: /* @__PURE__ */ e(pe, { size: 16 })
|
|
367
418
|
}
|
|
368
419
|
) }) : null
|
|
369
420
|
]
|
|
370
421
|
}
|
|
371
422
|
);
|
|
372
423
|
}
|
|
373
|
-
),
|
|
424
|
+
), st = m(
|
|
374
425
|
"IrisChatFollowUps",
|
|
375
426
|
({ className: s, ...a }, t) => /* @__PURE__ */ e(
|
|
376
427
|
"div",
|
|
377
428
|
{
|
|
378
429
|
ref: t,
|
|
379
430
|
"data-component": "iris-chat-follow-ups",
|
|
380
|
-
className:
|
|
431
|
+
className: o("flex w-full flex-col overflow-hidden rounded-xl border border-stroke-subtle", s),
|
|
381
432
|
...a
|
|
382
433
|
}
|
|
383
434
|
)
|
|
384
|
-
),
|
|
435
|
+
), it = m(
|
|
385
436
|
"IrisChatFollowUp",
|
|
386
|
-
({ className: s, children: a, type: t = "button", ...r }, n) => /* @__PURE__ */
|
|
437
|
+
({ className: s, children: a, type: t = "button", ...r }, n) => /* @__PURE__ */ l(
|
|
387
438
|
"button",
|
|
388
439
|
{
|
|
389
440
|
ref: n,
|
|
390
441
|
type: t,
|
|
391
442
|
"data-component": "iris-chat-follow-up",
|
|
392
|
-
className:
|
|
443
|
+
className: o(
|
|
393
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",
|
|
394
445
|
s
|
|
395
446
|
),
|
|
396
447
|
...r,
|
|
397
448
|
children: [
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
/* @__PURE__ */ e(
|
|
449
|
+
/* @__PURE__ */ l("span", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
450
|
+
/* @__PURE__ */ e(T, { size: 14 }),
|
|
400
451
|
/* @__PURE__ */ e("span", { className: "min-w-0 whitespace-normal", children: a })
|
|
401
452
|
] }),
|
|
402
|
-
/* @__PURE__ */ e(
|
|
453
|
+
/* @__PURE__ */ e(P, { size: 16, className: "shrink-0 text-content-secondary" })
|
|
403
454
|
]
|
|
404
455
|
}
|
|
405
456
|
)
|
|
406
|
-
),
|
|
457
|
+
), nt = m(
|
|
407
458
|
"IrisChatAttachment",
|
|
408
|
-
({ className: s, name: a, kind: t = "file", sizeLabel: r, previewUrl: n, onRemove:
|
|
409
|
-
const { t: f } =
|
|
410
|
-
return /* @__PURE__ */
|
|
459
|
+
({ className: s, name: a, kind: t = "file", sizeLabel: r, previewUrl: n, onRemove: d }, b) => {
|
|
460
|
+
const { t: f } = v();
|
|
461
|
+
return /* @__PURE__ */ l(
|
|
411
462
|
"div",
|
|
412
463
|
{
|
|
413
|
-
ref:
|
|
464
|
+
ref: b,
|
|
414
465
|
"data-component": "iris-chat-attachment",
|
|
415
466
|
"data-kind": t,
|
|
416
|
-
className:
|
|
467
|
+
className: o(
|
|
417
468
|
"flex max-w-full items-center gap-2 rounded-xl bg-canvas-elevated px-2 py-1.5 text-xs text-content",
|
|
418
469
|
s
|
|
419
470
|
),
|
|
420
471
|
children: [
|
|
421
|
-
t === "image" && n ? /* @__PURE__ */ e("img", { src: n, alt: "", className: "size-10 shrink-0 rounded-lg object-cover" }) : /* @__PURE__ */ e(
|
|
422
|
-
/* @__PURE__ */
|
|
472
|
+
t === "image" && n ? /* @__PURE__ */ e("img", { src: n, alt: "", className: "size-10 shrink-0 rounded-lg object-cover" }) : /* @__PURE__ */ e(ue, { size: 14 }),
|
|
473
|
+
/* @__PURE__ */ l("span", { className: "min-w-0", children: [
|
|
423
474
|
/* @__PURE__ */ e("span", { className: "block truncate font-medium", children: a }),
|
|
424
475
|
r ? /* @__PURE__ */ e("span", { className: "block text-content-caption", children: r }) : null
|
|
425
476
|
] }),
|
|
426
|
-
|
|
427
|
-
|
|
477
|
+
d ? /* @__PURE__ */ e(C, { label: f("irisChat.removeAttachment"), children: /* @__PURE__ */ e(
|
|
478
|
+
u,
|
|
428
479
|
{
|
|
429
480
|
type: "button",
|
|
430
481
|
variant: "ghost",
|
|
431
482
|
size: "icon",
|
|
432
483
|
className: "size-6",
|
|
433
484
|
"aria-label": f("irisChat.removeAttachment"),
|
|
434
|
-
onClick:
|
|
435
|
-
children: /* @__PURE__ */ e(
|
|
485
|
+
onClick: d,
|
|
486
|
+
children: /* @__PURE__ */ e(Z, { size: 12 })
|
|
436
487
|
}
|
|
437
488
|
) }) : null
|
|
438
489
|
]
|
|
439
490
|
}
|
|
440
491
|
);
|
|
441
492
|
}
|
|
442
|
-
),
|
|
493
|
+
), ot = m(
|
|
443
494
|
"IrisChatError",
|
|
444
495
|
({ className: s, title: a, description: t, onRetry: r }, n) => {
|
|
445
|
-
const { t:
|
|
446
|
-
return /* @__PURE__ */ e("div", { ref: n, "data-component": "iris-chat-error", className:
|
|
447
|
-
/* @__PURE__ */ e(
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
-
/* @__PURE__ */ e(
|
|
450
|
-
/* @__PURE__ */ e(
|
|
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: [
|
|
498
|
+
/* @__PURE__ */ e(ne, { variant: "error" }),
|
|
499
|
+
/* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
|
|
500
|
+
/* @__PURE__ */ e(oe, { children: a ?? d("irisChat.generationError") }),
|
|
501
|
+
/* @__PURE__ */ e(le, { children: t ?? d("irisChat.generationErrorBody") }),
|
|
451
502
|
r ? /* @__PURE__ */ e(
|
|
452
|
-
|
|
503
|
+
u,
|
|
453
504
|
{
|
|
454
505
|
type: "button",
|
|
455
506
|
size: "sm",
|
|
@@ -457,13 +508,13 @@ const we = d(
|
|
|
457
508
|
className: "w-fit",
|
|
458
509
|
"data-testid": "iris-chat-error-retry",
|
|
459
510
|
onClick: r,
|
|
460
|
-
children:
|
|
511
|
+
children: d("irisChat.retry")
|
|
461
512
|
}
|
|
462
513
|
) : null
|
|
463
514
|
] })
|
|
464
515
|
] }) });
|
|
465
516
|
}
|
|
466
|
-
),
|
|
517
|
+
), lt = m(
|
|
467
518
|
"IrisChatChip",
|
|
468
519
|
({ className: s, type: a = "button", variant: t = "default", ...r }, n) => /* @__PURE__ */ e(
|
|
469
520
|
"button",
|
|
@@ -472,7 +523,7 @@ const we = d(
|
|
|
472
523
|
type: a,
|
|
473
524
|
"data-component": "iris-chat-chip",
|
|
474
525
|
"data-variant": t,
|
|
475
|
-
className:
|
|
526
|
+
className: o(
|
|
476
527
|
"rounded-full px-3 py-1.5 text-sm font-medium leading-5 disabled:pointer-events-none disabled:opacity-50",
|
|
477
528
|
t === "outline" ? "border border-stroke bg-canvas text-content hover:bg-accent" : "border border-stroke-subtle bg-secondary text-content hover:bg-accent",
|
|
478
529
|
s
|
|
@@ -482,18 +533,18 @@ const we = d(
|
|
|
482
533
|
)
|
|
483
534
|
);
|
|
484
535
|
export {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
536
|
+
rt as IrisChatActions,
|
|
537
|
+
nt as IrisChatAttachment,
|
|
538
|
+
lt as IrisChatChip,
|
|
539
|
+
tt as IrisChatDay,
|
|
540
|
+
ot as IrisChatError,
|
|
541
|
+
it as IrisChatFollowUp,
|
|
542
|
+
st as IrisChatFollowUps,
|
|
543
|
+
Je as IrisChatGreeting,
|
|
544
|
+
at as IrisChatMessage,
|
|
545
|
+
Xe as IrisChatSuggestion,
|
|
546
|
+
Qe as IrisChatSuggestions,
|
|
547
|
+
et as IrisChatThread,
|
|
548
|
+
$e as IrisChatWorkflow,
|
|
549
|
+
Ze as IrisChatWorkflows
|
|
499
550
|
};
|