impact-nova 3.0.0-alpha.10 → 3.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/flows/iris-chat/IrisChatHeaderWindowSizeButton.js +45 -36
- package/dist/components/flows/iris-chat/IrisChatSnapTile.d.ts +8 -0
- package/dist/components/flows/iris-chat/IrisChatSnapTile.js +30 -0
- package/dist/components/flows/iris-chat/IrisChatWindowSnapMenu.js +67 -53
- package/dist/components/flows/iris-chat/iris-chat-frame.d.ts +2 -1
- package/dist/components/flows/iris-chat/iris-chat-frame.js +40 -31
- package/dist/components/flows/iris-chat/iris-chat-snap-presets.d.ts +4 -1
- package/dist/components/flows/iris-chat/iris-chat-snap-presets.js +49 -29
- package/dist/components/flows/iris-chat/iris-chat-thread.js +95 -96
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.js +5 -2
- package/dist/components/flows/iris-chat/use-iris-chat-root.js +83 -88
- package/dist/i18n/defaultMessages.d.ts +5 -0
- package/dist/i18n/defaultMessages.js +7 -2
- package/dist/i18n/locales/de.js +5 -0
- package/dist/i18n/locales/es.js +5 -0
- package/dist/i18n/locales/hi.js +5 -0
- package/dist/i18n/locales/kn.js +5 -0
- package/dist/impact-nova.css +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -1,93 +1,88 @@
|
|
|
1
1
|
import * as n from "react";
|
|
2
2
|
import { useControllableState as T } from "@radix-ui/react-use-controllable-state";
|
|
3
3
|
import { readIsIrisChatWindowPlacement as te } from "./iris-chat-context.js";
|
|
4
|
-
import { createDefaultIrisChatFrame as
|
|
5
|
-
import {
|
|
4
|
+
import { createDefaultIrisChatFrame as g, readIrisChatMaxFrameSize as ne, readIrisChatFrameWithSizeAnchoredAtBottomRight as re, IRIS_CHAT_FRAME_DEFAULT_HEIGHT_PX as ae, IRIS_CHAT_FRAME_DEFAULT_WIDTH_PX as oe, createCompactIrisChatFrame as se, readIrisChatViewport as x } from "./iris-chat-frame.js";
|
|
5
|
+
import { readIrisChatFrameIsCompact as ie, createIrisChatSnapFrame as ce } from "./iris-chat-snap-presets.js";
|
|
6
6
|
import { readIrisChatCloseTransform as le, IRIS_CHAT_CLOSE_ANIMATION_MS as ue, readIrisChatCloseAnimationStyle as me } from "./iris-chat-close-animation.js";
|
|
7
|
-
import { readIrisChatLaunchAnimationEnabled as
|
|
8
|
-
function
|
|
7
|
+
import { readIrisChatLaunchAnimationEnabled as z, runIrisChatOpenFromLaunchTarget as fe } from "./iris-chat-launch-animation.js";
|
|
8
|
+
function Fe(N) {
|
|
9
9
|
const {
|
|
10
10
|
open: W,
|
|
11
11
|
defaultOpen: E = !0,
|
|
12
|
-
onOpenChange:
|
|
13
|
-
placement:
|
|
14
|
-
defaultPlacement:
|
|
15
|
-
onPlacementChange:
|
|
16
|
-
frame:
|
|
17
|
-
defaultFrame:
|
|
18
|
-
onFrameChange:
|
|
12
|
+
onOpenChange: D,
|
|
13
|
+
placement: q,
|
|
14
|
+
defaultPlacement: S = "dock-right",
|
|
15
|
+
onPlacementChange: B,
|
|
16
|
+
frame: U,
|
|
17
|
+
defaultFrame: _,
|
|
18
|
+
onFrameChange: V,
|
|
19
19
|
closeAnimationTarget: p,
|
|
20
|
-
onCloseAnimationComplete:
|
|
21
|
-
} =
|
|
20
|
+
onCloseAnimationComplete: w
|
|
21
|
+
} = N, C = n.useRef(null), r = n.useRef(null), d = n.useRef(null), F = n.useRef(!1), [a, P] = n.useState(!1), [v, L] = n.useState(!1), [X, l] = T({
|
|
22
22
|
prop: W,
|
|
23
23
|
defaultProp: E,
|
|
24
|
-
onChange:
|
|
25
|
-
}), [
|
|
26
|
-
prop:
|
|
27
|
-
defaultProp:
|
|
28
|
-
onChange:
|
|
29
|
-
}), [
|
|
30
|
-
prop:
|
|
31
|
-
defaultProp:
|
|
32
|
-
onChange:
|
|
33
|
-
}),
|
|
34
|
-
|
|
35
|
-
),
|
|
36
|
-
function
|
|
37
|
-
|
|
24
|
+
onChange: D
|
|
25
|
+
}), [G, u] = T({
|
|
26
|
+
prop: q,
|
|
27
|
+
defaultProp: S,
|
|
28
|
+
onChange: B
|
|
29
|
+
}), [M, b] = T({
|
|
30
|
+
prop: U,
|
|
31
|
+
defaultProp: _ ?? g(),
|
|
32
|
+
onChange: V
|
|
33
|
+
}), A = n.useRef(
|
|
34
|
+
M ?? _ ?? g()
|
|
35
|
+
), o = X ?? E, h = G ?? S, s = M ?? g(), m = te(h);
|
|
36
|
+
function j(e) {
|
|
37
|
+
b(e);
|
|
38
38
|
}
|
|
39
39
|
function i(e) {
|
|
40
|
-
|
|
40
|
+
b(e);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
i(
|
|
44
|
-
}
|
|
45
|
-
function b() {
|
|
46
|
-
h.current = r, i(se({ x: r.x, y: r.y })), u("minimized");
|
|
42
|
+
function J() {
|
|
43
|
+
i(g());
|
|
47
44
|
}
|
|
48
45
|
function H() {
|
|
49
|
-
i(
|
|
46
|
+
A.current = s, i(se(s)), u("minimized");
|
|
47
|
+
}
|
|
48
|
+
function K() {
|
|
49
|
+
i(A.current), u("float");
|
|
50
50
|
}
|
|
51
51
|
function Q(e) {
|
|
52
|
-
|
|
52
|
+
A.current = s, i(ce(e, x())), u("float");
|
|
53
53
|
}
|
|
54
54
|
function Y() {
|
|
55
|
-
const e =
|
|
56
|
-
if (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
const e = x();
|
|
56
|
+
if (ie(s, h)) {
|
|
57
|
+
const c = ne(e);
|
|
58
|
+
i(
|
|
59
|
+
re(
|
|
60
|
+
s,
|
|
61
|
+
Math.min(oe, c.width),
|
|
62
|
+
Math.min(ae, c.height),
|
|
63
|
+
e
|
|
64
|
+
)
|
|
65
|
+
), u("float");
|
|
62
66
|
return;
|
|
63
67
|
}
|
|
64
|
-
|
|
65
|
-
{
|
|
66
|
-
x: r.x,
|
|
67
|
-
y: r.y,
|
|
68
|
-
width: Math.min(oe, t.width),
|
|
69
|
-
height: Math.min(ae, t.height)
|
|
70
|
-
},
|
|
71
|
-
e
|
|
72
|
-
);
|
|
73
|
-
h.current = c, i(c), u("float");
|
|
68
|
+
H();
|
|
74
69
|
}
|
|
75
70
|
n.useEffect(() => () => {
|
|
76
|
-
|
|
71
|
+
r.current !== null && window.clearTimeout(r.current), d.current?.();
|
|
77
72
|
}, []);
|
|
78
|
-
const
|
|
79
|
-
|
|
73
|
+
const R = n.useCallback(() => {
|
|
74
|
+
r.current !== null && (window.clearTimeout(r.current), r.current = null);
|
|
80
75
|
const e = C.current;
|
|
81
|
-
e && (e.style.transform = "", e.style.opacity = "", e.style.transition = "", e.style.pointerEvents = ""), P(!1), l(!1),
|
|
82
|
-
}, [
|
|
76
|
+
e && (e.style.transform = "", e.style.opacity = "", e.style.transition = "", e.style.pointerEvents = ""), P(!1), l(!1), w?.();
|
|
77
|
+
}, [w, l]), I = n.useCallback(
|
|
83
78
|
(e) => {
|
|
84
79
|
requestAnimationFrame(() => {
|
|
85
80
|
const c = p?.() ?? null;
|
|
86
|
-
|
|
81
|
+
z({ target: c, panel: e, isWindowPlacement: m }) && (d.current?.(), L(!0), d.current = fe({
|
|
87
82
|
panel: e,
|
|
88
83
|
target: c,
|
|
89
84
|
onComplete: () => {
|
|
90
|
-
d.current = null,
|
|
85
|
+
d.current = null, L(!1);
|
|
91
86
|
}
|
|
92
87
|
}));
|
|
93
88
|
});
|
|
@@ -95,26 +90,26 @@ function Ie(D) {
|
|
|
95
90
|
[p, m]
|
|
96
91
|
), f = n.useRef(!1);
|
|
97
92
|
n.useLayoutEffect(() => {
|
|
98
|
-
if (!
|
|
99
|
-
|
|
93
|
+
if (!o) {
|
|
94
|
+
F.current = !1, f.current = !1;
|
|
100
95
|
return;
|
|
101
96
|
}
|
|
102
|
-
if (
|
|
97
|
+
if (F.current || a)
|
|
103
98
|
return;
|
|
104
|
-
|
|
99
|
+
F.current = !0, f.current = !0;
|
|
105
100
|
const e = C.current;
|
|
106
|
-
e && (f.current = !1,
|
|
107
|
-
}, [
|
|
101
|
+
e && (f.current = !1, I(e));
|
|
102
|
+
}, [a, o, I]);
|
|
108
103
|
const Z = n.useCallback(
|
|
109
104
|
(e) => {
|
|
110
|
-
C.current = e, e && f.current && (f.current = !1,
|
|
105
|
+
C.current = e, e && f.current && (f.current = !1, I(e));
|
|
111
106
|
},
|
|
112
|
-
[
|
|
107
|
+
[I]
|
|
113
108
|
), $ = n.useCallback(() => {
|
|
114
|
-
if (!
|
|
109
|
+
if (!o || a)
|
|
115
110
|
return;
|
|
116
111
|
const e = p?.() ?? null, t = C.current;
|
|
117
|
-
if (!
|
|
112
|
+
if (!z({
|
|
118
113
|
target: e,
|
|
119
114
|
panel: t,
|
|
120
115
|
isWindowPlacement: m
|
|
@@ -125,37 +120,37 @@ function Ie(D) {
|
|
|
125
120
|
const ee = le(
|
|
126
121
|
t.getBoundingClientRect(),
|
|
127
122
|
e.getBoundingClientRect()
|
|
128
|
-
),
|
|
129
|
-
P(!0), t.style.pointerEvents = "none", t.style.transformOrigin = "center center", t.style.transition =
|
|
130
|
-
t.style.transform =
|
|
123
|
+
), y = me(ee);
|
|
124
|
+
P(!0), t.style.pointerEvents = "none", t.style.transformOrigin = "center center", t.style.transition = y.transition, t.style.opacity = y.opacity, requestAnimationFrame(() => {
|
|
125
|
+
t.style.transform = y.transform;
|
|
131
126
|
});
|
|
132
127
|
const O = (k) => {
|
|
133
|
-
k.target !== t || k.propertyName !== "transform" || (t.removeEventListener("transitionend", O),
|
|
128
|
+
k.target !== t || k.propertyName !== "transform" || (t.removeEventListener("transitionend", O), R());
|
|
134
129
|
};
|
|
135
|
-
t.addEventListener("transitionend", O),
|
|
136
|
-
t.removeEventListener("transitionend", O),
|
|
130
|
+
t.addEventListener("transitionend", O), r.current = window.setTimeout(() => {
|
|
131
|
+
t.removeEventListener("transitionend", O), R();
|
|
137
132
|
}, ue + 80);
|
|
138
|
-
}, [p,
|
|
133
|
+
}, [p, R, a, m, o, l]);
|
|
139
134
|
return {
|
|
140
|
-
resolvedOpen:
|
|
141
|
-
resolvedPlacement:
|
|
142
|
-
isClosing:
|
|
135
|
+
resolvedOpen: o,
|
|
136
|
+
resolvedPlacement: h,
|
|
137
|
+
isClosing: a,
|
|
143
138
|
isOpening: v,
|
|
144
139
|
providerValue: {
|
|
145
|
-
open:
|
|
140
|
+
open: o,
|
|
146
141
|
setOpen: l,
|
|
147
142
|
requestClose: $,
|
|
148
|
-
isClosing:
|
|
143
|
+
isClosing: a,
|
|
149
144
|
isOpening: v,
|
|
150
145
|
registerPanelNode: Z,
|
|
151
|
-
placement:
|
|
146
|
+
placement: h,
|
|
152
147
|
setPlacement: u,
|
|
153
|
-
frame:
|
|
154
|
-
setFrame:
|
|
148
|
+
frame: s,
|
|
149
|
+
setFrame: j,
|
|
155
150
|
commitFrame: i,
|
|
156
|
-
resetFrame:
|
|
157
|
-
applyCompactFrame:
|
|
158
|
-
expandFromCompactFrame:
|
|
151
|
+
resetFrame: J,
|
|
152
|
+
applyCompactFrame: H,
|
|
153
|
+
expandFromCompactFrame: K,
|
|
159
154
|
applySnapPreset: Q,
|
|
160
155
|
toggleWindowSize: Y,
|
|
161
156
|
isWindowPlacement: m
|
|
@@ -163,5 +158,5 @@ function Ie(D) {
|
|
|
163
158
|
};
|
|
164
159
|
}
|
|
165
160
|
export {
|
|
166
|
-
|
|
161
|
+
Fe as useIrisChatRoot
|
|
167
162
|
};
|
|
@@ -337,6 +337,11 @@ export interface IrisChatMessages {
|
|
|
337
337
|
snapTopHalf: string;
|
|
338
338
|
snapBottomHalf: string;
|
|
339
339
|
snapFill: string;
|
|
340
|
+
snapDock: string;
|
|
341
|
+
snapBottomRight: string;
|
|
342
|
+
snapBottomLeft: string;
|
|
343
|
+
snapTopRight: string;
|
|
344
|
+
snapTopLeft: string;
|
|
340
345
|
resize: string;
|
|
341
346
|
back: string;
|
|
342
347
|
filter: string;
|
|
@@ -346,6 +346,11 @@ const e = {
|
|
|
346
346
|
snapTopHalf: "Snap to top half",
|
|
347
347
|
snapBottomHalf: "Snap to bottom half",
|
|
348
348
|
snapFill: "Fill available space",
|
|
349
|
+
snapDock: "Dock as chat window",
|
|
350
|
+
snapBottomRight: "Dock bottom right",
|
|
351
|
+
snapBottomLeft: "Dock bottom left",
|
|
352
|
+
snapTopRight: "Dock top right",
|
|
353
|
+
snapTopLeft: "Dock top left",
|
|
349
354
|
resize: "Resize",
|
|
350
355
|
back: "Back",
|
|
351
356
|
filter: "Filter",
|
|
@@ -432,7 +437,7 @@ const e = {
|
|
|
432
437
|
columnOptions: "Column Options",
|
|
433
438
|
chooseColumns: "Choose Columns",
|
|
434
439
|
resetColumns: "Reset Columns"
|
|
435
|
-
},
|
|
440
|
+
}, k = {
|
|
436
441
|
calendar: e,
|
|
437
442
|
datePicker: t,
|
|
438
443
|
filter: a,
|
|
@@ -458,5 +463,5 @@ const e = {
|
|
|
458
463
|
stereoScatter: w
|
|
459
464
|
};
|
|
460
465
|
export {
|
|
461
|
-
|
|
466
|
+
k as defaultMessages
|
|
462
467
|
};
|
package/dist/i18n/locales/de.js
CHANGED
|
@@ -372,6 +372,11 @@ const e = {
|
|
|
372
372
|
snapTopHalf: "Obere Hälfte",
|
|
373
373
|
snapBottomHalf: "Untere Hälfte",
|
|
374
374
|
snapFill: "Verfügbaren Platz füllen",
|
|
375
|
+
snapDock: "Als Chatfenster andocken",
|
|
376
|
+
snapBottomRight: "Unten rechts",
|
|
377
|
+
snapBottomLeft: "Unten links",
|
|
378
|
+
snapTopRight: "Oben rechts",
|
|
379
|
+
snapTopLeft: "Oben links",
|
|
375
380
|
resize: "Größe ändern",
|
|
376
381
|
back: "Zurück",
|
|
377
382
|
filter: "Filter",
|
package/dist/i18n/locales/es.js
CHANGED
|
@@ -372,6 +372,11 @@ const e = {
|
|
|
372
372
|
snapTopHalf: "Mitad superior",
|
|
373
373
|
snapBottomHalf: "Mitad inferior",
|
|
374
374
|
snapFill: "Rellenar espacio",
|
|
375
|
+
snapDock: "Acoplar como chat",
|
|
376
|
+
snapBottomRight: "Abajo a la derecha",
|
|
377
|
+
snapBottomLeft: "Abajo a la izquierda",
|
|
378
|
+
snapTopRight: "Arriba a la derecha",
|
|
379
|
+
snapTopLeft: "Arriba a la izquierda",
|
|
375
380
|
resize: "Redimensionar",
|
|
376
381
|
back: "Atrás",
|
|
377
382
|
filter: "Filtrar",
|
package/dist/i18n/locales/hi.js
CHANGED
|
@@ -372,6 +372,11 @@ const e = {
|
|
|
372
372
|
snapTopHalf: "ऊपरी आधा",
|
|
373
373
|
snapBottomHalf: "निचला आधा",
|
|
374
374
|
snapFill: "उपलब्ध स्थान भरें",
|
|
375
|
+
snapDock: "चैट विंडो के रूप में डॉक करें",
|
|
376
|
+
snapBottomRight: "नीचे दाएँ",
|
|
377
|
+
snapBottomLeft: "नीचे बाएँ",
|
|
378
|
+
snapTopRight: "ऊपर दाएँ",
|
|
379
|
+
snapTopLeft: "ऊपर बाएँ",
|
|
375
380
|
resize: "आकार बदलें",
|
|
376
381
|
back: "वापस",
|
|
377
382
|
filter: "फ़िल्टर",
|
package/dist/i18n/locales/kn.js
CHANGED
|
@@ -372,6 +372,11 @@ const e = {
|
|
|
372
372
|
snapTopHalf: "Snap to top half",
|
|
373
373
|
snapBottomHalf: "Snap to bottom half",
|
|
374
374
|
snapFill: "Fill available space",
|
|
375
|
+
snapDock: "Dock as chat window",
|
|
376
|
+
snapBottomRight: "Dock bottom right",
|
|
377
|
+
snapBottomLeft: "Dock bottom left",
|
|
378
|
+
snapTopRight: "Dock top right",
|
|
379
|
+
snapTopLeft: "Dock top left",
|
|
375
380
|
resize: "Resize",
|
|
376
381
|
back: "Back",
|
|
377
382
|
filter: "Filter",
|