impact-nova 3.0.0-alpha.10 → 3.0.0-alpha.12

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.
Files changed (31) hide show
  1. package/dist/components/data/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +88 -76
  2. package/dist/components/data/data-table/index.d.ts +1 -0
  3. package/dist/components/data/data-table/index.js +16 -14
  4. package/dist/components/data/data-table/use-data-table-viewport.d.ts +10 -0
  5. package/dist/components/data/data-table/use-data-table-viewport.js +31 -0
  6. package/dist/components/flows/iris-chat/IrisChatHeaderWindowSizeButton.js +45 -36
  7. package/dist/components/flows/iris-chat/IrisChatSnapTile.d.ts +8 -0
  8. package/dist/components/flows/iris-chat/IrisChatSnapTile.js +30 -0
  9. package/dist/components/flows/iris-chat/IrisChatWindowSnapMenu.js +67 -53
  10. package/dist/components/flows/iris-chat/iris-chat-frame.d.ts +2 -1
  11. package/dist/components/flows/iris-chat/iris-chat-frame.js +40 -31
  12. package/dist/components/flows/iris-chat/iris-chat-snap-presets.d.ts +4 -1
  13. package/dist/components/flows/iris-chat/iris-chat-snap-presets.js +49 -29
  14. package/dist/components/flows/iris-chat/iris-chat-thread.js +95 -96
  15. package/dist/components/flows/iris-chat/iris-chat-window-chrome.d.ts +3 -0
  16. package/dist/components/flows/iris-chat/iris-chat-window-chrome.js +5 -2
  17. package/dist/components/flows/iris-chat/use-iris-chat-root.js +83 -88
  18. package/dist/components/primitives/stepper/stepper.js +29 -28
  19. package/dist/components/primitives/stepper/stepper.types.d.ts +2 -0
  20. package/dist/i18n/defaultMessages.d.ts +5 -0
  21. package/dist/i18n/defaultMessages.js +7 -2
  22. package/dist/i18n/locales/de.js +5 -0
  23. package/dist/i18n/locales/es.js +5 -0
  24. package/dist/i18n/locales/hi.js +5 -0
  25. package/dist/i18n/locales/kn.js +5 -0
  26. package/dist/impact-nova-components.css +16 -6
  27. package/dist/impact-nova.css +1 -1
  28. package/dist/index.js +132 -130
  29. package/dist/llms/rules/installation.js +1 -1
  30. package/dist/llms/rules/requirements.js +1 -1
  31. package/package.json +1 -1
