impact-nova 2.5.22 → 2.6.0

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 (37) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +2 -0
  2. package/dist/components/data/ag-grid-react/headers/components/header-info.d.ts +9 -3
  3. package/dist/components/data/ag-grid-react/headers/components/header-info.js +69 -61
  4. package/dist/components/data/ag-grid-react/headers/components/info-modal.js +8 -8
  5. package/dist/components/flows/guidance/guidance-layer.js +34 -31
  6. package/dist/components/flows/guidance/hooks/useGuidanceOverlayGeometry.js +29 -20
  7. package/dist/components/flows/guidance/renderers/announcement-renderer.d.ts +1 -1
  8. package/dist/components/flows/guidance/renderers/announcement-renderer.js +74 -28
  9. package/dist/components/flows/guidance/renderers/guidance-action-tap-icon.d.ts +5 -0
  10. package/dist/components/flows/guidance/renderers/guidance-action-tap-icon.js +68 -0
  11. package/dist/components/flows/guidance/renderers/guidance-announcement-surface.d.ts +5 -0
  12. package/dist/components/flows/guidance/renderers/guidance-announcement-surface.js +76 -0
  13. package/dist/components/flows/guidance/renderers/guidance-card-shared.d.ts +43 -2
  14. package/dist/components/flows/guidance/renderers/guidance-card-shared.js +322 -99
  15. package/dist/components/flows/guidance/renderers/guidance-renderer-shared.d.ts +3 -0
  16. package/dist/components/flows/guidance/renderers/guidance-renderer-shared.js +189 -148
  17. package/dist/components/flows/guidance/renderers/guidance-shortcut-display.d.ts +9 -0
  18. package/dist/components/flows/guidance/renderers/guidance-shortcut-display.js +36 -0
  19. package/dist/components/flows/guidance/renderers/guidance-tour-overlay.d.ts +2 -1
  20. package/dist/components/flows/guidance/renderers/guidance-tour-overlay.js +152 -89
  21. package/dist/i18n/defaultMessages.d.ts +6 -0
  22. package/dist/i18n/defaultMessages.js +13 -9
  23. package/dist/i18n/locales/de.js +4 -0
  24. package/dist/i18n/locales/es.js +4 -0
  25. package/dist/i18n/locales/hi.js +4 -0
  26. package/dist/i18n/locales/kn.js +4 -0
  27. package/dist/impact-nova-tokens.scss +22 -0
  28. package/dist/impact-nova.css +1 -1
  29. package/dist/lib/guidance/engine/guidance-engine.d.ts +9 -0
  30. package/dist/lib/guidance/engine/guidance-engine.js +127 -65
  31. package/dist/lib/guidance/engine/manifest-validator.js +37 -30
  32. package/dist/lib/guidance/targets/target-resolver.d.ts +1 -1
  33. package/dist/lib/guidance/targets/target-resolver.js +32 -30
  34. package/dist/lib/guidance/types/guidance.types.d.ts +41 -0
  35. package/dist/llms/rules/installation.js +1 -1
  36. package/dist/llms/rules/requirements.js +1 -1
  37. package/package.json +2 -1
