impact-nova 2.6.1 → 2.6.2
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/guidance/renderers/announcement-renderer.js +72 -69
- package/dist/components/flows/guidance/renderers/guidance-renderer-shared.d.ts +1 -1
- package/dist/components/flows/guidance/renderers/guidance-renderer-shared.js +118 -109
- package/dist/components/flows/guidance/renderers/guidance-tour-overlay.js +93 -85
- package/dist/impact-nova-tokens.scss +2 -2
- 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,33 +1,39 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsxs as m, jsx as o, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import * as f from "react";
|
|
3
3
|
import { createPortal as z } from "react-dom";
|
|
4
4
|
import { GuidanceStepPanel as A } from "./guidance-card-shared.js";
|
|
5
|
-
import { useGuidanceOverlayGeometry as
|
|
6
|
-
import { useAdvanceOnTargetClick as
|
|
7
|
-
const
|
|
5
|
+
import { useGuidanceOverlayGeometry as T } from "../hooks/useGuidanceOverlayGeometry.js";
|
|
6
|
+
import { useAdvanceOnTargetClick as G, buildHighlightRectForTarget as M, computePopoverPosition as P } from "./guidance-renderer-shared.js";
|
|
7
|
+
const H = 220, h = `motion-safe:transition-[top,left,width,height] motion-safe:duration-[${H}ms] motion-safe:ease-[cubic-bezier(0.22,1,0.36,1)]`;
|
|
8
8
|
function L({
|
|
9
9
|
highlightRect: e,
|
|
10
|
-
blocksPointerEvents:
|
|
10
|
+
blocksPointerEvents: i = !0
|
|
11
11
|
}) {
|
|
12
|
-
const a = typeof window < "u" ? window.innerWidth : 0,
|
|
13
|
-
|
|
12
|
+
const a = typeof window < "u" ? window.innerWidth : 0, l = typeof window < "u" ? window.innerHeight : 0, d = Math.max(0, e.y), u = Math.max(0, e.x), r = Math.min(
|
|
13
|
+
a,
|
|
14
|
+
e.x + e.width
|
|
15
|
+
), c = Math.min(
|
|
16
|
+
l,
|
|
17
|
+
e.y + e.height
|
|
18
|
+
), s = Math.max(0, c - d), n = i ? `pointer-events-auto absolute bg-[var(--guidance-backdrop-bg)] opacity-[var(--guidance-backdrop-opacity,0.4)] ${h}` : `pointer-events-none absolute bg-[var(--guidance-backdrop-bg)] opacity-[var(--guidance-backdrop-opacity,0.4)] ${h}`;
|
|
19
|
+
return /* @__PURE__ */ m($, { children: [
|
|
14
20
|
/* @__PURE__ */ o(
|
|
15
21
|
"div",
|
|
16
22
|
{
|
|
17
|
-
className:
|
|
18
|
-
style: { top: 0, left: 0, width: a, height:
|
|
23
|
+
className: n,
|
|
24
|
+
style: { top: 0, left: 0, width: a, height: d },
|
|
19
25
|
"aria-hidden": "true"
|
|
20
26
|
}
|
|
21
27
|
),
|
|
22
28
|
/* @__PURE__ */ o(
|
|
23
29
|
"div",
|
|
24
30
|
{
|
|
25
|
-
className:
|
|
31
|
+
className: n,
|
|
26
32
|
style: {
|
|
27
33
|
top: c,
|
|
28
34
|
left: 0,
|
|
29
35
|
width: a,
|
|
30
|
-
height: Math.max(0,
|
|
36
|
+
height: Math.max(0, l - c)
|
|
31
37
|
},
|
|
32
38
|
"aria-hidden": "true"
|
|
33
39
|
}
|
|
@@ -35,12 +41,12 @@ function L({
|
|
|
35
41
|
/* @__PURE__ */ o(
|
|
36
42
|
"div",
|
|
37
43
|
{
|
|
38
|
-
className:
|
|
44
|
+
className: n,
|
|
39
45
|
style: {
|
|
40
|
-
top:
|
|
46
|
+
top: d,
|
|
41
47
|
left: 0,
|
|
42
|
-
width:
|
|
43
|
-
height:
|
|
48
|
+
width: u,
|
|
49
|
+
height: s
|
|
44
50
|
},
|
|
45
51
|
"aria-hidden": "true"
|
|
46
52
|
}
|
|
@@ -48,31 +54,30 @@ function L({
|
|
|
48
54
|
/* @__PURE__ */ o(
|
|
49
55
|
"div",
|
|
50
56
|
{
|
|
51
|
-
className:
|
|
57
|
+
className: n,
|
|
52
58
|
style: {
|
|
53
|
-
top:
|
|
54
|
-
left:
|
|
55
|
-
width: Math.max(0, a -
|
|
56
|
-
height:
|
|
59
|
+
top: d,
|
|
60
|
+
left: r,
|
|
61
|
+
width: Math.max(0, a - r),
|
|
62
|
+
height: s
|
|
57
63
|
},
|
|
58
64
|
"aria-hidden": "true"
|
|
59
65
|
}
|
|
60
66
|
)
|
|
61
67
|
] });
|
|
62
68
|
}
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return Math.min(Math.max(r, y), m);
|
|
69
|
+
const w = 12, R = Math.ceil(
|
|
70
|
+
16 + w * Math.SQRT2 / 2
|
|
71
|
+
);
|
|
72
|
+
function _(e) {
|
|
73
|
+
const i = w / 2, a = e.placement === "left" || e.placement === "right", l = a ? e.highlightRect.y + e.highlightRect.height / 2 : e.highlightRect.x + e.highlightRect.width / 2, d = a ? e.popoverTop : e.popoverLeft, u = a ? e.popoverHeight : e.popoverWidth, r = l - d - i, c = R, s = u - R - w;
|
|
74
|
+
return s < c || r < c || r > s ? null : r;
|
|
70
75
|
}
|
|
71
76
|
function B({
|
|
72
77
|
placement: e,
|
|
73
|
-
offset:
|
|
78
|
+
offset: i
|
|
74
79
|
}) {
|
|
75
|
-
const a = e === "left" || e === "right" ? { top:
|
|
80
|
+
const a = e === "left" || e === "right" ? { top: i } : { left: i }, l = {
|
|
76
81
|
bottom: "left-0 top-0 -translate-y-1/2 border-l border-t",
|
|
77
82
|
top: "bottom-0 left-0 translate-y-1/2 border-b border-r",
|
|
78
83
|
right: "left-0 top-0 -translate-x-1/2 border-b border-l",
|
|
@@ -82,72 +87,75 @@ function B({
|
|
|
82
87
|
"span",
|
|
83
88
|
{
|
|
84
89
|
"aria-hidden": "true",
|
|
85
|
-
className: `pointer-events-none absolute z-0 size-3 rotate-45 border border-[var(--color-border-accent-muted)] bg-[var(--color-border-accent-muted)] ${
|
|
90
|
+
className: `pointer-events-none absolute z-0 size-3 rotate-45 border border-[var(--color-border-accent-muted)] bg-[var(--color-border-accent-muted)] ${l}`,
|
|
86
91
|
style: a
|
|
87
92
|
}
|
|
88
93
|
);
|
|
89
94
|
}
|
|
90
95
|
function j({
|
|
91
96
|
instruction: e,
|
|
92
|
-
overlayComponent:
|
|
97
|
+
overlayComponent: i,
|
|
93
98
|
onNext: a,
|
|
94
|
-
onSkip:
|
|
95
|
-
onDismiss:
|
|
96
|
-
onBack:
|
|
99
|
+
onSkip: l,
|
|
100
|
+
onDismiss: d,
|
|
101
|
+
onBack: u
|
|
97
102
|
}) {
|
|
98
|
-
const r = e.target?.element,
|
|
103
|
+
const r = e.target?.element, c = T(r, e.stepId), s = e.stepIndex + 1 >= e.totalSteps, n = G(e, a), y = n || e.advanceOn === "auto", k = f.useRef(null), x = f.useRef(null), [v, E] = f.useState({ width: 400, height: 240 }), S = f.useCallback(() => {
|
|
99
104
|
r?.click();
|
|
100
105
|
}, [r]);
|
|
101
|
-
if (
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
}, [e.stepId,
|
|
105
|
-
const
|
|
106
|
-
if (!
|
|
106
|
+
if (f.useLayoutEffect(() => {
|
|
107
|
+
const g = x.current;
|
|
108
|
+
g?.parentElement === document.body && document.body.appendChild(g);
|
|
109
|
+
}, [e.stepId, y]), f.useLayoutEffect(() => {
|
|
110
|
+
const g = k.current;
|
|
111
|
+
if (!g)
|
|
107
112
|
return;
|
|
108
|
-
const
|
|
109
|
-
const b =
|
|
113
|
+
const C = () => {
|
|
114
|
+
const b = g.getBoundingClientRect();
|
|
110
115
|
b.width > 0 && b.height > 0 && E({
|
|
111
116
|
width: b.width,
|
|
112
117
|
height: b.height
|
|
113
118
|
});
|
|
114
119
|
};
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
return
|
|
118
|
-
|
|
120
|
+
C();
|
|
121
|
+
const N = new ResizeObserver(C);
|
|
122
|
+
return N.observe(g), () => {
|
|
123
|
+
N.disconnect();
|
|
119
124
|
};
|
|
120
|
-
}, [e.stepId, e.content.title, e.content.body]), !
|
|
125
|
+
}, [e.stepId, e.content.title, e.content.body]), !c || !r || typeof document > "u")
|
|
126
|
+
return null;
|
|
127
|
+
const t = M(r);
|
|
128
|
+
if (!t)
|
|
121
129
|
return null;
|
|
122
|
-
const
|
|
130
|
+
const p = P({
|
|
123
131
|
targetRect: t,
|
|
124
132
|
popoverWidth: v.width,
|
|
125
133
|
popoverHeight: v.height,
|
|
126
134
|
preferredPlacement: e.placement
|
|
127
|
-
}),
|
|
128
|
-
placement:
|
|
129
|
-
popoverTop:
|
|
130
|
-
popoverLeft:
|
|
135
|
+
}), O = _({
|
|
136
|
+
placement: p.placement,
|
|
137
|
+
popoverTop: p.top,
|
|
138
|
+
popoverLeft: p.left,
|
|
131
139
|
highlightRect: t,
|
|
132
140
|
popoverWidth: v.width,
|
|
133
141
|
popoverHeight: v.height
|
|
134
|
-
}),
|
|
142
|
+
}), I = `guidance-mask-${e.stepId}`;
|
|
135
143
|
return z(
|
|
136
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ m(
|
|
137
145
|
"div",
|
|
138
146
|
{
|
|
139
|
-
ref:
|
|
140
|
-
"data-component":
|
|
147
|
+
ref: x,
|
|
148
|
+
"data-component": i,
|
|
141
149
|
className: "fixed inset-0 z-[60] pointer-events-none",
|
|
142
150
|
role: "presentation",
|
|
143
151
|
children: [
|
|
144
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ m(
|
|
145
153
|
"svg",
|
|
146
154
|
{
|
|
147
|
-
className: `pointer-events-none absolute inset-0 size-full ${
|
|
155
|
+
className: `pointer-events-none absolute inset-0 size-full ${h}`,
|
|
148
156
|
"aria-hidden": "true",
|
|
149
157
|
children: [
|
|
150
|
-
/* @__PURE__ */ o("defs", { children: /* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ o("defs", { children: /* @__PURE__ */ m("mask", { id: I, children: [
|
|
151
159
|
/* @__PURE__ */ o("rect", { width: "100%", height: "100%", fill: "white" }),
|
|
152
160
|
/* @__PURE__ */ o(
|
|
153
161
|
"rect",
|
|
@@ -158,7 +166,7 @@ function j({
|
|
|
158
166
|
height: t.height,
|
|
159
167
|
rx: "8",
|
|
160
168
|
fill: "black",
|
|
161
|
-
className:
|
|
169
|
+
className: h
|
|
162
170
|
}
|
|
163
171
|
)
|
|
164
172
|
] }) }),
|
|
@@ -168,8 +176,8 @@ function j({
|
|
|
168
176
|
width: "100%",
|
|
169
177
|
height: "100%",
|
|
170
178
|
fill: "var(--guidance-backdrop-bg)",
|
|
171
|
-
fillOpacity: "var(--guidance-backdrop-opacity, 0.
|
|
172
|
-
mask: `url(#${
|
|
179
|
+
fillOpacity: "var(--guidance-backdrop-opacity, 0.4)",
|
|
180
|
+
mask: `url(#${I})`
|
|
173
181
|
}
|
|
174
182
|
)
|
|
175
183
|
]
|
|
@@ -179,10 +187,10 @@ function j({
|
|
|
179
187
|
L,
|
|
180
188
|
{
|
|
181
189
|
highlightRect: t,
|
|
182
|
-
blocksPointerEvents: !
|
|
190
|
+
blocksPointerEvents: !y
|
|
183
191
|
}
|
|
184
192
|
),
|
|
185
|
-
|
|
193
|
+
y ? null : /* @__PURE__ */ o(
|
|
186
194
|
"div",
|
|
187
195
|
{
|
|
188
196
|
className: "pointer-events-auto absolute z-10",
|
|
@@ -195,11 +203,11 @@ function j({
|
|
|
195
203
|
"aria-hidden": "true"
|
|
196
204
|
}
|
|
197
205
|
),
|
|
198
|
-
|
|
206
|
+
n ? /* @__PURE__ */ o(
|
|
199
207
|
"button",
|
|
200
208
|
{
|
|
201
209
|
type: "button",
|
|
202
|
-
className: `absolute z-10 cursor-pointer border-0 bg-transparent p-0 pointer-events-auto ${
|
|
210
|
+
className: `absolute z-10 cursor-pointer border-0 bg-transparent p-0 pointer-events-auto ${h}`,
|
|
203
211
|
style: {
|
|
204
212
|
top: t.y,
|
|
205
213
|
left: t.x,
|
|
@@ -207,13 +215,13 @@ function j({
|
|
|
207
215
|
height: t.height
|
|
208
216
|
},
|
|
209
217
|
"aria-label": `Click ${e.content.title}`,
|
|
210
|
-
onClick:
|
|
218
|
+
onClick: S
|
|
211
219
|
}
|
|
212
220
|
) : null,
|
|
213
221
|
/* @__PURE__ */ o(
|
|
214
222
|
"div",
|
|
215
223
|
{
|
|
216
|
-
className: `pointer-events-none absolute rounded-lg ring-2 ring-[var(--guidance-highlight-ring,var(--color-primary))] ${
|
|
224
|
+
className: `pointer-events-none absolute rounded-lg ring-2 ring-[var(--guidance-highlight-ring,var(--color-primary))] ${h}`,
|
|
217
225
|
style: {
|
|
218
226
|
top: t.y,
|
|
219
227
|
left: t.x,
|
|
@@ -222,26 +230,26 @@ function j({
|
|
|
222
230
|
}
|
|
223
231
|
}
|
|
224
232
|
),
|
|
225
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ m(
|
|
226
234
|
"div",
|
|
227
235
|
{
|
|
228
|
-
ref:
|
|
229
|
-
className: `pointer-events-auto absolute z-20 w-[min(400px,calc(100vw-2rem))] ${
|
|
236
|
+
ref: k,
|
|
237
|
+
className: `pointer-events-auto absolute z-20 w-[min(400px,calc(100vw-2rem))] ${h}`,
|
|
230
238
|
style: {
|
|
231
|
-
top:
|
|
232
|
-
left:
|
|
239
|
+
top: p.top,
|
|
240
|
+
left: p.left
|
|
233
241
|
},
|
|
234
242
|
role: "dialog",
|
|
235
243
|
"aria-labelledby": `guidance-tour-title-${e.stepId}`,
|
|
236
244
|
"aria-describedby": `guidance-tour-body-${e.stepId}`,
|
|
237
245
|
children: [
|
|
238
|
-
/* @__PURE__ */ o(
|
|
246
|
+
O !== null ? /* @__PURE__ */ o(
|
|
239
247
|
B,
|
|
240
248
|
{
|
|
241
|
-
placement:
|
|
242
|
-
offset:
|
|
249
|
+
placement: p.placement,
|
|
250
|
+
offset: O
|
|
243
251
|
}
|
|
244
|
-
),
|
|
252
|
+
) : null,
|
|
245
253
|
/* @__PURE__ */ o("div", { className: "relative z-[1] overflow-hidden rounded-2xl border border-stroke bg-canvas shadow-elevation-floating", children: /* @__PURE__ */ o(
|
|
246
254
|
A,
|
|
247
255
|
{
|
|
@@ -251,15 +259,15 @@ function j({
|
|
|
251
259
|
stepIndex: e.stepIndex,
|
|
252
260
|
totalSteps: e.totalSteps,
|
|
253
261
|
skippable: e.skippable,
|
|
254
|
-
primaryActionLabel:
|
|
255
|
-
onSkip:
|
|
256
|
-
onDismiss:
|
|
257
|
-
onBack:
|
|
262
|
+
primaryActionLabel: s ? "Done" : "Next",
|
|
263
|
+
onSkip: l,
|
|
264
|
+
onDismiss: d,
|
|
265
|
+
onBack: u,
|
|
258
266
|
canGoBack: e.canGoBack,
|
|
259
267
|
advanceOn: e.advanceOn,
|
|
260
268
|
onPrimaryAction: a,
|
|
261
|
-
showPrimaryAction: !
|
|
262
|
-
footerHint:
|
|
269
|
+
showPrimaryAction: !n && e.advanceOn !== "auto",
|
|
270
|
+
footerHint: n ? e.content.footer ?? "Click the highlighted button to continue." : e.advanceOn === "auto" ? e.content.footer ?? "Complete the action above to continue." : null,
|
|
263
271
|
footerKeybinding: e.content.keybinding,
|
|
264
272
|
shortcutReferences: e.content.shortcutReferences,
|
|
265
273
|
titleId: `guidance-tour-title-${e.stepId}`,
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
/* —— Guidance (tours, coach marks, announcements) —— */
|
|
177
177
|
--guidance-announcement-hero-bg: #eceefd;
|
|
178
178
|
--guidance-backdrop-bg: #000000;
|
|
179
|
-
--guidance-backdrop-opacity: 0.
|
|
179
|
+
--guidance-backdrop-opacity: 0.4;
|
|
180
180
|
--guidance-coach-mark-bg: #ffffff;
|
|
181
181
|
--guidance-coach-mark-border: #e8eaed;
|
|
182
182
|
--guidance-highlight-ring: #5267f4;
|
|
@@ -412,7 +412,7 @@
|
|
|
412
412
|
/* —— Guidance (tours, coach marks, announcements) —— */
|
|
413
413
|
--guidance-announcement-hero-bg: #eceefd;
|
|
414
414
|
--guidance-backdrop-bg: #000000;
|
|
415
|
-
--guidance-backdrop-opacity: 0.
|
|
415
|
+
--guidance-backdrop-opacity: 0.4;
|
|
416
416
|
--guidance-coach-mark-bg: #ffffff;
|
|
417
417
|
--guidance-coach-mark-border: #e8eaed;
|
|
418
418
|
--guidance-highlight-ring: #5267f4;
|