@@ -1,85 +1,99 @@
1
- import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
- import { useImpactNovaI18n as o } from "../../../i18n/use-impact-nova-i18n.js";
3
- import { cn as c } from "../../../lib/utils.js";
4
- import { useIrisChat as d } from "./iris-chat-context.js";
5
- function i(e) {
6
- return /* @__PURE__ */ s(
7
- "button",
8
- {
9
- type: "button",
10
- "data-testid": `iris-chat-snap-${e.preset}`,
11
- "aria-label": e.label,
12
- className: "flex flex-col items-center gap-1 rounded-lg p-1.5 text-content-secondary hover:bg-surface-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
13
- onClick: () => e.onSelect(e.preset),
14
- children: [
15
- /* @__PURE__ */ t(
16
- "span",
17
- {
18
- "aria-hidden": !0,
19
- className: c(
20
- "box-border h-7 w-9 rounded border border-border bg-surface-elevated",
21
- e.previewClassName
22
- )
23
- }
24
- ),
25
- /* @__PURE__ */ t("span", { className: "sr-only", children: e.label })
26
- ]
27
- }
28
- );
29
- }
30
- function u(e) {
31
- const { t: a } = o(), n = d();
32
- function r(l) {
33
- n.applySnapPreset(l), e.onPresetSelected?.();
1
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
+ import { useImpactNovaI18n as n } from "../../../i18n/use-impact-nova-i18n.js";
3
+ import { IrisChatSnapTile as r } from "./IrisChatSnapTile.js";
4
+ import { useIrisChat as p } from "./iris-chat-context.js";
5
+ function b(s) {
6
+ const { t: e } = n(), o = p();
7
+ function a(l) {
8
+ o.applySnapPreset(l), s.onPresetSelected?.();
34
9
  }
35
- return /* @__PURE__ */ s("div", { "data-component": "iris-chat-window-snap-menu", className: "flex flex-col gap-2", children: [
36
- /* @__PURE__ */ t("p", { className: "text-xs font-semibold text-content-caption", children: a("irisChat.snapMoveResize") }),
37
- /* @__PURE__ */ s("div", { className: "grid grid-cols-4 gap-1", children: [
10
+ return /* @__PURE__ */ i("div", { "data-component": "iris-chat-window-snap-menu", className: "flex flex-col gap-2", children: [
11
+ /* @__PURE__ */ t("p", { className: "text-xs font-semibold text-content-caption", children: e("irisChat.snapMoveResize") }),
12
+ /* @__PURE__ */ i("div", { className: "grid grid-cols-4 gap-1", children: [
38
13
  /* @__PURE__ */ t(
39
- i,
14
+ r,
40
15
  {
41
- label: a("irisChat.snapLeftHalf"),
16
+ label: e("irisChat.snapLeftHalf"),
42
17
  preset: "leftHalf",
43
- onSelect: r,
18
+ onSelect: a,
44
19
  previewClassName: "bg-[linear-gradient(to_right,var(--color-primary-soft)_50%,transparent_50%)]"
45
20
  }
46
21
  ),
47
22
  /* @__PURE__ */ t(
48
- i,
23
+ r,
49
24
  {
50
- label: a("irisChat.snapRightHalf"),
25
+ label: e("irisChat.snapRightHalf"),
51
26
  preset: "rightHalf",
52
- onSelect: r,
27
+ onSelect: a,
53
28
  previewClassName: "bg-[linear-gradient(to_left,var(--color-primary-soft)_50%,transparent_50%)]"
54
29
  }
55
30
  ),
56
31
  /* @__PURE__ */ t(
57
- i,
32
+ r,
58
33
  {
59
- label: a("irisChat.snapTopHalf"),
34
+ label: e("irisChat.snapTopHalf"),
60
35
  preset: "topHalf",
61
- onSelect: r,
36
+ onSelect: a,
62
37
  previewClassName: "bg-[linear-gradient(to_bottom,var(--color-primary-soft)_50%,transparent_50%)]"
63
38
  }
64
39
  ),
65
40
  /* @__PURE__ */ t(
66
- i,
41
+ r,
67
42
  {
68
- label: a("irisChat.snapBottomHalf"),
43
+ label: e("irisChat.snapBottomHalf"),
69
44
  preset: "bottomHalf",
70
- onSelect: r,
45
+ onSelect: a,
71
46
  previewClassName: "bg-[linear-gradient(to_top,var(--color-primary-soft)_50%,transparent_50%)]"
72
47
  }
73
48
  )
74
49
  ] }),
75
- /* @__PURE__ */ s(
50
+ /* @__PURE__ */ t("p", { className: "text-xs font-semibold text-content-caption", children: e("irisChat.snapDock") }),
51
+ /* @__PURE__ */ i("div", { className: "grid grid-cols-4 gap-1", children: [
52
+ /* @__PURE__ */ t(
53
+ r,
54
+ {
55
+ label: e("irisChat.snapBottomLeft"),
56
+ preset: "bottomLeft",
57
+ onSelect: a,
58
+ previewClassName: "bg-[radial-gradient(at_0%_100%,var(--color-primary-soft)_55%,transparent_56%)]"
59
+ }
60
+ ),
61
+ /* @__PURE__ */ t(
62
+ r,
63
+ {
64
+ label: e("irisChat.snapBottomRight"),
65
+ preset: "bottomRight",
66
+ onSelect: a,
67
+ previewClassName: "bg-[radial-gradient(at_100%_100%,var(--color-primary-soft)_55%,transparent_56%)]"
68
+ }
69
+ ),
70
+ /* @__PURE__ */ t(
71
+ r,
72
+ {
73
+ label: e("irisChat.snapTopLeft"),
74
+ preset: "topLeft",
75
+ onSelect: a,
76
+ previewClassName: "bg-[radial-gradient(at_0%_0%,var(--color-primary-soft)_55%,transparent_56%)]"
77
+ }
78
+ ),
79
+ /* @__PURE__ */ t(
80
+ r,
81
+ {
82
+ label: e("irisChat.snapTopRight"),
83
+ preset: "topRight",
84
+ onSelect: a,
85
+ previewClassName: "bg-[radial-gradient(at_100%_0%,var(--color-primary-soft)_55%,transparent_56%)]"
86
+ }
87
+ )
88
+ ] }),
89
+ /* @__PURE__ */ i(
76
90
  "button",
77
91
  {
78
92
  type: "button",
79
93
  "data-testid": "iris-chat-snap-fill",
80
- "aria-label": a("irisChat.snapFill"),
94
+ "aria-label": e("irisChat.snapFill"),
81
95
  className: "flex items-center gap-2 rounded-lg border border-border bg-surface-muted px-2 py-1.5 text-left text-xs font-medium text-content hover:bg-surface-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
82
- onClick: () => r("fill"),
96
+ onClick: () => a("fill"),
83
97
  children: [
84
98
  /* @__PURE__ */ t(
85
99
  "span",
@@ -88,12 +102,12 @@ function u(e) {
88
102
  className: "h-5 w-7 rounded border border-border bg-primary-soft"
89
103
  }
90
104
  ),
91
- a("irisChat.snapFill")
105
+ e("irisChat.snapFill")
92
106
  ]
93
107
  }
94
108
  )
95
109
  ] });
96
110
  }
97
111
  export {
98
- u as IrisChatWindowSnapMenu
112
+ b as IrisChatWindowSnapMenu
99
113
  };
@@ -24,7 +24,8 @@ export declare function readIrisChatMaxFrameSize(viewport: IrisChatViewport): {
24
24
  height: number;
25
25
  };
26
26
  export declare function createDefaultIrisChatFrame(viewport?: IrisChatViewport): IrisChatFrame;
27
- export declare function createCompactIrisChatFrame(anchor: Pick<IrisChatFrame, "x" | "y">, viewport?: IrisChatViewport): IrisChatFrame;
27
+ export declare function readIrisChatFrameWithSizeAnchoredAtBottomRight(frame: IrisChatFrame, targetWidth: number, targetHeight: number, viewport?: IrisChatViewport): IrisChatFrame;
28
+ export declare function createCompactIrisChatFrame(frame: IrisChatFrame, viewport?: IrisChatViewport): IrisChatFrame;
28
29
  export declare function clampIrisChatFrame(frame: IrisChatFrame, viewport: IrisChatViewport): IrisChatFrame;
29
30
  export declare function moveIrisChatFrame(frame: IrisChatFrame, deltaX: number, deltaY: number, viewport: IrisChatViewport): IrisChatFrame;
30
31
  export declare function resizeIrisChatFrame(frame: IrisChatFrame, edge: IrisChatResizeEdge, deltaX: number, deltaY: number, viewport: IrisChatViewport): IrisChatFrame;
@@ -1,8 +1,8 @@
1
- const a = 16, s = 280, c = 360, o = 420, P = 640, r = 360, F = 480, S = 80;
2
- function e() {
1
+ const C = 16, s = 280, a = 360, P = 420, S = 640, r = 360, F = 480, D = 80;
2
+ function M() {
3
3
  return typeof window > "u" ? { width: 1280, height: 800 } : { width: window.innerWidth, height: window.innerHeight };
4
4
  }
5
- function R(_) {
5
+ function T(_) {
6
6
  const t = Math.max(
7
7
  280,
8
8
  _.width - 32
@@ -12,8 +12,8 @@ function R(_) {
12
12
  );
13
13
  return { width: t, height: I };
14
14
  }
15
- function D(_ = e()) {
16
- const { width: t, height: I } = R(_), h = Math.min(420, t), i = Math.min(640, I);
15
+ function X(_ = M()) {
16
+ const { width: t, height: I } = T(_), h = Math.min(420, t), i = Math.min(640, I);
17
17
  return {
18
18
  x: _.width - h - 16,
19
19
  y: _.height - i - 16,
@@ -21,24 +21,32 @@ function D(_ = e()) {
21
21
  height: i
22
22
  };
23
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(
24
+ function e(_, t, I, h = M()) {
25
+ const i = T(h), n = Math.min(Math.max(t, 280), i.width), A = Math.min(Math.max(I, 360), i.height), H = _.x + _.width, R = _.y + _.height;
26
+ return o(
27
27
  {
28
- x: _.x,
29
- y: _.y,
30
- width: i,
31
- height: n
28
+ x: H - n,
29
+ y: R - A,
30
+ width: n,
31
+ height: A
32
32
  },
33
+ h
34
+ );
35
+ }
36
+ function m(_, t = M()) {
37
+ return e(
38
+ _,
39
+ 360,
40
+ 480,
33
41
  t
34
42
  );
35
43
  }
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 };
44
+ function o(_, t) {
45
+ const I = T(t), h = Math.min(Math.max(_.width, 280), I.width), i = Math.min(Math.max(_.height, 360), I.height), n = t.width - 80, A = t.height - 80, H = 16 - h + 80, R = 16, E = Math.min(Math.max(_.x, H), n), c = Math.min(Math.max(_.y, R), A);
46
+ return { x: E, y: c, width: h, height: i };
39
47
  }
40
48
  function d(_, t, I, h) {
41
- return T(
49
+ return o(
42
50
  {
43
51
  ..._,
44
52
  x: _.x + t,
@@ -47,11 +55,11 @@ function d(_, t, I, h) {
47
55
  h
48
56
  );
49
57
  }
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);
58
+ function u(_, t, I, h, i) {
59
+ let { x: n, y: A, width: H, height: R } = _;
60
+ return t.includes("east") && (H += I), t.includes("west") && (n += I, H -= I), t.includes("south") && (R += h), t.includes("north") && (A += h, R -= h), o({ x: n, y: A, width: H, height: R }, i);
53
61
  }
54
- function u(_) {
62
+ function x(_) {
55
63
  return {
56
64
  left: _.x,
57
65
  top: _.y,
@@ -62,18 +70,19 @@ function u(_) {
62
70
  export {
63
71
  F as IRIS_CHAT_FRAME_COMPACT_HEIGHT_PX,
64
72
  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,
73
+ S as IRIS_CHAT_FRAME_DEFAULT_HEIGHT_PX,
74
+ P as IRIS_CHAT_FRAME_DEFAULT_WIDTH_PX,
75
+ a as IRIS_CHAT_FRAME_MIN_HEIGHT_PX,
68
76
  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,
77
+ C as IRIS_CHAT_FRAME_PADDING_PX,
78
+ D as IRIS_CHAT_HEADER_MIN_VISIBLE_PX,
79
+ o as clampIrisChatFrame,
72
80
  m as createCompactIrisChatFrame,
73
- D as createDefaultIrisChatFrame,
81
+ X as createDefaultIrisChatFrame,
74
82
  d as moveIrisChatFrame,
75
- u as readIrisChatFrameStyle,
76
- R as readIrisChatMaxFrameSize,
77
- e as readIrisChatViewport,
78
- X as resizeIrisChatFrame
83
+ x as readIrisChatFrameStyle,
84
+ e as readIrisChatFrameWithSizeAnchoredAtBottomRight,
85
+ T as readIrisChatMaxFrameSize,
86
+ M as readIrisChatViewport,
87
+ u as resizeIrisChatFrame
79
88
  };
@@ -1,4 +1,7 @@
1
1
  import { IrisChatFrame, IrisChatViewport } from './iris-chat-frame';
2
- export type IrisChatSnapPreset = "leftHalf" | "rightHalf" | "topHalf" | "bottomHalf" | "fill";
2
+ import { IrisChatPlacement } from './iris-chat.types';
3
+ export type IrisChatSnapPreset = "leftHalf" | "rightHalf" | "topHalf" | "bottomHalf" | "fill" | "bottomRight" | "bottomLeft" | "topRight" | "topLeft";
4
+ export type IrisChatDockCorner = "bottomRight" | "bottomLeft" | "topRight" | "topLeft";
3
5
  export declare function createIrisChatSnapFrame(preset: IrisChatSnapPreset, viewport?: IrisChatViewport): IrisChatFrame;
4
6
  export declare function readIrisChatFrameIsLarge(frame: IrisChatFrame, viewport: IrisChatViewport, largeThresholdRatio?: number): boolean;
7
+ export declare function readIrisChatFrameIsCompact(frame: IrisChatFrame, placement: IrisChatPlacement): boolean;
@@ -1,63 +1,83 @@
1
- import { readIrisChatMaxFrameSize as s, clampIrisChatFrame as d, IRIS_CHAT_FRAME_PADDING_PX as g } from "./iris-chat-frame.js";
2
- function l(r, n = { width: 1280, height: 800 }) {
3
- const t = g, a = s(n), h = a.width, i = a.height, o = Math.floor(h / 2), c = Math.floor(i / 2);
4
- let e;
5
- switch (r) {
1
+ import { IRIS_CHAT_FRAME_COMPACT_WIDTH_PX as g, IRIS_CHAT_FRAME_COMPACT_HEIGHT_PX as I, readIrisChatMaxFrameSize as s, clampIrisChatFrame as _, IRIS_CHAT_FRAME_PADDING_PX as d, IRIS_CHAT_FRAME_DEFAULT_WIDTH_PX as m, IRIS_CHAT_FRAME_DEFAULT_HEIGHT_PX as f } from "./iris-chat-frame.js";
2
+ function H(i, h) {
3
+ const t = d, o = s(h), e = Math.min(m, o.width), a = Math.min(f, o.height);
4
+ let r = t, c = t;
5
+ switch (i) {
6
+ case "bottomRight":
7
+ r = h.width - e - t, c = h.height - a - t;
8
+ break;
9
+ case "bottomLeft":
10
+ c = h.height - a - t;
11
+ break;
12
+ case "topRight":
13
+ r = h.width - e - t;
14
+ break;
15
+ }
16
+ return _({ x: r, y: c, width: e, height: a }, h);
17
+ }
18
+ function A(i, h = { width: 1280, height: 800 }) {
19
+ const t = d, o = s(h), e = o.width, a = o.height, r = Math.floor(e / 2), c = Math.floor(a / 2);
20
+ let n;
21
+ switch (i) {
6
22
  case "leftHalf":
7
- e = {
23
+ n = {
8
24
  x: t,
9
25
  y: t,
10
- width: o,
11
- height: i
26
+ width: r,
27
+ height: a
12
28
  };
13
29
  break;
14
30
  case "rightHalf":
15
- e = {
16
- x: t + o,
31
+ n = {
32
+ x: t + r,
17
33
  y: t,
18
- width: h - o,
19
- height: i
34
+ width: e - r,
35
+ height: a
20
36
  };
21
37
  break;
22
38
  case "topHalf":
23
- e = {
39
+ n = {
24
40
  x: t,
25
41
  y: t,
26
- width: h,
42
+ width: e,
27
43
  height: c
28
44
  };
29
45
  break;
30
46
  case "bottomHalf":
31
- e = {
47
+ n = {
32
48
  x: t,
33
49
  y: t + c,
34
- width: h,
35
- height: i - c
50
+ width: e,
51
+ height: a - c
36
52
  };
37
53
  break;
38
54
  case "fill":
39
- e = {
55
+ n = {
40
56
  x: t,
41
57
  y: t,
42
- width: h,
43
- height: i
58
+ width: e,
59
+ height: a
44
60
  };
45
61
  break;
62
+ case "bottomRight":
63
+ case "bottomLeft":
64
+ case "topRight":
65
+ case "topLeft":
66
+ return H(i, h);
46
67
  default:
47
- e = {
68
+ n = {
48
69
  x: t,
49
70
  y: t,
50
- width: h,
51
- height: i
71
+ width: e,
72
+ height: a
52
73
  };
53
74
  }
54
- return d(e, n);
75
+ return _(n, h);
55
76
  }
56
- function w(r, n, t = 0.8) {
57
- const a = s(n), h = r.width / a.width, i = r.height / a.height;
58
- return h >= t && i >= t;
77
+ function C(i, h) {
78
+ return h === "minimized" ? !0 : i.width <= g && i.height <= I;
59
79
  }
60
80
  export {
61
- l as createIrisChatSnapFrame,
62
- w as readIrisChatFrameIsLarge
81
+ A as createIrisChatSnapFrame,
82
+ C as readIrisChatFrameIsCompact
63
83
  };