@@ -1,239 +1,280 @@
1
- import * as A from "react";
2
- const T = 16, b = 12, S = 16, v = 32;
3
- function H(e) {
4
- const t = window.getComputedStyle(e);
1
+ import * as P from "react";
2
+ const y = 16, L = 12, D = 12, G = 16, A = 32;
3
+ function R(n) {
4
+ const t = window.getComputedStyle(n);
5
5
  return t.overflow === "hidden" || t.overflow === "auto" || t.overflow === "scroll" || t.overflow === "clip" || t.overflowY === "hidden" || t.overflowY === "auto" || t.overflowY === "scroll" || t.overflowY === "clip" || t.overflowX === "hidden" || t.overflowX === "auto" || t.overflowX === "scroll" || t.overflowX === "clip";
6
6
  }
7
- function R(e) {
7
+ function k(n) {
8
8
  const t = [];
9
- let n = e.parentElement;
10
- for (; n; )
11
- H(n) && t.push(n), n = n.parentElement;
9
+ let e = n.parentElement;
10
+ for (; e; )
11
+ R(e) && t.push(e), e = e.parentElement;
12
12
  return t;
13
13
  }
14
- function w(e, t) {
15
- const n = Math.max(e.x, t.x), o = Math.max(e.y, t.y), i = Math.min(
16
- e.x + e.width,
14
+ function x(n, t) {
15
+ const e = Math.max(n.x, t.x), o = Math.max(n.y, t.y), r = Math.min(
16
+ n.x + n.width,
17
17
  t.x + t.width
18
- ), r = Math.min(
19
- e.y + e.height,
18
+ ), i = Math.min(
19
+ n.y + n.height,
20
20
  t.y + t.height
21
21
  );
22
- return i <= n || r <= o ? null : {
23
- x: n,
22
+ return r <= e || i <= o ? null : {
23
+ x: e,
24
24
  y: o,
25
- width: i - n,
26
- height: r - o
25
+ width: r - e,
26
+ height: i - o
27
27
  };
28
28
  }
29
- function m(e) {
29
+ function C(n) {
30
30
  return {
31
- x: e.left,
32
- y: e.top,
33
- width: e.width,
34
- height: e.height
31
+ x: n.left,
32
+ y: n.top,
33
+ width: n.width,
34
+ height: n.height
35
35
  };
36
36
  }
37
- function M(e) {
38
- let t = m(
39
- e.getBoundingClientRect()
37
+ function W(n) {
38
+ let t = C(
39
+ n.getBoundingClientRect()
40
40
  );
41
- for (const i of R(e)) {
42
- const r = w(
41
+ for (const r of k(n)) {
42
+ const i = x(
43
43
  t,
44
- m(i.getBoundingClientRect())
44
+ C(r.getBoundingClientRect())
45
45
  );
46
- if (!r)
46
+ if (!i)
47
47
  break;
48
- t = r;
48
+ t = i;
49
49
  }
50
- const n = {
50
+ const e = {
51
51
  x: 0,
52
52
  y: 0,
53
53
  width: window.innerWidth,
54
54
  height: window.innerHeight
55
55
  };
56
- return w(
56
+ return x(
57
57
  t,
58
- n
58
+ e
59
59
  ) ?? t;
60
60
  }
61
- function C(e) {
61
+ function E(n) {
62
62
  const t = [];
63
- let n = e.parentElement;
64
- for (; n; ) {
65
- const o = window.getComputedStyle(n);
66
- (o.overflowY === "auto" || o.overflowY === "scroll" || o.overflowY === "overlay") && n.scrollHeight > n.clientHeight && t.push(n), n = n.parentElement;
63
+ let e = n.parentElement;
64
+ for (; e; ) {
65
+ const o = window.getComputedStyle(e);
66
+ (o.overflowY === "auto" || o.overflowY === "scroll" || o.overflowY === "overlay") && e.scrollHeight > e.clientHeight && t.push(e), e = e.parentElement;
67
67
  }
68
68
  return t;
69
69
  }
70
- function E(e) {
71
- return C(e).map((t) => ({
70
+ function _(n) {
71
+ return E(n).map((t) => ({
72
72
  element: t,
73
73
  scrollTop: t.scrollTop,
74
74
  scrollLeft: t.scrollLeft
75
75
  }));
76
76
  }
77
- function I(e) {
78
- for (const t of e)
77
+ function B(n) {
78
+ for (const t of n)
79
79
  t.element.isConnected && (t.element.scrollTop = t.scrollTop, t.element.scrollLeft = t.scrollLeft);
80
80
  }
81
- let s = null;
82
- function _(e) {
83
- s === null && (s = E(e));
81
+ let d = null;
82
+ function j(n) {
83
+ d === null && (d = _(n));
84
84
  }
85
- function k() {
86
- s !== null && (I(s), s = null);
85
+ function z() {
86
+ d !== null && (B(d), d = null);
87
87
  }
88
- function L(e, t = v) {
89
- const n = e.getBoundingClientRect(), o = window.innerHeight;
90
- return n.top < t || n.bottom > o - t;
88
+ function N(n, t = A) {
89
+ const e = n.getBoundingClientRect(), o = window.innerHeight;
90
+ return e.top < t || e.bottom > o - t;
91
91
  }
92
- function D(e) {
93
- const { targetElement: t, scrollContainer: n, viewportPadding: o } = e, i = n.getBoundingClientRect(), r = t.getBoundingClientRect(), c = n.clientHeight - o * 2;
94
- if (r.height >= c) {
95
- const l = r.top - i.top - o;
96
- Math.abs(l) > 1 && (n.scrollTop += l);
92
+ function O(n) {
93
+ const { targetElement: t, scrollContainer: e, viewportPadding: o } = n, r = e.getBoundingClientRect(), i = t.getBoundingClientRect(), u = e.clientHeight - o * 2;
94
+ if (i.height >= u) {
95
+ const h = i.top - r.top - o;
96
+ Math.abs(h) > 1 && (e.scrollTop += h);
97
97
  return;
98
98
  }
99
- if (r.top < i.top + o) {
100
- n.scrollTop -= i.top + o - r.top;
99
+ if (i.top < r.top + o) {
100
+ e.scrollTop -= r.top + o - i.top;
101
101
  return;
102
102
  }
103
- r.bottom > i.bottom - o && (n.scrollTop += r.bottom - (i.bottom - o));
103
+ i.bottom > r.bottom - o && (e.scrollTop += i.bottom - (r.bottom - o));
104
104
  }
105
- function V(e, t = v) {
106
- if (!L(e, t))
105
+ function J(n, t = A) {
106
+ if (!N(n, t))
107
107
  return;
108
- const o = C(e)[0];
108
+ const o = E(n)[0];
109
109
  if (o) {
110
- D({
111
- targetElement: e,
110
+ O({
111
+ targetElement: n,
112
112
  scrollContainer: o,
113
113
  viewportPadding: t
114
114
  });
115
115
  return;
116
116
  }
117
- e.scrollIntoView({
117
+ n.scrollIntoView({
118
118
  behavior: "auto",
119
119
  block: "center",
120
120
  inline: "nearest"
121
121
  });
122
122
  }
123
- function O(e, t) {
124
- const n = e.advanceOn === "click-target";
125
- return A.useEffect(() => {
126
- if (!n)
123
+ function K(n, t) {
124
+ const e = n.advanceOn === "click-target";
125
+ return P.useEffect(() => {
126
+ if (!e)
127
127
  return;
128
- const o = e.target?.element;
128
+ const o = n.target?.element;
129
129
  if (!o)
130
130
  return;
131
- const i = () => {
131
+ const r = () => {
132
132
  requestAnimationFrame(() => {
133
133
  requestAnimationFrame(() => {
134
134
  t();
135
135
  });
136
136
  });
137
137
  };
138
- return o.addEventListener("click", i, { once: !0 }), () => {
139
- o.removeEventListener("click", i);
138
+ return o.addEventListener("click", r, { once: !0 }), () => {
139
+ o.removeEventListener("click", r);
140
140
  };
141
141
  }, [
142
- n,
143
- e.stepId,
144
- e.target?.element,
142
+ e,
143
+ n.stepId,
144
+ n.target?.element,
145
145
  t
146
- ]), n;
146
+ ]), e;
147
147
  }
148
- function G(e, t = T, n) {
148
+ function V(n, t = y, e) {
149
149
  return {
150
- x: e.x - t,
151
- y: e.y - t,
152
- width: e.width + t * 2,
153
- height: e.height + t * 2
150
+ x: n.x - t,
151
+ y: n.y - t,
152
+ width: n.width + t * 2,
153
+ height: n.height + t * 2
154
154
  };
155
155
  }
156
- function N(e, t = T) {
157
- const n = M(e);
158
- return G(n, t);
156
+ function Q(n, t = y) {
157
+ const e = W(n);
158
+ return V(e, t);
159
159
  }
160
- function F(e) {
160
+ function Y(n, t, e = 2) {
161
+ return !(n.x + n.width <= t.x - e || t.x + t.width <= n.x - e || n.y + n.height <= t.y - e || t.y + t.height <= n.y - e);
162
+ }
163
+ function Z(n) {
161
164
  const {
162
165
  targetRect: t,
163
- popoverWidth: n,
166
+ popoverWidth: e,
164
167
  popoverHeight: o,
165
- gap: i = b,
166
- viewportPadding: r = S
167
- } = e, c = t.x + t.width, h = t.y + t.height, l = t.x, x = window.innerWidth - c;
168
- if (t.width <= 280 && t.x >= window.innerWidth * 0.35 && l >= n + i)
169
- return {
170
- placement: "left",
171
- left: Math.max(r, t.x - n - i),
172
- top: Math.max(
173
- r,
174
- Math.min(
175
- t.y,
176
- window.innerHeight - o - r
177
- )
178
- )
179
- };
180
- if (t.width >= 480 && c >= window.innerWidth - r - 80 && l >= n + i)
168
+ gap: r = L,
169
+ viewportPadding: i = G,
170
+ preferredPlacement: u = "auto"
171
+ } = n, l = r + D, h = t.x + t.width, v = t.y + t.height, g = t.x, f = window.innerWidth - h, m = t.y, w = window.innerHeight - v, S = (s) => ({
172
+ x: s.left,
173
+ y: s.top,
174
+ width: e,
175
+ height: o
176
+ }), p = (s) => {
177
+ for (const a of s) {
178
+ const c = b(a);
179
+ if (!Y(S(c), t))
180
+ return c;
181
+ }
182
+ return b(s[0]);
183
+ }, b = (s) => {
184
+ let a, c;
185
+ switch (s) {
186
+ case "left":
187
+ c = Math.max(
188
+ i,
189
+ t.x - e - l
190
+ ), a = Math.max(
191
+ i,
192
+ Math.min(
193
+ t.y,
194
+ window.innerHeight - o - i
195
+ )
196
+ );
197
+ break;
198
+ case "right":
199
+ c = Math.min(
200
+ h + l,
201
+ window.innerWidth - e - i
202
+ ), a = Math.max(
203
+ i,
204
+ Math.min(
205
+ t.y,
206
+ window.innerHeight - o - i
207
+ )
208
+ );
209
+ break;
210
+ case "top":
211
+ a = Math.max(i, t.y - o - r), c = t.x + t.width / 2 - e / 2, c = Math.max(
212
+ i,
213
+ Math.min(c, window.innerWidth - e - i)
214
+ );
215
+ break;
216
+ default:
217
+ a = Math.min(
218
+ v + r,
219
+ window.innerHeight - o - i
220
+ ), c = t.x + t.width / 2 - e / 2, c = Math.max(
221
+ i,
222
+ Math.min(c, window.innerWidth - e - i)
223
+ );
224
+ break;
225
+ }
226
+ return { top: a, left: c, placement: s };
227
+ };
228
+ if (u !== "auto" && {
229
+ left: g >= e + l,
230
+ right: f >= e + l,
231
+ top: m >= o + r,
232
+ bottom: w >= o + r
233
+ }[u])
234
+ return p([u, "left", "right", "top", "bottom"]);
235
+ const H = t.width <= 320, M = e >= t.width * 1.15;
236
+ if (H && M) {
237
+ const s = g >= f ? ["left", "right"] : ["right", "left"];
238
+ if (g >= e + l || f >= e + l)
239
+ return p([...s, "top", "bottom"]);
240
+ }
241
+ if (t.width <= 280 && t.x >= window.innerWidth * 0.35 && g >= e + l)
242
+ return p(["left", "right", "top", "bottom"]);
243
+ if (t.width >= 480 && h >= window.innerWidth - i - 80 && g >= e + l)
181
244
  return {
182
245
  placement: "left",
183
- left: Math.max(r, t.x - n - i),
246
+ left: Math.max(i, t.x - e - l),
184
247
  top: Math.max(
185
- r,
248
+ i,
186
249
  Math.min(
187
250
  t.y + 16,
188
- window.innerHeight - o - r
251
+ window.innerHeight - o - i
189
252
  )
190
253
  )
191
254
  };
192
255
  if (t.height > t.width * 2.5) {
193
- const f = Math.max(
194
- r,
195
- Math.min(
196
- t.y,
197
- window.innerHeight - o - r
198
- )
199
- );
200
- if (x >= n + i)
201
- return {
202
- placement: "right",
203
- left: c + i,
204
- top: f
205
- };
206
- if (l >= n + i)
207
- return {
208
- placement: "left",
209
- left: t.x - n - i,
210
- top: f
211
- };
256
+ if (f >= e + l)
257
+ return p(["right", "left", "top", "bottom"]);
258
+ if (g >= e + l)
259
+ return p(["left", "right", "top", "bottom"]);
212
260
  }
213
- const g = window.innerHeight - h, d = t.y, y = t.y + t.height / 2 > window.innerHeight * 0.55;
214
- let a;
215
- y && d >= o + i && g < o + i * 2 ? a = "top" : a = g >= o + i || g >= d ? "bottom" : "top";
216
- let p = a === "bottom" ? h + i : t.y - o - i, u = t.x + t.width / 2 - n / 2;
217
- return u = Math.max(
218
- r,
219
- Math.min(u, window.innerWidth - n - r)
220
- ), p = Math.max(
221
- r,
222
- Math.min(p, window.innerHeight - o - r)
223
- ), { top: p, left: u, placement: a };
261
+ const I = t.y + t.height / 2 > window.innerHeight * 0.55;
262
+ let T;
263
+ return I && m >= o + r && w < o + r * 2 ? T = "top" : T = w >= o + r || w >= m ? "bottom" : "top", p([T, "left", "right", "top", "bottom"]);
224
264
  }
225
265
  export {
226
- b as GUIDANCE_POPOVER_GAP,
227
- T as GUIDANCE_SPOTLIGHT_PADDING,
228
- v as GUIDANCE_TARGET_SCROLL_PADDING,
229
- S as GUIDANCE_VIEWPORT_PADDING,
230
- _ as beginTourScrollSnapshot,
231
- G as buildHighlightRect,
232
- N as buildHighlightRectForTarget,
233
- F as computePopoverPosition,
234
- k as endTourScrollSnapshot,
235
- M as getVisibleTargetRect,
236
- L as needsGuidanceTargetScroll,
237
- V as scrollGuidanceTargetIntoView,
238
- O as useAdvanceOnTargetClick
266
+ D as GUIDANCE_POPOVER_CARET_CLEARANCE,
267
+ L as GUIDANCE_POPOVER_GAP,
268
+ y as GUIDANCE_SPOTLIGHT_PADDING,
269
+ A as GUIDANCE_TARGET_SCROLL_PADDING,
270
+ G as GUIDANCE_VIEWPORT_PADDING,
271
+ j as beginTourScrollSnapshot,
272
+ V as buildHighlightRect,
273
+ Q as buildHighlightRectForTarget,
274
+ Z as computePopoverPosition,
275
+ z as endTourScrollSnapshot,
276
+ W as getVisibleTargetRect,
277
+ N as needsGuidanceTargetScroll,
278
+ J as scrollGuidanceTargetIntoView,
279
+ K as useAdvanceOnTargetClick
239
280
  };
@@ -0,0 +1,9 @@
1
+ import { GuidanceKeyBinding, GuidanceShortcutReference } from '../../../../lib/guidance';
2
+ import * as React from 'react';
3
+ export declare function GuidanceShortcutReferenceList({ references, }: {
4
+ references: GuidanceShortcutReference[];
5
+ }): React.ReactElement | null;
6
+ export declare function GuidanceStepKeybinding({ keybinding, className, }: {
7
+ keybinding: GuidanceKeyBinding;
8
+ className?: string;
9
+ }): React.ReactElement;
@@ -0,0 +1,36 @@
1
+ import { jsx as n, jsxs as a } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Kbd as i } from "../../../primitives/kbd/kbd.js";
4
+ function d({
5
+ references: e
6
+ }) {
7
+ return e.length ? /* @__PURE__ */ n("ul", { className: "mt-3 space-y-2 border-t border-stroke-hairline pt-3", children: e.map((t) => /* @__PURE__ */ a(
8
+ "li",
9
+ {
10
+ className: "flex items-center justify-between gap-3 text-sm leading-snug text-content-secondary",
11
+ children: [
12
+ /* @__PURE__ */ n("span", { className: "min-w-0 text-pretty", children: t.label }),
13
+ /* @__PURE__ */ n(i, { keybinding: t.keybinding, size: "sm", variant: "default" })
14
+ ]
15
+ },
16
+ t.label
17
+ )) }) : null;
18
+ }
19
+ function m({
20
+ keybinding: e,
21
+ className: t
22
+ }) {
23
+ return /* @__PURE__ */ n(
24
+ i,
25
+ {
26
+ keybinding: e,
27
+ size: "sm",
28
+ variant: "default",
29
+ className: t
30
+ }
31
+ );
32
+ }
33
+ export {
34
+ d as GuidanceShortcutReferenceList,
35
+ m as GuidanceStepKeybinding
36
+ };
@@ -6,6 +6,7 @@ interface GuidanceTourOverlayProps {
6
6
  onNext: () => void;
7
7
  onSkip: () => void;
8
8
  onDismiss: () => void;
9
+ onBack?: () => void;
9
10
  }
10
- export declare function GuidanceTourOverlay({ instruction, overlayComponent, onNext, onSkip, onDismiss, }: GuidanceTourOverlayProps): React.ReactElement | null;
11
+ export declare function GuidanceTourOverlay({ instruction, overlayComponent, onNext, onSkip, onDismiss, onBack, }: GuidanceTourOverlayProps): React.ReactElement | null;
11
12
  export {};