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,55 +1,60 @@
|
|
|
1
|
-
import { IrisChat as
|
|
2
|
-
import { IrisChatComposer as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { IrisChat as a } from "./iris-chat.js";
|
|
2
|
+
import { IrisChatComposer as s } from "./iris-chat-composer.js";
|
|
3
|
+
import { clampIrisChatFrame as o, createCompactIrisChatFrame as h, createDefaultIrisChatFrame as C } from "./iris-chat-frame.js";
|
|
4
|
+
import { IrisChatActions as n, IrisChatAttachment as m, IrisChatChip as p, IrisChatDay as f, IrisChatError as u, IrisChatFollowUp as c, IrisChatFollowUps as d, IrisChatGreeting as l, IrisChatMessage as g, IrisChatSuggestion as x, IrisChatSuggestions as H, IrisChatThread as B, IrisChatWorkflow as k, IrisChatWorkflows as w } from "./iris-chat-thread.js";
|
|
5
|
+
import { IrisChatCitations as M, IrisChatProcessSteps as S, IrisChatThinking as T, IrisChatThinkingStatus as A } from "./iris-chat-thinking.js";
|
|
6
|
+
import { IrisChatMarkdown as L } from "./iris-chat-markdown.js";
|
|
7
|
+
import { IrisChatPrompt as y } from "./iris-chat-prompt.js";
|
|
8
|
+
import { IrisChatArtifact as W, IrisChatScenario as z } from "./iris-chat-artifact.js";
|
|
9
|
+
import { IrisChatList as G, IrisChatListItem as N, IrisChatMenu as b, IrisChatMenuSection as j } from "./iris-chat-menu.js";
|
|
10
|
+
import { useIrisChat as v } from "./iris-chat-context.js";
|
|
11
|
+
import { IrisChatBody as K, IrisChatDisclaimer as O, IrisChatFooter as Q, IrisChatHeader as R, IrisChatHeaderBackButton as V, IrisChatHeaderCloseButton as X, IrisChatHeaderLeading as Y, IrisChatHeaderMenuButton as Z, IrisChatHeaderMinimizeButton as _, IrisChatHeaderNewChatButton as $, IrisChatHeaderTitle as rr, IrisChatHeaderTrailing as tr, IrisChatIconButton as ar, IrisChatPanel as ir, IrisChatTrigger as sr } from "./iris-chat-chrome.js";
|
|
10
12
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
13
|
+
a as IrisChat,
|
|
14
|
+
n as IrisChatActions,
|
|
15
|
+
W as IrisChatArtifact,
|
|
16
|
+
m as IrisChatAttachment,
|
|
17
|
+
K as IrisChatBody,
|
|
18
|
+
p as IrisChatChip,
|
|
19
|
+
M as IrisChatCitations,
|
|
20
|
+
s as IrisChatComposer,
|
|
21
|
+
f as IrisChatDay,
|
|
22
|
+
O as IrisChatDisclaimer,
|
|
23
|
+
u as IrisChatError,
|
|
24
|
+
c as IrisChatFollowUp,
|
|
25
|
+
d as IrisChatFollowUps,
|
|
26
|
+
Q as IrisChatFooter,
|
|
27
|
+
l as IrisChatGreeting,
|
|
28
|
+
R as IrisChatHeader,
|
|
29
|
+
V as IrisChatHeaderBackButton,
|
|
30
|
+
X as IrisChatHeaderCloseButton,
|
|
31
|
+
Y as IrisChatHeaderLeading,
|
|
32
|
+
Z as IrisChatHeaderMenuButton,
|
|
33
|
+
_ as IrisChatHeaderMinimizeButton,
|
|
34
|
+
$ as IrisChatHeaderNewChatButton,
|
|
35
|
+
rr as IrisChatHeaderTitle,
|
|
36
|
+
tr as IrisChatHeaderTrailing,
|
|
37
|
+
ar as IrisChatIconButton,
|
|
38
|
+
G as IrisChatList,
|
|
39
|
+
N as IrisChatListItem,
|
|
40
|
+
L as IrisChatMarkdown,
|
|
41
|
+
b as IrisChatMenu,
|
|
42
|
+
j as IrisChatMenuSection,
|
|
43
|
+
g as IrisChatMessage,
|
|
44
|
+
ir as IrisChatPanel,
|
|
45
|
+
S as IrisChatProcessSteps,
|
|
46
|
+
y as IrisChatPrompt,
|
|
47
|
+
z as IrisChatScenario,
|
|
48
|
+
x as IrisChatSuggestion,
|
|
49
|
+
H as IrisChatSuggestions,
|
|
50
|
+
T as IrisChatThinking,
|
|
51
|
+
A as IrisChatThinkingStatus,
|
|
52
|
+
B as IrisChatThread,
|
|
53
|
+
sr as IrisChatTrigger,
|
|
54
|
+
k as IrisChatWorkflow,
|
|
55
|
+
w as IrisChatWorkflows,
|
|
56
|
+
o as clampIrisChatFrame,
|
|
57
|
+
h as createCompactIrisChatFrame,
|
|
58
|
+
C as createDefaultIrisChatFrame,
|
|
59
|
+
v as useIrisChat
|
|
55
60
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IrisChatBodyProps, IrisChatFooterProps, IrisChatHeaderProps, IrisChatIconButtonProps, IrisChatPanelProps } from './iris-chat.types';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const IrisChatPanel: React.ForwardRefExoticComponent<IrisChatPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const IrisChatHeader: React.ForwardRefExoticComponent<IrisChatHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
declare const IrisChatHeaderLeading: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const IrisChatHeaderTrailing: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const IrisChatHeaderTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & {
|
|
8
|
+
showBrand?: boolean;
|
|
9
|
+
} & React.RefAttributes<HTMLHeadingElement>>;
|
|
10
|
+
declare const IrisChatIconButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
11
|
+
label: string;
|
|
12
|
+
variant?: "secondary" | "ghost";
|
|
13
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
declare const IrisChatHeaderMenuButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
15
|
+
label?: string;
|
|
16
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
declare const IrisChatHeaderBackButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
18
|
+
label?: string;
|
|
19
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
declare const IrisChatHeaderNewChatButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
21
|
+
label?: string;
|
|
22
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
declare const IrisChatHeaderMinimizeButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
24
|
+
label?: string;
|
|
25
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
26
|
+
declare const IrisChatHeaderCloseButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
27
|
+
label?: string;
|
|
28
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
29
|
+
declare const IrisChatBody: React.ForwardRefExoticComponent<IrisChatBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
declare const IrisChatFooter: React.ForwardRefExoticComponent<IrisChatFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
declare const IrisChatDisclaimer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & {
|
|
32
|
+
href?: string;
|
|
33
|
+
} & React.RefAttributes<HTMLParagraphElement>>;
|
|
34
|
+
declare const IrisChatTrigger: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
35
|
+
asChild?: boolean;
|
|
36
|
+
size?: "sm" | "md" | "lg";
|
|
37
|
+
shape?: "default" | "pill";
|
|
38
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
39
|
+
export { IrisChatBody, IrisChatDisclaimer, IrisChatFooter, IrisChatHeader, IrisChatHeaderBackButton, IrisChatHeaderCloseButton, IrisChatHeaderLeading, IrisChatHeaderMenuButton, IrisChatHeaderMinimizeButton, IrisChatHeaderNewChatButton, IrisChatHeaderTitle, IrisChatHeaderTrailing, IrisChatIconButton, IrisChatPanel, IrisChatTrigger, };
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { jsx as t, jsxs as C, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import { Slot as N } from "@radix-ui/react-slot";
|
|
4
|
+
import { Back as y, Cross as z, Draw as k } from "impact-nova-icons";
|
|
5
|
+
import { Popover as T, PopoverTrigger as W, PopoverContent as D, PopoverHeader as F, PopoverTitle as R, PopoverBody as M } from "../../feedback/popover/popover.js";
|
|
6
|
+
import { ButtonIconTooltip as O } from "../../feedback/tooltip/button-icon-tooltip.js";
|
|
7
|
+
import { Button as G } from "../../primitives/button/button.js";
|
|
8
|
+
import { IrisButton as L } from "../../primitives/iris/iris.js";
|
|
9
|
+
import { IrisAlanGradientIcon as v } from "../../primitives/iris/iris-alan-gradient-icon.js";
|
|
10
|
+
import { useImpactNovaI18n as p } from "../../../i18n/use-impact-nova-i18n.js";
|
|
11
|
+
import { useComposedRefs as x } from "../../../lib/compose-refs.js";
|
|
12
|
+
import { createComponent as c } from "../../../lib/primitives/create-component.js";
|
|
13
|
+
import { cn as m } from "../../../lib/utils.js";
|
|
14
|
+
import { useIrisChat as u, useIrisChatOptional as S } from "./iris-chat-context.js";
|
|
15
|
+
import { IrisChatHamburgerIcon as j, IrisChatMinimizeIcon as V } from "./iris-chat-icons.js";
|
|
16
|
+
import { useIrisChatWindowGeometryOptional as q, IrisChatWindowGeometryProvider as A } from "./iris-chat-window-geometry-context.js";
|
|
17
|
+
import { IrisChatWindowShell as E } from "./iris-chat-window-shell.js";
|
|
18
|
+
import { useIrisChatWindowGeometry as J } from "./iris-chat-window-geometry.js";
|
|
19
|
+
import { irisChatHeaderVariants as K, irisChatPanelVariants as Q } from "./iris-chat.variants.js";
|
|
20
|
+
import { readIrisChatHorizontalPaddingClass as H, readIrisChatDisclaimerPaddingClass as U } from "./iris-chat-window-chrome.js";
|
|
21
|
+
const ue = c(
|
|
22
|
+
"IrisChatPanel",
|
|
23
|
+
({ className: i, hidden: r, children: a, ...n }, o) => {
|
|
24
|
+
const e = u(), s = r ?? !e.open, d = J({
|
|
25
|
+
frame: e.frame,
|
|
26
|
+
commitFrame: e.commitFrame,
|
|
27
|
+
resetFrame: e.resetFrame
|
|
28
|
+
}), l = x(o, d.panelRef, e.registerPanelNode);
|
|
29
|
+
return s ? null : e.isWindowPlacement ? /* @__PURE__ */ t(A, { value: d.geometry, children: /* @__PURE__ */ t(
|
|
30
|
+
E,
|
|
31
|
+
{
|
|
32
|
+
panelRef: l,
|
|
33
|
+
isClosing: e.isClosing,
|
|
34
|
+
isOpening: e.isOpening,
|
|
35
|
+
className: i,
|
|
36
|
+
children: a
|
|
37
|
+
}
|
|
38
|
+
) }) : /* @__PURE__ */ t(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
ref: o,
|
|
42
|
+
"data-component": "iris-chat-panel",
|
|
43
|
+
"data-placement": e.placement,
|
|
44
|
+
className: m(Q({ placement: e.placement }), i),
|
|
45
|
+
...n,
|
|
46
|
+
children: a
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
), Ce = c(
|
|
51
|
+
"IrisChatHeader",
|
|
52
|
+
({ className: i, onPointerDown: r, onDoubleClick: a, ...n }, o) => {
|
|
53
|
+
const e = q();
|
|
54
|
+
return /* @__PURE__ */ t(
|
|
55
|
+
"header",
|
|
56
|
+
{
|
|
57
|
+
ref: o,
|
|
58
|
+
"data-component": "iris-chat-header",
|
|
59
|
+
"aria-grabbed": e?.isDragging ? !0 : void 0,
|
|
60
|
+
className: m(
|
|
61
|
+
K(),
|
|
62
|
+
e ? "cursor-grab active:cursor-grabbing" : void 0,
|
|
63
|
+
i
|
|
64
|
+
),
|
|
65
|
+
onPointerDown: (s) => {
|
|
66
|
+
e?.onHeaderPointerDown(s), r?.(s);
|
|
67
|
+
},
|
|
68
|
+
onDoubleClick: (s) => {
|
|
69
|
+
e?.onHeaderDoubleClick(s), a?.(s);
|
|
70
|
+
},
|
|
71
|
+
...n
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
), fe = c("IrisChatHeaderLeading", ({ className: i, ...r }, a) => /* @__PURE__ */ t(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
ref: a,
|
|
79
|
+
"data-component": "iris-chat-header-leading",
|
|
80
|
+
className: m("flex min-w-0 items-center gap-2", i),
|
|
81
|
+
...r
|
|
82
|
+
}
|
|
83
|
+
)), Ie = c("IrisChatHeaderTrailing", ({ className: i, ...r }, a) => /* @__PURE__ */ t(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
ref: a,
|
|
87
|
+
"data-component": "iris-chat-header-trailing",
|
|
88
|
+
className: m("flex shrink-0 items-center gap-2", i),
|
|
89
|
+
...r
|
|
90
|
+
}
|
|
91
|
+
)), ge = c(
|
|
92
|
+
"IrisChatHeaderTitle",
|
|
93
|
+
({ className: i, showBrand: r = !1, children: a, ...n }, o) => {
|
|
94
|
+
const { t: e } = p();
|
|
95
|
+
return /* @__PURE__ */ C("div", { className: "flex min-w-0 items-center gap-1", children: [
|
|
96
|
+
r ? /* @__PURE__ */ t(v, { size: 18 }) : null,
|
|
97
|
+
/* @__PURE__ */ t(
|
|
98
|
+
"h2",
|
|
99
|
+
{
|
|
100
|
+
ref: o,
|
|
101
|
+
"data-component": "iris-chat-header-title",
|
|
102
|
+
className: m("truncate text-sm font-semibold leading-5 text-content", i),
|
|
103
|
+
...n,
|
|
104
|
+
children: a ?? e("irisChat.askIris")
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
] });
|
|
108
|
+
}
|
|
109
|
+
), f = c(
|
|
110
|
+
"IrisChatIconButton",
|
|
111
|
+
({ className: i, label: r, children: a, type: n = "button", variant: o = "secondary", disabled: e, ...s }, d) => /* @__PURE__ */ t(O, { label: r, disabled: e, children: /* @__PURE__ */ t(
|
|
112
|
+
G,
|
|
113
|
+
{
|
|
114
|
+
ref: d,
|
|
115
|
+
type: n,
|
|
116
|
+
variant: o,
|
|
117
|
+
size: "icon",
|
|
118
|
+
"aria-label": r,
|
|
119
|
+
disabled: e,
|
|
120
|
+
"data-component": "iris-chat-icon-button",
|
|
121
|
+
className: m(
|
|
122
|
+
"text-content",
|
|
123
|
+
o === "secondary" ? "rounded-full" : "rounded-lg",
|
|
124
|
+
i
|
|
125
|
+
),
|
|
126
|
+
...s,
|
|
127
|
+
children: a
|
|
128
|
+
}
|
|
129
|
+
) })
|
|
130
|
+
), we = c("IrisChatHeaderMenuButton", ({ label: i, ...r }, a) => {
|
|
131
|
+
const { t: n } = p();
|
|
132
|
+
return /* @__PURE__ */ t(f, { ref: a, variant: "ghost", label: i ?? n("irisChat.menu"), ...r, children: /* @__PURE__ */ t(j, { size: 16 }) });
|
|
133
|
+
}), be = c("IrisChatHeaderBackButton", ({ label: i, ...r }, a) => {
|
|
134
|
+
const { t: n } = p();
|
|
135
|
+
return /* @__PURE__ */ t(f, { ref: a, variant: "ghost", label: i ?? n("irisChat.back"), ...r, children: /* @__PURE__ */ t(y, { size: 16 }) });
|
|
136
|
+
}), ve = c("IrisChatHeaderNewChatButton", ({ label: i, ...r }, a) => {
|
|
137
|
+
const { t: n } = p();
|
|
138
|
+
return /* @__PURE__ */ t(f, { ref: a, label: i ?? n("irisChat.newChat"), ...r, children: /* @__PURE__ */ t(k, { size: 16 }) });
|
|
139
|
+
}), xe = c("IrisChatHeaderMinimizeButton", ({ label: i, onClick: r, ...a }, n) => {
|
|
140
|
+
const { t: o } = p(), e = u(), s = e.placement === "minimized";
|
|
141
|
+
return /* @__PURE__ */ t(
|
|
142
|
+
f,
|
|
143
|
+
{
|
|
144
|
+
ref: n,
|
|
145
|
+
label: i ?? o(s ? "irisChat.expand" : "irisChat.minimize"),
|
|
146
|
+
"aria-pressed": s,
|
|
147
|
+
onClick: (d) => {
|
|
148
|
+
s ? e.expandFromCompactFrame() : e.applyCompactFrame(), r?.(d);
|
|
149
|
+
},
|
|
150
|
+
...a,
|
|
151
|
+
children: /* @__PURE__ */ t(V, { size: 16 })
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}), He = c("IrisChatHeaderCloseButton", ({ label: i, onClick: r, ...a }, n) => {
|
|
155
|
+
const { t: o } = p(), e = u();
|
|
156
|
+
return /* @__PURE__ */ t(
|
|
157
|
+
f,
|
|
158
|
+
{
|
|
159
|
+
ref: n,
|
|
160
|
+
label: i ?? o("aria.close"),
|
|
161
|
+
onClick: (s) => {
|
|
162
|
+
e.requestClose(), r?.(s);
|
|
163
|
+
},
|
|
164
|
+
...a,
|
|
165
|
+
children: /* @__PURE__ */ t(z, { size: 16 })
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}), Be = c(
|
|
169
|
+
"IrisChatBody",
|
|
170
|
+
({ className: i, onScroll: r, ...a }, n) => {
|
|
171
|
+
const o = u(), e = g.useRef(null), s = g.useRef(!0), d = x(n, e);
|
|
172
|
+
return g.useEffect(() => {
|
|
173
|
+
const l = e.current;
|
|
174
|
+
if (!l)
|
|
175
|
+
return;
|
|
176
|
+
const h = () => {
|
|
177
|
+
s.current && (l.scrollTop = l.scrollHeight);
|
|
178
|
+
}, I = new ResizeObserver(h), w = () => {
|
|
179
|
+
I.disconnect(), I.observe(l);
|
|
180
|
+
for (const B of l.children)
|
|
181
|
+
I.observe(B);
|
|
182
|
+
}, b = new MutationObserver(() => {
|
|
183
|
+
w(), h();
|
|
184
|
+
});
|
|
185
|
+
return b.observe(l, { childList: !0, subtree: !0, characterData: !0 }), w(), h(), () => {
|
|
186
|
+
I.disconnect(), b.disconnect();
|
|
187
|
+
};
|
|
188
|
+
}, []), /* @__PURE__ */ t(
|
|
189
|
+
"div",
|
|
190
|
+
{
|
|
191
|
+
ref: d,
|
|
192
|
+
"data-component": "iris-chat-body",
|
|
193
|
+
"data-placement": o.placement,
|
|
194
|
+
className: m(
|
|
195
|
+
"flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden overflow-y-auto overscroll-x-contain",
|
|
196
|
+
H({
|
|
197
|
+
isWindowPlacement: o.isWindowPlacement,
|
|
198
|
+
placement: o.placement
|
|
199
|
+
}),
|
|
200
|
+
i
|
|
201
|
+
),
|
|
202
|
+
onScroll: (l) => {
|
|
203
|
+
const h = l.currentTarget;
|
|
204
|
+
s.current = h.scrollHeight - h.scrollTop - h.clientHeight < 64, r?.(l);
|
|
205
|
+
},
|
|
206
|
+
...a
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
), Pe = c(
|
|
211
|
+
"IrisChatFooter",
|
|
212
|
+
({ className: i, ...r }, a) => {
|
|
213
|
+
const n = u();
|
|
214
|
+
return /* @__PURE__ */ t(
|
|
215
|
+
"div",
|
|
216
|
+
{
|
|
217
|
+
ref: a,
|
|
218
|
+
"data-component": "iris-chat-footer",
|
|
219
|
+
"data-placement": n.placement,
|
|
220
|
+
className: m(
|
|
221
|
+
"min-w-0 shrink-0 pb-2",
|
|
222
|
+
H({
|
|
223
|
+
isWindowPlacement: n.isWindowPlacement,
|
|
224
|
+
placement: n.placement
|
|
225
|
+
}),
|
|
226
|
+
i
|
|
227
|
+
),
|
|
228
|
+
...r
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
), Ne = c(
|
|
233
|
+
"IrisChatDisclaimer",
|
|
234
|
+
({ className: i, href: r, children: a, ...n }, o) => {
|
|
235
|
+
const { t: e } = p(), s = u();
|
|
236
|
+
return /* @__PURE__ */ t(
|
|
237
|
+
"p",
|
|
238
|
+
{
|
|
239
|
+
ref: o,
|
|
240
|
+
"data-component": "iris-chat-disclaimer",
|
|
241
|
+
className: m(
|
|
242
|
+
"shrink-0 text-center text-xs font-medium leading-4 text-content-caption",
|
|
243
|
+
U({ isWindowPlacement: s.isWindowPlacement }),
|
|
244
|
+
i
|
|
245
|
+
),
|
|
246
|
+
...n,
|
|
247
|
+
children: a ?? /* @__PURE__ */ C(P, { children: [
|
|
248
|
+
e("irisChat.disclaimer"),
|
|
249
|
+
" ",
|
|
250
|
+
r ? /* @__PURE__ */ t("a", { href: r, className: "underline hover:text-brand", children: e("irisChat.learnMore") }) : /* @__PURE__ */ C(T, { children: [
|
|
251
|
+
/* @__PURE__ */ t(W, { asChild: !0, children: /* @__PURE__ */ t(
|
|
252
|
+
"button",
|
|
253
|
+
{
|
|
254
|
+
type: "button",
|
|
255
|
+
className: "underline hover:text-brand",
|
|
256
|
+
"data-testid": "iris-chat-learn-more",
|
|
257
|
+
children: e("irisChat.learnMore")
|
|
258
|
+
}
|
|
259
|
+
) }),
|
|
260
|
+
/* @__PURE__ */ C(
|
|
261
|
+
D,
|
|
262
|
+
{
|
|
263
|
+
align: "center",
|
|
264
|
+
side: "top",
|
|
265
|
+
className: "iris-menu-surface w-[320px] rounded-xl p-4",
|
|
266
|
+
children: [
|
|
267
|
+
/* @__PURE__ */ t(F, { className: "mb-2", children: /* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
|
|
268
|
+
/* @__PURE__ */ t(v, { size: 18 }),
|
|
269
|
+
/* @__PURE__ */ t(R, { className: "text-sm font-semibold", children: e("irisChat.disclaimerTitle") })
|
|
270
|
+
] }) }),
|
|
271
|
+
/* @__PURE__ */ t(M, { className: "text-sm leading-5 text-content-secondary", children: e("irisChat.disclaimerBody") })
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
)
|
|
275
|
+
] })
|
|
276
|
+
] })
|
|
277
|
+
}
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
), ye = c(
|
|
281
|
+
"IrisChatTrigger",
|
|
282
|
+
({ asChild: i = !1, onClick: r, size: a = "md", shape: n = "default", className: o, ...e }, s) => {
|
|
283
|
+
const d = S(), l = (h) => {
|
|
284
|
+
d?.setOpen(!0), r?.(h);
|
|
285
|
+
};
|
|
286
|
+
return i ? /* @__PURE__ */ t(
|
|
287
|
+
N,
|
|
288
|
+
{
|
|
289
|
+
ref: s,
|
|
290
|
+
"data-component": "iris-chat-trigger",
|
|
291
|
+
className: m("pointer-events-auto", o),
|
|
292
|
+
onClick: l,
|
|
293
|
+
...e
|
|
294
|
+
}
|
|
295
|
+
) : /* @__PURE__ */ t(
|
|
296
|
+
L,
|
|
297
|
+
{
|
|
298
|
+
ref: s,
|
|
299
|
+
size: a,
|
|
300
|
+
shape: n,
|
|
301
|
+
"data-component": "iris-chat-trigger",
|
|
302
|
+
className: m("pointer-events-auto", o),
|
|
303
|
+
onClick: l,
|
|
304
|
+
...e
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
export {
|
|
310
|
+
Be as IrisChatBody,
|
|
311
|
+
Ne as IrisChatDisclaimer,
|
|
312
|
+
Pe as IrisChatFooter,
|
|
313
|
+
Ce as IrisChatHeader,
|
|
314
|
+
be as IrisChatHeaderBackButton,
|
|
315
|
+
He as IrisChatHeaderCloseButton,
|
|
316
|
+
fe as IrisChatHeaderLeading,
|
|
317
|
+
we as IrisChatHeaderMenuButton,
|
|
318
|
+
xe as IrisChatHeaderMinimizeButton,
|
|
319
|
+
ve as IrisChatHeaderNewChatButton,
|
|
320
|
+
ge as IrisChatHeaderTitle,
|
|
321
|
+
Ie as IrisChatHeaderTrailing,
|
|
322
|
+
f as IrisChatIconButton,
|
|
323
|
+
ue as IrisChatPanel,
|
|
324
|
+
ye as IrisChatTrigger
|
|
325
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type IrisChatCloseTransform = {
|
|
2
|
+
translateX: number;
|
|
3
|
+
translateY: number;
|
|
4
|
+
scale: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const IRIS_CHAT_CLOSE_ANIMATION_MS = 320;
|
|
7
|
+
export declare function readIrisChatCloseTransform(panelRect: DOMRectReadOnly, targetRect: DOMRectReadOnly): IrisChatCloseTransform;
|
|
8
|
+
export declare function readIrisChatCloseAnimationStyle(transform: IrisChatCloseTransform): {
|
|
9
|
+
transform: string;
|
|
10
|
+
opacity: string;
|
|
11
|
+
transition: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const C = 320;
|
|
2
|
+
function I(t, s) {
|
|
3
|
+
const n = t.left + t.width / 2, a = t.top + t.height / 2, i = s.left + s.width / 2, e = s.top + s.height / 2, o = s.width / t.width, r = s.height / t.height, h = Math.min(o, r, 1) * 0.85;
|
|
4
|
+
return {
|
|
5
|
+
translateX: i - n,
|
|
6
|
+
translateY: e - a,
|
|
7
|
+
scale: Math.max(h, 0.04)
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function l(t) {
|
|
11
|
+
return {
|
|
12
|
+
transform: `translate(${t.translateX}px, ${t.translateY}px) scale(${t.scale})`,
|
|
13
|
+
opacity: "0",
|
|
14
|
+
transition: "transform 320ms cubic-bezier(0.4, 0, 0.2, 1), opacity 280ms ease-in"
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
C as IRIS_CHAT_CLOSE_ANIMATION_MS,
|
|
19
|
+
l as readIrisChatCloseAnimationStyle,
|
|
20
|
+
I as readIrisChatCloseTransform
|
|
21
|
+
};
|