impact-nova 3.0.0-alpha.6 → 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/ag-grid-react/headers/header-search-input.js +203 -199
- 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-artifact.js +46 -36
- 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 +82 -42
- 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 +4 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.js +277 -220
- 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 +20 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +4 -3
- package/dist/components/flows/iris-chat/iris-chat.variants.js +46 -23
- 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-percent.js +50 -37
- 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/forms/input/input.js +5 -5
- package/dist/components/layout/header/header.js +1 -0
- package/dist/components/primitives/button/button.variants.js +1 -1
- package/dist/components/primitives/stepper/internals/step-model.d.ts +1 -1
- package/dist/components/primitives/stepper/internals/step-model.js +5 -5
- package/dist/components/primitives/stepper/internals/stepper-compact.js +13 -13
- package/dist/components/primitives/stepper/internals/stepper-pipeline.js +6 -6
- package/dist/components/primitives/stepper/internals/stepper-rail.js +15 -15
- package/dist/components/primitives/stepper/internals/stepper-summary.js +2 -2
- package/dist/components/primitives/stepper/internals/stepper-track.js +2 -2
- package/dist/components/primitives/stepper/stepper.js +92 -91
- package/dist/components/primitives/stepper/stepper.types.d.ts +2 -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 +75 -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
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const t = 2e3, r = "transition-[transform,color,background-color] duration-150 active:scale-90", e = "text-success bg-success-subtle hover:bg-success-subtle hover:text-success";
|
|
2
|
+
async function a(s) {
|
|
3
|
+
if (!s.trim() || !navigator.clipboard?.writeText)
|
|
4
|
+
return !1;
|
|
5
|
+
try {
|
|
6
|
+
return await navigator.clipboard.writeText(s), !0;
|
|
7
|
+
} catch {
|
|
8
|
+
return !1;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
t as IRIS_CHAT_COPY_FEEDBACK_MS,
|
|
13
|
+
r as irisChatActionIconPressClassName,
|
|
14
|
+
e as irisChatCopySuccessClassName,
|
|
15
|
+
a as writeIrisChatClipboardText
|
|
16
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export type IrisChatFrame = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const IRIS_CHAT_FRAME_PADDING_PX = 16;
|
|
9
|
+
export declare const IRIS_CHAT_FRAME_MIN_WIDTH_PX = 280;
|
|
10
|
+
export declare const IRIS_CHAT_FRAME_MIN_HEIGHT_PX = 360;
|
|
11
|
+
export declare const IRIS_CHAT_FRAME_DEFAULT_WIDTH_PX = 420;
|
|
12
|
+
export declare const IRIS_CHAT_FRAME_DEFAULT_HEIGHT_PX = 640;
|
|
13
|
+
export declare const IRIS_CHAT_FRAME_COMPACT_WIDTH_PX = 360;
|
|
14
|
+
export declare const IRIS_CHAT_FRAME_COMPACT_HEIGHT_PX = 480;
|
|
15
|
+
export declare const IRIS_CHAT_HEADER_MIN_VISIBLE_PX = 80;
|
|
16
|
+
export type IrisChatViewport = {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
20
|
+
export type IrisChatResizeEdge = "north" | "south" | "east" | "west" | "north-east" | "north-west" | "south-east" | "south-west";
|
|
21
|
+
export declare function readIrisChatViewport(): IrisChatViewport;
|
|
22
|
+
export declare function readIrisChatMaxFrameSize(viewport: IrisChatViewport): {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
};
|
|
26
|
+
export declare function createDefaultIrisChatFrame(viewport?: IrisChatViewport): IrisChatFrame;
|
|
27
|
+
export declare function createCompactIrisChatFrame(anchor: Pick<IrisChatFrame, "x" | "y">, viewport?: IrisChatViewport): IrisChatFrame;
|
|
28
|
+
export declare function clampIrisChatFrame(frame: IrisChatFrame, viewport: IrisChatViewport): IrisChatFrame;
|
|
29
|
+
export declare function moveIrisChatFrame(frame: IrisChatFrame, deltaX: number, deltaY: number, viewport: IrisChatViewport): IrisChatFrame;
|
|
30
|
+
export declare function resizeIrisChatFrame(frame: IrisChatFrame, edge: IrisChatResizeEdge, deltaX: number, deltaY: number, viewport: IrisChatViewport): IrisChatFrame;
|
|
31
|
+
export declare function readIrisChatFrameStyle(frame: IrisChatFrame): CSSProperties;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
const a = 16, s = 280, c = 360, o = 420, P = 640, r = 360, F = 480, S = 80;
|
|
2
|
+
function e() {
|
|
3
|
+
return typeof window > "u" ? { width: 1280, height: 800 } : { width: window.innerWidth, height: window.innerHeight };
|
|
4
|
+
}
|
|
5
|
+
function R(_) {
|
|
6
|
+
const t = Math.max(
|
|
7
|
+
280,
|
|
8
|
+
_.width - 32
|
|
9
|
+
), I = Math.max(
|
|
10
|
+
360,
|
|
11
|
+
_.height - 32
|
|
12
|
+
);
|
|
13
|
+
return { width: t, height: I };
|
|
14
|
+
}
|
|
15
|
+
function D(_ = e()) {
|
|
16
|
+
const { width: t, height: I } = R(_), h = Math.min(420, t), i = Math.min(640, I);
|
|
17
|
+
return {
|
|
18
|
+
x: _.width - h - 16,
|
|
19
|
+
y: _.height - i - 16,
|
|
20
|
+
width: h,
|
|
21
|
+
height: i
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function m(_, t = e()) {
|
|
25
|
+
const { width: I, height: h } = R(t), i = Math.min(360, I), n = Math.min(480, h);
|
|
26
|
+
return T(
|
|
27
|
+
{
|
|
28
|
+
x: _.x,
|
|
29
|
+
y: _.y,
|
|
30
|
+
width: i,
|
|
31
|
+
height: n
|
|
32
|
+
},
|
|
33
|
+
t
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function T(_, t) {
|
|
37
|
+
const I = R(t), h = Math.min(Math.max(_.width, 280), I.width), i = Math.min(Math.max(_.height, 360), I.height), n = t.width - 80, M = t.height - 80, A = 16 - h + 80, H = 16, E = Math.min(Math.max(_.x, A), n), C = Math.min(Math.max(_.y, H), M);
|
|
38
|
+
return { x: E, y: C, width: h, height: i };
|
|
39
|
+
}
|
|
40
|
+
function d(_, t, I, h) {
|
|
41
|
+
return T(
|
|
42
|
+
{
|
|
43
|
+
..._,
|
|
44
|
+
x: _.x + t,
|
|
45
|
+
y: _.y + I
|
|
46
|
+
},
|
|
47
|
+
h
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function X(_, t, I, h, i) {
|
|
51
|
+
let { x: n, y: M, width: A, height: H } = _;
|
|
52
|
+
return t.includes("east") && (A += I), t.includes("west") && (n += I, A -= I), t.includes("south") && (H += h), t.includes("north") && (M += h, H -= h), T({ x: n, y: M, width: A, height: H }, i);
|
|
53
|
+
}
|
|
54
|
+
function u(_) {
|
|
55
|
+
return {
|
|
56
|
+
left: _.x,
|
|
57
|
+
top: _.y,
|
|
58
|
+
width: _.width,
|
|
59
|
+
height: _.height
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
F as IRIS_CHAT_FRAME_COMPACT_HEIGHT_PX,
|
|
64
|
+
r as IRIS_CHAT_FRAME_COMPACT_WIDTH_PX,
|
|
65
|
+
P as IRIS_CHAT_FRAME_DEFAULT_HEIGHT_PX,
|
|
66
|
+
o as IRIS_CHAT_FRAME_DEFAULT_WIDTH_PX,
|
|
67
|
+
c as IRIS_CHAT_FRAME_MIN_HEIGHT_PX,
|
|
68
|
+
s as IRIS_CHAT_FRAME_MIN_WIDTH_PX,
|
|
69
|
+
a as IRIS_CHAT_FRAME_PADDING_PX,
|
|
70
|
+
S as IRIS_CHAT_HEADER_MIN_VISIBLE_PX,
|
|
71
|
+
T as clampIrisChatFrame,
|
|
72
|
+
m as createCompactIrisChatFrame,
|
|
73
|
+
D as createDefaultIrisChatFrame,
|
|
74
|
+
d as moveIrisChatFrame,
|
|
75
|
+
u as readIrisChatFrameStyle,
|
|
76
|
+
R as readIrisChatMaxFrameSize,
|
|
77
|
+
e as readIrisChatViewport,
|
|
78
|
+
X as resizeIrisChatFrame
|
|
79
|
+
};
|
|
@@ -13,6 +13,7 @@ export declare function IrisChatSuggestIcon({ size, className }: IconProps): imp
|
|
|
13
13
|
export declare function IrisChatLikeIcon({ size, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export declare function IrisChatDislikeIcon({ size, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export declare function IrisChatCopyIcon({ size, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function IrisChatCheckIcon({ size, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export declare function IrisChatRetryIcon({ size, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export declare function IrisChatSpeakIcon({ size, className }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export {};
|
|
@@ -3,20 +3,20 @@ import { cn as h } from "../../../lib/utils.js";
|
|
|
3
3
|
function n({
|
|
4
4
|
size: r = 16,
|
|
5
5
|
className: t,
|
|
6
|
-
children:
|
|
7
|
-
viewBox:
|
|
6
|
+
children: i,
|
|
7
|
+
viewBox: c = "0 0 24 24"
|
|
8
8
|
}) {
|
|
9
9
|
return /* @__PURE__ */ o(
|
|
10
10
|
"svg",
|
|
11
11
|
{
|
|
12
12
|
width: r,
|
|
13
13
|
height: r,
|
|
14
|
-
viewBox:
|
|
14
|
+
viewBox: c,
|
|
15
15
|
fill: "none",
|
|
16
16
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17
17
|
"aria-hidden": !0,
|
|
18
18
|
className: h("block shrink-0", t),
|
|
19
|
-
children:
|
|
19
|
+
children: i
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
}
|
|
@@ -29,7 +29,7 @@ function u({ size: r = 16, className: t }) {
|
|
|
29
29
|
}
|
|
30
30
|
) });
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function a({ size: r = 16, className: t }) {
|
|
33
33
|
return /* @__PURE__ */ o(n, { size: r, viewBox: "0 0 16 16", className: t, children: /* @__PURE__ */ o(
|
|
34
34
|
"path",
|
|
35
35
|
{
|
|
@@ -38,7 +38,7 @@ function l({ size: r = 16, className: t }) {
|
|
|
38
38
|
}
|
|
39
39
|
) });
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function l({ size: r = 16, className: t }) {
|
|
42
42
|
return /* @__PURE__ */ o(n, { size: r, viewBox: "0 0 16 16", className: t, children: /* @__PURE__ */ o(
|
|
43
43
|
"path",
|
|
44
44
|
{
|
|
@@ -47,7 +47,7 @@ function a({ size: r = 16, className: t }) {
|
|
|
47
47
|
}
|
|
48
48
|
) });
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function k({ size: r = 16, className: t }) {
|
|
51
51
|
return /* @__PURE__ */ o(n, { size: r, className: t, children: /* @__PURE__ */ o(
|
|
52
52
|
"path",
|
|
53
53
|
{
|
|
@@ -59,7 +59,7 @@ function C({ size: r = 16, className: t }) {
|
|
|
59
59
|
}
|
|
60
60
|
) });
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function C({ size: r = 16, className: t }) {
|
|
63
63
|
return /* @__PURE__ */ o(n, { size: r, className: t, children: /* @__PURE__ */ o("rect", { x: "6.5", y: "6.5", width: "11", height: "11", rx: "1.5", fill: "currentColor" }) });
|
|
64
64
|
}
|
|
65
65
|
function p({ size: r = 16, className: t }) {
|
|
@@ -126,6 +126,18 @@ function L({ size: r = 16, className: t }) {
|
|
|
126
126
|
] });
|
|
127
127
|
}
|
|
128
128
|
function A({ size: r = 16, className: t }) {
|
|
129
|
+
return /* @__PURE__ */ o(n, { size: r, className: t, children: /* @__PURE__ */ o(
|
|
130
|
+
"path",
|
|
131
|
+
{
|
|
132
|
+
d: "M5 12.5 9.5 17 19 7",
|
|
133
|
+
stroke: "currentColor",
|
|
134
|
+
strokeWidth: "1.8",
|
|
135
|
+
strokeLinecap: "round",
|
|
136
|
+
strokeLinejoin: "round"
|
|
137
|
+
}
|
|
138
|
+
) });
|
|
139
|
+
}
|
|
140
|
+
function V({ size: r = 16, className: t }) {
|
|
129
141
|
return /* @__PURE__ */ o(n, { size: r, className: t, children: /* @__PURE__ */ o(
|
|
130
142
|
"path",
|
|
131
143
|
{
|
|
@@ -137,7 +149,7 @@ function A({ size: r = 16, className: t }) {
|
|
|
137
149
|
}
|
|
138
150
|
) });
|
|
139
151
|
}
|
|
140
|
-
function
|
|
152
|
+
function W({ size: r = 16, className: t }) {
|
|
141
153
|
return /* @__PURE__ */ e(n, { size: r, className: t, children: [
|
|
142
154
|
/* @__PURE__ */ o(
|
|
143
155
|
"path",
|
|
@@ -161,16 +173,17 @@ function V({ size: r = 16, className: t }) {
|
|
|
161
173
|
}
|
|
162
174
|
export {
|
|
163
175
|
u as IrisChatAddIcon,
|
|
164
|
-
|
|
176
|
+
a as IrisChatAttachIcon,
|
|
177
|
+
A as IrisChatCheckIcon,
|
|
165
178
|
L as IrisChatCopyIcon,
|
|
166
179
|
v as IrisChatDislikeIcon,
|
|
167
180
|
p as IrisChatHamburgerIcon,
|
|
168
181
|
f as IrisChatLikeIcon,
|
|
169
|
-
|
|
182
|
+
l as IrisChatMicIcon,
|
|
170
183
|
I as IrisChatMinimizeIcon,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
184
|
+
V as IrisChatRetryIcon,
|
|
185
|
+
k as IrisChatSendIcon,
|
|
186
|
+
W as IrisChatSpeakIcon,
|
|
187
|
+
C as IrisChatStopIcon,
|
|
175
188
|
M as IrisChatSuggestIcon
|
|
176
189
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function readIrisChatLaunchAnimationTransition(): string;
|
|
2
|
+
export declare function runIrisChatOpenFromLaunchTarget(input: {
|
|
3
|
+
panel: HTMLDivElement;
|
|
4
|
+
target: HTMLElement;
|
|
5
|
+
onComplete: () => void;
|
|
6
|
+
}): () => void;
|
|
7
|
+
export declare function readIrisChatLaunchAnimationEnabled(input: {
|
|
8
|
+
target: HTMLElement | null;
|
|
9
|
+
panel: HTMLDivElement | null;
|
|
10
|
+
isWindowPlacement: boolean;
|
|
11
|
+
}): boolean;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { readIrisChatCloseTransform as c, readIrisChatCloseAnimationStyle as m, IRIS_CHAT_CLOSE_ANIMATION_MS as r } from "./iris-chat-close-animation.js";
|
|
2
|
+
function d() {
|
|
3
|
+
return `transform ${r}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${r - 40}ms ease-out`;
|
|
4
|
+
}
|
|
5
|
+
function y(e) {
|
|
6
|
+
const n = c(
|
|
7
|
+
e.panel.getBoundingClientRect(),
|
|
8
|
+
e.target.getBoundingClientRect()
|
|
9
|
+
), a = m(n);
|
|
10
|
+
e.panel.style.pointerEvents = "none", e.panel.style.transformOrigin = "center center", e.panel.style.transition = "none", e.panel.style.transform = a.transform, e.panel.style.opacity = a.opacity;
|
|
11
|
+
let o = !1;
|
|
12
|
+
const t = () => {
|
|
13
|
+
o || (o = !0, e.panel.removeEventListener("transitionend", s), l !== null && window.clearTimeout(l), e.panel.style.transition = "", e.panel.style.transform = "", e.panel.style.opacity = "", e.panel.style.pointerEvents = "", e.onComplete());
|
|
14
|
+
}, s = (i) => {
|
|
15
|
+
i.target !== e.panel || i.propertyName !== "transform" || t();
|
|
16
|
+
};
|
|
17
|
+
requestAnimationFrame(() => {
|
|
18
|
+
requestAnimationFrame(() => {
|
|
19
|
+
e.panel.style.transition = d(), e.panel.style.transform = "", e.panel.style.opacity = "1";
|
|
20
|
+
});
|
|
21
|
+
}), e.panel.addEventListener("transitionend", s);
|
|
22
|
+
const l = window.setTimeout(t, r + 80);
|
|
23
|
+
return t;
|
|
24
|
+
}
|
|
25
|
+
function h(e) {
|
|
26
|
+
if (e.target === null || e.panel === null || !e.isWindowPlacement || window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
27
|
+
return !1;
|
|
28
|
+
const n = e.panel.getBoundingClientRect();
|
|
29
|
+
return n.width >= 1 && n.height >= 1;
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
h as readIrisChatLaunchAnimationEnabled,
|
|
33
|
+
d as readIrisChatLaunchAnimationTransition,
|
|
34
|
+
y as runIrisChatOpenFromLaunchTarget
|
|
35
|
+
};
|
|
@@ -1,62 +1,102 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ButtonIconTooltip as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { useImpactNovaI18n as
|
|
6
|
-
import { createComponent as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { IrisChatCopyIcon as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l, useRef as u, useEffect as f } from "react";
|
|
3
|
+
import { ButtonIconTooltip as h } from "../../feedback/tooltip/button-icon-tooltip.js";
|
|
4
|
+
import { Button as C } from "../../primitives/button/button.js";
|
|
5
|
+
import { useImpactNovaI18n as w } from "../../../i18n/use-impact-nova-i18n.js";
|
|
6
|
+
import { createComponent as b } from "../../../lib/primitives/create-component.js";
|
|
7
|
+
import { cn as d } from "../../../lib/utils.js";
|
|
8
|
+
import { IrisChatCheckIcon as y, IrisChatCopyIcon as x } from "./iris-chat-icons.js";
|
|
9
|
+
import { writeIrisChatClipboardText as k, IRIS_CHAT_COPY_FEEDBACK_MS as v, irisChatCopySuccessClassName as I, irisChatActionIconPressClassName as N } from "./iris-chat-copy-feedback.js";
|
|
10
|
+
import { irisChatMarkdownVariants as T } from "./iris-chat.variants.js";
|
|
11
|
+
import { Markdown as g } from "../../../node_modules/react-markdown/lib/index.js";
|
|
12
|
+
import M from "../../../node_modules/remark-gfm/lib/index.js";
|
|
13
|
+
function c(r) {
|
|
14
|
+
return typeof r == "string" || typeof r == "number" ? String(r) : Array.isArray(r) ? r.map(c).join("") : r && typeof r == "object" && "props" in r ? c(r.props.children) : "";
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
function A({ children: r }) {
|
|
17
|
+
return /* @__PURE__ */ e("div", { className: "grid w-full min-w-0 max-w-full grid-cols-[minmax(0,1fr)] overflow-hidden rounded-xl border border-stroke-subtle", children: /* @__PURE__ */ e(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "markdown-table-scroll",
|
|
21
|
+
className: "min-w-0 max-w-full overflow-x-auto overflow-y-hidden overscroll-x-contain",
|
|
22
|
+
children: /* @__PURE__ */ e("table", { className: "w-max min-w-full border-separate border-spacing-0 text-sm", children: r })
|
|
23
|
+
}
|
|
24
|
+
) });
|
|
25
|
+
}
|
|
26
|
+
function S({ children: r }) {
|
|
27
|
+
const { t: a } = w(), [o, t] = l(!1), [i, s] = l(!1), n = u(null), p = c(r);
|
|
28
|
+
return f(
|
|
29
|
+
() => () => {
|
|
30
|
+
n.current !== null && window.clearTimeout(n.current);
|
|
31
|
+
},
|
|
32
|
+
[]
|
|
33
|
+
), /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
34
|
+
/* @__PURE__ */ e(
|
|
35
|
+
h,
|
|
20
36
|
{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
label: a(o ? "irisChat.copied" : "irisChat.copyCode"),
|
|
38
|
+
open: i,
|
|
39
|
+
onOpenChange: s,
|
|
40
|
+
children: /* @__PURE__ */ e(
|
|
41
|
+
C,
|
|
42
|
+
{
|
|
43
|
+
type: "button",
|
|
44
|
+
variant: "ghost",
|
|
45
|
+
size: "icon",
|
|
46
|
+
className: d(
|
|
47
|
+
"absolute end-1.5 top-1.5 size-7",
|
|
48
|
+
N,
|
|
49
|
+
o && I
|
|
50
|
+
),
|
|
51
|
+
"aria-label": a(o ? "irisChat.copied" : "irisChat.copyCode"),
|
|
52
|
+
"data-testid": "iris-chat-copy-code",
|
|
53
|
+
"data-copied": o ? "" : void 0,
|
|
54
|
+
onClick: () => {
|
|
55
|
+
(async () => await k(p) && (t(!0), s(!0), n.current !== null && window.clearTimeout(n.current), n.current = window.setTimeout(() => {
|
|
56
|
+
t(!1), s(!1), n.current = null;
|
|
57
|
+
}, v)))();
|
|
58
|
+
},
|
|
59
|
+
children: o ? /* @__PURE__ */ e(y, { size: 14 }) : /* @__PURE__ */ e(x, { size: 14 })
|
|
60
|
+
}
|
|
61
|
+
)
|
|
32
62
|
}
|
|
33
|
-
)
|
|
34
|
-
/* @__PURE__ */
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ e("pre", { children: r })
|
|
35
65
|
] });
|
|
36
66
|
}
|
|
37
|
-
const
|
|
67
|
+
const V = b(
|
|
38
68
|
"IrisChatMarkdown",
|
|
39
|
-
({ className: r, children:
|
|
69
|
+
({ className: r, children: a }, o) => /* @__PURE__ */ e(
|
|
40
70
|
"div",
|
|
41
71
|
{
|
|
42
|
-
ref:
|
|
72
|
+
ref: o,
|
|
43
73
|
"data-component": "iris-chat-markdown",
|
|
44
|
-
className:
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
-
|
|
74
|
+
className: d(T(), r),
|
|
75
|
+
children: /* @__PURE__ */ e(
|
|
76
|
+
g,
|
|
47
77
|
{
|
|
48
|
-
remarkPlugins: [
|
|
78
|
+
remarkPlugins: [M],
|
|
49
79
|
skipHtml: !0,
|
|
50
80
|
components: {
|
|
51
|
-
a: ({ href:
|
|
52
|
-
pre: ({ children:
|
|
81
|
+
a: ({ href: t, children: i }) => /* @__PURE__ */ e("a", { href: t, target: "_blank", rel: "noreferrer", children: i }),
|
|
82
|
+
pre: ({ children: t }) => /* @__PURE__ */ e(S, { children: t }),
|
|
83
|
+
table: ({ children: t }) => /* @__PURE__ */ e(A, { children: t }),
|
|
84
|
+
th: ({ children: t, style: i }) => /* @__PURE__ */ e(
|
|
85
|
+
"th",
|
|
86
|
+
{
|
|
87
|
+
style: i,
|
|
88
|
+
className: "whitespace-nowrap bg-secondary px-3 py-2 text-start text-xs font-semibold",
|
|
89
|
+
children: t
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
td: ({ children: t, style: i }) => /* @__PURE__ */ e("td", { style: i, className: "whitespace-nowrap border-t border-stroke-subtle px-3 py-2", children: t })
|
|
53
93
|
},
|
|
54
|
-
children:
|
|
94
|
+
children: a
|
|
55
95
|
}
|
|
56
96
|
)
|
|
57
97
|
}
|
|
58
98
|
)
|
|
59
99
|
);
|
|
60
100
|
export {
|
|
61
|
-
|
|
101
|
+
V as IrisChatMarkdown
|
|
62
102
|
};
|