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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IrisChatFrame } from './iris-chat-frame';
|
|
2
|
+
import { IrisChatPlacement } from './iris-chat.types';
|
|
3
|
+
export type IrisChatComposerLayout = "inline" | "stacked" | "stackedCompact";
|
|
4
|
+
export declare function readIrisChatHorizontalPaddingClass(input: {
|
|
5
|
+
isWindowPlacement: boolean;
|
|
6
|
+
placement: IrisChatPlacement;
|
|
7
|
+
}): string;
|
|
8
|
+
export declare function readIrisChatGreetingShowSubtitle(input: {
|
|
9
|
+
isWindowPlacement: boolean;
|
|
10
|
+
frame: IrisChatFrame;
|
|
11
|
+
}): boolean;
|
|
12
|
+
export declare function readIrisChatGreetingIconSize(input: {
|
|
13
|
+
isWindowPlacement: boolean;
|
|
14
|
+
placement: IrisChatPlacement;
|
|
15
|
+
frame: IrisChatFrame;
|
|
16
|
+
compact: boolean;
|
|
17
|
+
}): number;
|
|
18
|
+
export declare function readIrisChatGreetingCompact(input: {
|
|
19
|
+
isWindowPlacement: boolean;
|
|
20
|
+
placement: IrisChatPlacement;
|
|
21
|
+
frame: IrisChatFrame;
|
|
22
|
+
}): boolean;
|
|
23
|
+
export declare function readIrisChatComposerLayout(input: {
|
|
24
|
+
isWindowPlacement: boolean;
|
|
25
|
+
placement: IrisChatPlacement;
|
|
26
|
+
frame: IrisChatFrame;
|
|
27
|
+
}): IrisChatComposerLayout;
|
|
28
|
+
export declare function readIrisChatDisclaimerPaddingClass(input: {
|
|
29
|
+
isWindowPlacement: boolean;
|
|
30
|
+
}): string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function r(e) {
|
|
2
|
+
return e.isWindowPlacement ? "px-3" : e.placement === "minimized" || e.placement === "composer" ? "px-4" : "px-12";
|
|
3
|
+
}
|
|
4
|
+
function i(e) {
|
|
5
|
+
return !(e.isWindowPlacement && e.frame.height < 400);
|
|
6
|
+
}
|
|
7
|
+
function t(e) {
|
|
8
|
+
return e.compact ? e.isWindowPlacement && e.frame.height < 400 ? 40 : 56 : 84;
|
|
9
|
+
}
|
|
10
|
+
function n(e) {
|
|
11
|
+
return !!(e.placement === "minimized" || e.placement === "composer" || e.isWindowPlacement);
|
|
12
|
+
}
|
|
13
|
+
function a(e) {
|
|
14
|
+
if (e.placement === "minimized" || e.placement === "composer")
|
|
15
|
+
return "inline";
|
|
16
|
+
if (e.isWindowPlacement) {
|
|
17
|
+
if (e.frame.width < 560 || e.frame.height < 420)
|
|
18
|
+
return "inline";
|
|
19
|
+
if (e.frame.width < 720)
|
|
20
|
+
return "stackedCompact";
|
|
21
|
+
}
|
|
22
|
+
return "stacked";
|
|
23
|
+
}
|
|
24
|
+
function m(e) {
|
|
25
|
+
return e.isWindowPlacement ? "px-3 py-2" : "px-4 py-3";
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
a as readIrisChatComposerLayout,
|
|
29
|
+
m as readIrisChatDisclaimerPaddingClass,
|
|
30
|
+
n as readIrisChatGreetingCompact,
|
|
31
|
+
t as readIrisChatGreetingIconSize,
|
|
32
|
+
i as readIrisChatGreetingShowSubtitle,
|
|
33
|
+
r as readIrisChatHorizontalPaddingClass
|
|
34
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IrisChatResizeEdge } from './iris-chat-frame';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export type IrisChatWindowGeometryContextValue = {
|
|
4
|
+
onHeaderPointerDown: (event: React.PointerEvent<HTMLElement>) => void;
|
|
5
|
+
onHeaderDoubleClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
6
|
+
onResizePointerDown: (edge: IrisChatResizeEdge, event: React.PointerEvent<HTMLButtonElement>) => void;
|
|
7
|
+
onResizeKeyDown: (edge: IrisChatResizeEdge, event: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
8
|
+
isDragging: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function IrisChatWindowGeometryProvider(props: {
|
|
11
|
+
value: IrisChatWindowGeometryContextValue;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}): React.ReactElement;
|
|
14
|
+
export declare function useIrisChatWindowGeometryOptional(): IrisChatWindowGeometryContextValue | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
const r = t.createContext(
|
|
4
|
+
null
|
|
5
|
+
);
|
|
6
|
+
function i(e) {
|
|
7
|
+
return /* @__PURE__ */ o(r.Provider, { value: e.value, children: e.children });
|
|
8
|
+
}
|
|
9
|
+
function a() {
|
|
10
|
+
return t.useContext(r);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
i as IrisChatWindowGeometryProvider,
|
|
14
|
+
a as useIrisChatWindowGeometryOptional
|
|
15
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IrisChatFrame } from './iris-chat-frame';
|
|
2
|
+
import { IrisChatWindowGeometryContextValue } from './iris-chat-window-geometry-context';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export declare function useIrisChatWindowGeometry(input: {
|
|
5
|
+
frame: IrisChatFrame;
|
|
6
|
+
commitFrame: (frame: IrisChatFrame) => void;
|
|
7
|
+
resetFrame: () => void;
|
|
8
|
+
}): {
|
|
9
|
+
panelRef: React.RefCallback<HTMLDivElement>;
|
|
10
|
+
geometry: IrisChatWindowGeometryContextValue;
|
|
11
|
+
isDragging: boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
import { useComposedRefs as L } from "../../../lib/compose-refs.js";
|
|
3
|
+
import { createDefaultIrisChatFrame as P, resizeIrisChatFrame as Y, readIrisChatFrameStyle as z, clampIrisChatFrame as v, readIrisChatViewport as w, moveIrisChatFrame as A } from "./iris-chat-frame.js";
|
|
4
|
+
function T(o) {
|
|
5
|
+
const r = o.shiftKey ? 40 : 10;
|
|
6
|
+
return o.key === "ArrowLeft" ? { deltaX: -r, deltaY: 0 } : o.key === "ArrowRight" ? { deltaX: r, deltaY: 0 } : o.key === "ArrowUp" ? { deltaX: 0, deltaY: -r } : o.key === "ArrowDown" ? { deltaX: 0, deltaY: r } : null;
|
|
7
|
+
}
|
|
8
|
+
function $(o, r) {
|
|
9
|
+
if (!o)
|
|
10
|
+
return;
|
|
11
|
+
const s = z(r);
|
|
12
|
+
o.style.left = `${s.left}px`, o.style.top = `${s.top}px`, o.style.width = `${s.width}px`, o.style.height = `${s.height}px`;
|
|
13
|
+
}
|
|
14
|
+
function F(o) {
|
|
15
|
+
const r = o.target;
|
|
16
|
+
return !(r instanceof Element) || r.closest("button, a, input, textarea, select, [role='button']") ? !1 : !!r.closest("[data-component='iris-chat-header']");
|
|
17
|
+
}
|
|
18
|
+
function K(o) {
|
|
19
|
+
const { frame: r, commitFrame: s, resetFrame: g } = o, f = n.useRef(null), i = n.useRef(r), d = n.useRef(null), [m, h] = n.useState(!1);
|
|
20
|
+
n.useEffect(() => {
|
|
21
|
+
i.current = r;
|
|
22
|
+
}, [r]);
|
|
23
|
+
const a = n.useCallback((e) => {
|
|
24
|
+
$(f.current, e);
|
|
25
|
+
}, []);
|
|
26
|
+
n.useEffect(() => {
|
|
27
|
+
a(r);
|
|
28
|
+
}, [r, a]), n.useEffect(() => {
|
|
29
|
+
const e = () => {
|
|
30
|
+
const t = v(i.current, w());
|
|
31
|
+
i.current = t, a(t), s(t);
|
|
32
|
+
};
|
|
33
|
+
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
34
|
+
}, [s, a]);
|
|
35
|
+
const C = n.useCallback(() => {
|
|
36
|
+
d.current = null, h(!1);
|
|
37
|
+
const e = f.current;
|
|
38
|
+
e && (e.style.willChange = ""), s(i.current);
|
|
39
|
+
}, [s]);
|
|
40
|
+
n.useEffect(() => {
|
|
41
|
+
const e = (u) => {
|
|
42
|
+
const c = d.current;
|
|
43
|
+
if (!c)
|
|
44
|
+
return;
|
|
45
|
+
const l = u.clientX - c.startX, E = u.clientY - c.startY, R = w(), X = c.kind === "drag" ? A(c.origin, l, E, R) : Y(c.origin, c.edge, l, E, R);
|
|
46
|
+
i.current = X, a(X);
|
|
47
|
+
}, t = () => {
|
|
48
|
+
d.current && C();
|
|
49
|
+
};
|
|
50
|
+
return window.addEventListener("pointermove", e), window.addEventListener("pointerup", t), window.addEventListener("pointercancel", t), () => {
|
|
51
|
+
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t), window.removeEventListener("pointercancel", t);
|
|
52
|
+
};
|
|
53
|
+
}, [C, a]);
|
|
54
|
+
const p = n.useCallback((e) => {
|
|
55
|
+
d.current = e, h(!0);
|
|
56
|
+
const t = f.current;
|
|
57
|
+
t && (t.style.willChange = "left, top, width, height");
|
|
58
|
+
}, []), y = n.useCallback(
|
|
59
|
+
(e) => {
|
|
60
|
+
e.button !== 0 || !F(e) || (e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId), p({
|
|
61
|
+
kind: "drag",
|
|
62
|
+
startX: e.clientX,
|
|
63
|
+
startY: e.clientY,
|
|
64
|
+
origin: i.current
|
|
65
|
+
}));
|
|
66
|
+
},
|
|
67
|
+
[p]
|
|
68
|
+
), k = n.useCallback(
|
|
69
|
+
(e) => {
|
|
70
|
+
if (!F(e))
|
|
71
|
+
return;
|
|
72
|
+
const t = P();
|
|
73
|
+
i.current = t, a(t), g();
|
|
74
|
+
},
|
|
75
|
+
[g, a]
|
|
76
|
+
), b = n.useCallback(
|
|
77
|
+
(e, t) => {
|
|
78
|
+
t.button === 0 && (t.preventDefault(), t.currentTarget.setPointerCapture(t.pointerId), p({
|
|
79
|
+
kind: "resize",
|
|
80
|
+
edge: e,
|
|
81
|
+
startX: t.clientX,
|
|
82
|
+
startY: t.clientY,
|
|
83
|
+
origin: i.current
|
|
84
|
+
}));
|
|
85
|
+
},
|
|
86
|
+
[p]
|
|
87
|
+
), D = n.useCallback(
|
|
88
|
+
(e, t) => {
|
|
89
|
+
const u = T(t);
|
|
90
|
+
if (!u)
|
|
91
|
+
return;
|
|
92
|
+
t.preventDefault();
|
|
93
|
+
const c = w(), l = Y(i.current, e, u.deltaX, u.deltaY, c);
|
|
94
|
+
i.current = l, a(l), s(l);
|
|
95
|
+
},
|
|
96
|
+
[s, a]
|
|
97
|
+
), I = L((e) => {
|
|
98
|
+
f.current = e, e && a(i.current);
|
|
99
|
+
}), x = n.useMemo(
|
|
100
|
+
() => ({
|
|
101
|
+
onHeaderPointerDown: y,
|
|
102
|
+
onHeaderDoubleClick: k,
|
|
103
|
+
onResizePointerDown: b,
|
|
104
|
+
onResizeKeyDown: D,
|
|
105
|
+
isDragging: m
|
|
106
|
+
}),
|
|
107
|
+
[m, k, y, D, b]
|
|
108
|
+
);
|
|
109
|
+
return { panelRef: I, geometry: x, isDragging: m };
|
|
110
|
+
}
|
|
111
|
+
export {
|
|
112
|
+
K as useIrisChatWindowGeometry
|
|
113
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IrisChatResizeEdge } from './iris-chat-frame';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export declare function IrisChatWindowResizeHandles(props: {
|
|
4
|
+
onResizePointerDown: (edge: IrisChatResizeEdge, event: React.PointerEvent<HTMLButtonElement>) => void;
|
|
5
|
+
onResizeKeyDown: (edge: IrisChatResizeEdge, event: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
6
|
+
}): React.ReactElement;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as o, Fragment as a } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { useImpactNovaI18n as n } from "../../../i18n/use-impact-nova-i18n.js";
|
|
4
|
+
import { cn as i } from "../../../lib/utils.js";
|
|
5
|
+
const h = [
|
|
6
|
+
"north",
|
|
7
|
+
"south",
|
|
8
|
+
"east",
|
|
9
|
+
"west",
|
|
10
|
+
"north-east",
|
|
11
|
+
"north-west",
|
|
12
|
+
"south-east",
|
|
13
|
+
"south-west"
|
|
14
|
+
], u = {
|
|
15
|
+
north: "top-0 left-3 right-3 h-2 cursor-n-resize",
|
|
16
|
+
south: "bottom-0 left-3 right-3 h-2 cursor-s-resize",
|
|
17
|
+
east: "right-0 top-3 bottom-3 w-2 cursor-e-resize",
|
|
18
|
+
west: "left-0 top-3 bottom-3 w-2 cursor-w-resize",
|
|
19
|
+
"north-east": "right-0 top-0 h-4 w-4 cursor-ne-resize",
|
|
20
|
+
"north-west": "left-0 top-0 h-4 w-4 cursor-nw-resize",
|
|
21
|
+
"south-east": "right-0 bottom-0 h-8 w-8 cursor-se-resize",
|
|
22
|
+
"south-west": "left-0 bottom-0 h-4 w-4 cursor-sw-resize"
|
|
23
|
+
};
|
|
24
|
+
function c(e) {
|
|
25
|
+
return e.replaceAll("-", " ");
|
|
26
|
+
}
|
|
27
|
+
function f(e) {
|
|
28
|
+
const { t: s } = n();
|
|
29
|
+
return /* @__PURE__ */ o(a, { children: h.map((t) => /* @__PURE__ */ o(
|
|
30
|
+
"button",
|
|
31
|
+
{
|
|
32
|
+
type: "button",
|
|
33
|
+
tabIndex: 0,
|
|
34
|
+
"data-component": "iris-chat-resize-handle",
|
|
35
|
+
"data-edge": t,
|
|
36
|
+
"aria-label": `${s("irisChat.resize")} ${c(t)}`,
|
|
37
|
+
className: i(
|
|
38
|
+
"absolute z-10 border-0 bg-transparent p-0 motion-reduce:transition-none",
|
|
39
|
+
u[t],
|
|
40
|
+
t === "south-east" ? "after:absolute after:bottom-1 after:right-1 after:h-3 after:w-3 after:rounded-sm after:border after:border-stroke-subtle after:bg-canvas-elevated" : void 0
|
|
41
|
+
),
|
|
42
|
+
onPointerDown: (r) => e.onResizePointerDown(t, r),
|
|
43
|
+
onKeyDown: (r) => e.onResizeKeyDown(t, r)
|
|
44
|
+
},
|
|
45
|
+
t
|
|
46
|
+
)) });
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
f as IrisChatWindowResizeHandles
|
|
50
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cn as t } from "../../../lib/utils.js";
|
|
4
|
+
import { IrisChatWindowResizeHandles as r } from "./iris-chat-window-handles.js";
|
|
5
|
+
import { useIrisChatWindowGeometryOptional as a } from "./iris-chat-window-geometry-context.js";
|
|
6
|
+
function g(e) {
|
|
7
|
+
const n = a();
|
|
8
|
+
return /* @__PURE__ */ i(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
ref: e.panelRef,
|
|
12
|
+
"data-component": "iris-chat-panel",
|
|
13
|
+
"data-window": "true",
|
|
14
|
+
"data-closing": e.isClosing ? "" : void 0,
|
|
15
|
+
"data-opening": e.isOpening ? "" : void 0,
|
|
16
|
+
className: t(
|
|
17
|
+
"pointer-events-auto fixed z-[1] flex min-h-0 min-w-0 flex-col overflow-hidden rounded-3xl border border-stroke-subtle bg-canvas-elevated shadow-elevation-card motion-reduce:transition-none",
|
|
18
|
+
n?.isDragging ? "cursor-grabbing" : void 0,
|
|
19
|
+
e.isClosing || e.isOpening ? "motion-reduce:transition-none" : void 0,
|
|
20
|
+
e.className
|
|
21
|
+
),
|
|
22
|
+
children: [
|
|
23
|
+
n ? /* @__PURE__ */ o(
|
|
24
|
+
r,
|
|
25
|
+
{
|
|
26
|
+
onResizePointerDown: n.onResizePointerDown,
|
|
27
|
+
onResizeKeyDown: n.onResizeKeyDown
|
|
28
|
+
}
|
|
29
|
+
) : null,
|
|
30
|
+
e.children
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
g as IrisChatWindowShell
|
|
37
|
+
};
|
|
@@ -1,43 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { IrisChatBody, IrisChatDisclaimer, IrisChatFooter, IrisChatHeader, IrisChatHeaderBackButton, IrisChatHeaderCloseButton, IrisChatHeaderLeading, IrisChatHeaderMenuButton, IrisChatHeaderMinimizeButton, IrisChatHeaderNewChatButton, IrisChatHeaderTitle, IrisChatHeaderTrailing, IrisChatIconButton, IrisChatPanel, IrisChatTrigger } from './iris-chat-chrome';
|
|
2
|
+
import { IrisChatProps } from './iris-chat.types';
|
|
3
3
|
declare const IrisChat: {
|
|
4
|
-
({
|
|
4
|
+
({ className, children, ...props }: IrisChatProps): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
|
-
declare const IrisChatPanel: React.ForwardRefExoticComponent<IrisChatPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
declare const IrisChatHeader: React.ForwardRefExoticComponent<IrisChatHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
9
|
-
declare const IrisChatHeaderLeading: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
declare const IrisChatHeaderTrailing: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
declare const IrisChatHeaderTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & {
|
|
12
|
-
showBrand?: boolean;
|
|
13
|
-
} & React.RefAttributes<HTMLHeadingElement>>;
|
|
14
|
-
declare const IrisChatIconButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
15
|
-
label: string;
|
|
16
|
-
variant?: "secondary" | "ghost";
|
|
17
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
-
declare const IrisChatHeaderMenuButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
19
|
-
label?: string;
|
|
20
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
21
|
-
declare const IrisChatHeaderBackButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
22
|
-
label?: string;
|
|
23
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
24
|
-
declare const IrisChatHeaderNewChatButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
25
|
-
label?: string;
|
|
26
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
27
|
-
declare const IrisChatHeaderMinimizeButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
28
|
-
label?: string;
|
|
29
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
30
|
-
declare const IrisChatHeaderCloseButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
31
|
-
label?: string;
|
|
32
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
33
|
-
declare const IrisChatBody: React.ForwardRefExoticComponent<IrisChatBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
-
declare const IrisChatFooter: React.ForwardRefExoticComponent<IrisChatFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
-
declare const IrisChatDisclaimer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & {
|
|
36
|
-
href?: string;
|
|
37
|
-
} & React.RefAttributes<HTMLParagraphElement>>;
|
|
38
|
-
declare const IrisChatTrigger: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
39
|
-
asChild?: boolean;
|
|
40
|
-
size?: "sm" | "md" | "lg";
|
|
41
|
-
shape?: "default" | "pill";
|
|
42
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
43
7
|
export { IrisChat, IrisChatBody, IrisChatDisclaimer, IrisChatFooter, IrisChatHeader, IrisChatHeaderBackButton, IrisChatHeaderCloseButton, IrisChatHeaderLeading, IrisChatHeaderMenuButton, IrisChatHeaderMinimizeButton, IrisChatHeaderNewChatButton, IrisChatHeaderTitle, IrisChatHeaderTrailing, IrisChatIconButton, IrisChatPanel, IrisChatTrigger, };
|