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,18 +1,18 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
1
|
+
import { jsx as a, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { Badge as m } from "../../../data-display/badge/badge.js";
|
|
4
4
|
import { Dialog as i, DialogContent as x } from "../../../feedback/dialog/dialog.js";
|
|
5
|
-
import { GuidanceStepProgressBar as b, GuidanceTourActionFooter as g, GuidanceTourProgressAndNav as h } from "./guidance-card-shared.js";
|
|
6
|
-
import { GuidanceAnnouncementSurface as
|
|
7
|
-
function
|
|
5
|
+
import { GuidanceStepProgressBar as b, GuidanceTourActionFooter as g, GuidanceTourProgressAndNav as h, GuidanceCloseButton as v } from "./guidance-card-shared.js";
|
|
6
|
+
import { GuidanceAnnouncementSurface as f } from "./guidance-announcement-surface.js";
|
|
7
|
+
function N({
|
|
8
8
|
instruction: e,
|
|
9
|
-
onNext:
|
|
10
|
-
onSkip:
|
|
11
|
-
onDismiss:
|
|
12
|
-
onBack:
|
|
9
|
+
onNext: c,
|
|
10
|
+
onSkip: p,
|
|
11
|
+
onDismiss: d,
|
|
12
|
+
onBack: l
|
|
13
13
|
}) {
|
|
14
|
-
const s = e.stepIndex + 1 >= e.totalSteps,
|
|
15
|
-
return /* @__PURE__ */ a(i, { open: !0, children: /* @__PURE__ */
|
|
14
|
+
const s = e.stepIndex + 1 >= e.totalSteps, r = e.content.badge?.trim(), o = e.interactionFooter === "keybinding";
|
|
15
|
+
return /* @__PURE__ */ a(i, { open: !0, children: /* @__PURE__ */ t(
|
|
16
16
|
x,
|
|
17
17
|
{
|
|
18
18
|
"data-component": "guidance-announcement",
|
|
@@ -21,74 +21,77 @@ function k({
|
|
|
21
21
|
className: "max-w-[400px] gap-0 overflow-hidden border-0 bg-canvas p-0 sm:rounded-2xl sm:shadow-elevation-floating",
|
|
22
22
|
"aria-labelledby": `guidance-announcement-title-${e.stepId}`,
|
|
23
23
|
"aria-describedby": e.content.body ? `guidance-announcement-body-${e.stepId}` : void 0,
|
|
24
|
-
onPointerDownOutside: (
|
|
25
|
-
|
|
24
|
+
onPointerDownOutside: (n) => {
|
|
25
|
+
n.preventDefault();
|
|
26
26
|
},
|
|
27
|
-
onInteractOutside: (
|
|
28
|
-
|
|
27
|
+
onInteractOutside: (n) => {
|
|
28
|
+
n.preventDefault();
|
|
29
29
|
},
|
|
30
|
-
onEscapeKeyDown: (
|
|
31
|
-
|
|
30
|
+
onEscapeKeyDown: (n) => {
|
|
31
|
+
n.preventDefault();
|
|
32
32
|
},
|
|
33
|
-
children:
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/* @__PURE__ */ a(
|
|
56
|
-
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ t("div", { className: "relative overflow-hidden rounded-2xl", children: [
|
|
35
|
+
/* @__PURE__ */ a(f, {}),
|
|
36
|
+
/* @__PURE__ */ t("div", { className: "relative z-10 flex flex-col items-center px-8 pb-0 pt-10 text-center", children: [
|
|
37
|
+
r ? /* @__PURE__ */ a(m, { variant: "subtle", color: "primary", shape: "circle", size: "sm", children: r }) : null,
|
|
38
|
+
/* @__PURE__ */ a(
|
|
39
|
+
"h2",
|
|
40
|
+
{
|
|
41
|
+
id: `guidance-announcement-title-${e.stepId}`,
|
|
42
|
+
className: "mt-3 text-2xl font-bold leading-8 text-content",
|
|
43
|
+
children: e.content.title
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
e.content.body ? /* @__PURE__ */ a(
|
|
47
|
+
"p",
|
|
48
|
+
{
|
|
49
|
+
id: `guidance-announcement-body-${e.stepId}`,
|
|
50
|
+
className: "mt-2 max-w-[22rem] text-sm leading-snug text-content-secondary",
|
|
51
|
+
children: e.content.body
|
|
52
|
+
}
|
|
53
|
+
) : null
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ a("div", { className: "relative z-10 px-8 pb-8 pt-6", children: o ? /* @__PURE__ */ t("div", { className: "flex w-full flex-col gap-3", children: [
|
|
56
|
+
/* @__PURE__ */ a(
|
|
57
|
+
b,
|
|
58
|
+
{
|
|
59
|
+
activeStepIndex: e.stepIndex,
|
|
60
|
+
totalSteps: e.totalSteps
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ a(
|
|
64
|
+
g,
|
|
65
|
+
{
|
|
66
|
+
hint: e.content.footer ?? "Press the shortcut to continue.",
|
|
67
|
+
keybinding: e.content.keybinding,
|
|
68
|
+
activeStepIndex: e.stepIndex,
|
|
69
|
+
showBack: e.canGoBack,
|
|
70
|
+
onBack: l
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] }) : /* @__PURE__ */ a(
|
|
74
|
+
h,
|
|
57
75
|
{
|
|
58
76
|
activeStepIndex: e.stepIndex,
|
|
59
|
-
totalSteps: e.totalSteps
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
/* @__PURE__ */ a(
|
|
63
|
-
g,
|
|
64
|
-
{
|
|
65
|
-
hint: e.content.footer ?? "Press the shortcut to continue.",
|
|
66
|
-
keybinding: e.content.keybinding,
|
|
67
|
-
activeStepIndex: e.stepIndex,
|
|
77
|
+
totalSteps: e.totalSteps,
|
|
78
|
+
skippable: e.skippable,
|
|
79
|
+
showSkip: !1,
|
|
68
80
|
showBack: e.canGoBack,
|
|
69
|
-
onBack:
|
|
81
|
+
onBack: l,
|
|
82
|
+
primaryActionLabel: s ? "Done" : "Next",
|
|
83
|
+
onSkip: p,
|
|
84
|
+
onPrimaryAction: c,
|
|
85
|
+
onEndTour: d,
|
|
86
|
+
showPrimaryAction: !o && e.advanceOn !== "auto"
|
|
70
87
|
}
|
|
71
|
-
)
|
|
72
|
-
] })
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
activeStepIndex: e.stepIndex,
|
|
76
|
-
totalSteps: e.totalSteps,
|
|
77
|
-
skippable: e.skippable,
|
|
78
|
-
showSkip: !1,
|
|
79
|
-
showBack: e.canGoBack,
|
|
80
|
-
onBack: o,
|
|
81
|
-
primaryActionLabel: s ? "Done" : "Next",
|
|
82
|
-
onSkip: c,
|
|
83
|
-
onPrimaryAction: r,
|
|
84
|
-
onEndTour: p,
|
|
85
|
-
showPrimaryAction: !l && e.advanceOn !== "auto"
|
|
86
|
-
}
|
|
87
|
-
) })
|
|
88
|
-
] })
|
|
88
|
+
) })
|
|
89
|
+
] }),
|
|
90
|
+
o ? /* @__PURE__ */ a(v, { onClose: d }) : null
|
|
91
|
+
]
|
|
89
92
|
}
|
|
90
93
|
) });
|
|
91
94
|
}
|
|
92
95
|
export {
|
|
93
|
-
|
|
96
|
+
N as AnnouncementRenderer
|
|
94
97
|
};
|
|
@@ -39,7 +39,7 @@ export declare function useStableTargetRect(targetElement: HTMLElement | null |
|
|
|
39
39
|
export declare function useAdvanceOnTargetClick(instruction: RenderInstruction, onNext: () => void): boolean;
|
|
40
40
|
export declare function useElevateGuidanceTarget(targetElement: HTMLElement | null | undefined, shouldElevate?: boolean): void;
|
|
41
41
|
export declare function buildHighlightRect(targetRect: HighlightRect, padding?: number, clipBounds?: HighlightRect): HighlightRect;
|
|
42
|
-
export declare function buildHighlightRectForTarget(targetElement: HTMLElement, padding?: number): HighlightRect;
|
|
42
|
+
export declare function buildHighlightRectForTarget(targetElement: HTMLElement, padding?: number): HighlightRect | null;
|
|
43
43
|
export declare function buildHighlightStyle(targetRect: HighlightRect, padding?: number): React.CSSProperties;
|
|
44
44
|
export declare function computePopoverPosition(options: {
|
|
45
45
|
targetRect: HighlightRect;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
const
|
|
3
|
-
function
|
|
1
|
+
import * as L from "react";
|
|
2
|
+
const C = 16, R = 12, D = 12, G = 16, A = 32;
|
|
3
|
+
function W(n) {
|
|
4
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
|
}
|
|
@@ -8,25 +8,25 @@ function k(n) {
|
|
|
8
8
|
const t = [];
|
|
9
9
|
let e = n.parentElement;
|
|
10
10
|
for (; e; )
|
|
11
|
-
|
|
11
|
+
W(e) && t.push(e), e = e.parentElement;
|
|
12
12
|
return t;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const e = Math.max(n.x, t.x), o = Math.max(n.y, t.y),
|
|
14
|
+
function b(n, t) {
|
|
15
|
+
const e = Math.max(n.x, t.x), o = Math.max(n.y, t.y), l = Math.min(
|
|
16
16
|
n.x + n.width,
|
|
17
17
|
t.x + t.width
|
|
18
18
|
), i = Math.min(
|
|
19
19
|
n.y + n.height,
|
|
20
20
|
t.y + t.height
|
|
21
21
|
);
|
|
22
|
-
return
|
|
22
|
+
return l <= e || i <= o ? null : {
|
|
23
23
|
x: e,
|
|
24
24
|
y: o,
|
|
25
|
-
width:
|
|
25
|
+
width: l - e,
|
|
26
26
|
height: i - o
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function y(n) {
|
|
30
30
|
return {
|
|
31
31
|
x: n.left,
|
|
32
32
|
y: n.top,
|
|
@@ -34,14 +34,14 @@ function C(n) {
|
|
|
34
34
|
height: n.height
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
let t =
|
|
37
|
+
function P(n) {
|
|
38
|
+
let t = y(
|
|
39
39
|
n.getBoundingClientRect()
|
|
40
40
|
);
|
|
41
|
-
for (const
|
|
42
|
-
const i =
|
|
41
|
+
for (const l of k(n)) {
|
|
42
|
+
const i = b(
|
|
43
43
|
t,
|
|
44
|
-
|
|
44
|
+
y(l.getBoundingClientRect())
|
|
45
45
|
);
|
|
46
46
|
if (!i)
|
|
47
47
|
break;
|
|
@@ -53,7 +53,7 @@ function W(n) {
|
|
|
53
53
|
width: window.innerWidth,
|
|
54
54
|
height: window.innerHeight
|
|
55
55
|
};
|
|
56
|
-
return
|
|
56
|
+
return b(
|
|
57
57
|
t,
|
|
58
58
|
e
|
|
59
59
|
) ?? t;
|
|
@@ -67,47 +67,47 @@ function E(n) {
|
|
|
67
67
|
}
|
|
68
68
|
return t;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function V(n) {
|
|
71
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
|
|
77
|
+
function _(n) {
|
|
78
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
|
|
82
|
-
function
|
|
83
|
-
|
|
81
|
+
let u = null;
|
|
82
|
+
function z(n) {
|
|
83
|
+
u === null && (u = V(n));
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
|
|
85
|
+
function J() {
|
|
86
|
+
u !== null && (_(u), u = null);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function B(n, t = A) {
|
|
89
89
|
const e = n.getBoundingClientRect(), o = window.innerHeight;
|
|
90
|
-
return e.top < t || e.bottom > o - t;
|
|
90
|
+
return e.top <= t && e.bottom >= o - t && e.height >= o - t * 2 ? !1 : e.top < t || e.bottom > o - t;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
const { targetElement: t, scrollContainer: e, viewportPadding: o } = n,
|
|
94
|
-
if (i.height >=
|
|
95
|
-
const
|
|
96
|
-
Math.abs(
|
|
92
|
+
function N(n) {
|
|
93
|
+
const { targetElement: t, scrollContainer: e, viewportPadding: o } = n, l = e.getBoundingClientRect(), i = t.getBoundingClientRect(), p = e.clientHeight - o * 2;
|
|
94
|
+
if (i.height >= p) {
|
|
95
|
+
const a = i.top - l.top - o;
|
|
96
|
+
Math.abs(a) > 1 && (e.scrollTop += a);
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
if (i.top <
|
|
100
|
-
e.scrollTop -=
|
|
99
|
+
if (i.top < l.top + o) {
|
|
100
|
+
e.scrollTop -= l.top + o - i.top;
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
i.bottom >
|
|
103
|
+
i.bottom > l.bottom - o && (e.scrollTop += i.bottom - (l.bottom - o));
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
if (!
|
|
105
|
+
function K(n, t = A) {
|
|
106
|
+
if (!B(n, t))
|
|
107
107
|
return;
|
|
108
108
|
const o = E(n)[0];
|
|
109
109
|
if (o) {
|
|
110
|
-
|
|
110
|
+
N({
|
|
111
111
|
targetElement: n,
|
|
112
112
|
scrollContainer: o,
|
|
113
113
|
viewportPadding: t
|
|
@@ -120,23 +120,23 @@ function J(n, t = A) {
|
|
|
120
120
|
inline: "nearest"
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Q(n, t) {
|
|
124
124
|
const e = n.advanceOn === "click-target";
|
|
125
|
-
return
|
|
125
|
+
return L.useEffect(() => {
|
|
126
126
|
if (!e)
|
|
127
127
|
return;
|
|
128
128
|
const o = n.target?.element;
|
|
129
129
|
if (!o)
|
|
130
130
|
return;
|
|
131
|
-
const
|
|
131
|
+
const l = () => {
|
|
132
132
|
requestAnimationFrame(() => {
|
|
133
133
|
requestAnimationFrame(() => {
|
|
134
134
|
t();
|
|
135
135
|
});
|
|
136
136
|
});
|
|
137
137
|
};
|
|
138
|
-
return o.addEventListener("click",
|
|
139
|
-
o.removeEventListener("click",
|
|
138
|
+
return o.addEventListener("click", l, { once: !0 }), () => {
|
|
139
|
+
o.removeEventListener("click", l);
|
|
140
140
|
};
|
|
141
141
|
}, [
|
|
142
142
|
e,
|
|
@@ -145,7 +145,7 @@ function K(n, t) {
|
|
|
145
145
|
t
|
|
146
146
|
]), e;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function O(n, t = C, e) {
|
|
149
149
|
return {
|
|
150
150
|
x: n.x - t,
|
|
151
151
|
y: n.y - t,
|
|
@@ -153,128 +153,137 @@ function V(n, t = y, e) {
|
|
|
153
153
|
height: n.height + t * 2
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
function Y(n) {
|
|
157
|
+
if (typeof window > "u")
|
|
158
|
+
return n;
|
|
159
|
+
const t = {
|
|
160
|
+
x: 0,
|
|
161
|
+
y: 0,
|
|
162
|
+
width: window.innerWidth,
|
|
163
|
+
height: window.innerHeight
|
|
164
|
+
};
|
|
165
|
+
return b(n, t);
|
|
166
|
+
}
|
|
167
|
+
function Z(n, t = C) {
|
|
168
|
+
const e = P(n);
|
|
169
|
+
return Y(
|
|
170
|
+
O(e, t)
|
|
171
|
+
);
|
|
159
172
|
}
|
|
160
|
-
function
|
|
173
|
+
function F(n, t, e = 2) {
|
|
161
174
|
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
175
|
}
|
|
163
|
-
function
|
|
176
|
+
function $(n) {
|
|
164
177
|
const {
|
|
165
178
|
targetRect: t,
|
|
166
179
|
popoverWidth: e,
|
|
167
180
|
popoverHeight: o,
|
|
168
|
-
gap:
|
|
181
|
+
gap: l = R,
|
|
169
182
|
viewportPadding: i = G,
|
|
170
|
-
preferredPlacement:
|
|
171
|
-
} = n,
|
|
172
|
-
x:
|
|
173
|
-
y:
|
|
183
|
+
preferredPlacement: p = "auto"
|
|
184
|
+
} = n, r = l + D, a = t.x + t.width, v = t.y + t.height, g = t.x, d = window.innerWidth - a, m = t.y, w = window.innerHeight - v, S = (c) => ({
|
|
185
|
+
x: c.left,
|
|
186
|
+
y: c.top,
|
|
174
187
|
width: e,
|
|
175
188
|
height: o
|
|
176
|
-
}),
|
|
177
|
-
for (const
|
|
178
|
-
const
|
|
179
|
-
if (!
|
|
180
|
-
return
|
|
189
|
+
}), f = (c) => {
|
|
190
|
+
for (const h of c) {
|
|
191
|
+
const s = x(h);
|
|
192
|
+
if (!F(S(s), t))
|
|
193
|
+
return s;
|
|
181
194
|
}
|
|
182
|
-
return
|
|
183
|
-
},
|
|
184
|
-
let
|
|
185
|
-
switch (
|
|
195
|
+
return x(c[0]);
|
|
196
|
+
}, x = (c) => {
|
|
197
|
+
let h, s;
|
|
198
|
+
switch (c) {
|
|
186
199
|
case "left":
|
|
187
|
-
|
|
200
|
+
s = Math.max(
|
|
188
201
|
i,
|
|
189
|
-
t.x - e -
|
|
190
|
-
),
|
|
202
|
+
t.x - e - r
|
|
203
|
+
), h = t.y + t.height / 2 - o / 2, h = Math.max(
|
|
191
204
|
i,
|
|
192
|
-
Math.min(
|
|
193
|
-
t.y,
|
|
194
|
-
window.innerHeight - o - i
|
|
195
|
-
)
|
|
205
|
+
Math.min(h, window.innerHeight - o - i)
|
|
196
206
|
);
|
|
197
207
|
break;
|
|
198
208
|
case "right":
|
|
199
|
-
|
|
200
|
-
|
|
209
|
+
s = Math.min(
|
|
210
|
+
a + r,
|
|
201
211
|
window.innerWidth - e - i
|
|
202
|
-
),
|
|
212
|
+
), h = t.y + t.height / 2 - o / 2, h = Math.max(
|
|
203
213
|
i,
|
|
204
|
-
Math.min(
|
|
205
|
-
t.y,
|
|
206
|
-
window.innerHeight - o - i
|
|
207
|
-
)
|
|
214
|
+
Math.min(h, window.innerHeight - o - i)
|
|
208
215
|
);
|
|
209
216
|
break;
|
|
210
217
|
case "top":
|
|
211
|
-
|
|
218
|
+
h = Math.max(i, t.y - o - r), s = t.x + t.width / 2 - e / 2, s = Math.max(
|
|
212
219
|
i,
|
|
213
|
-
Math.min(
|
|
220
|
+
Math.min(s, window.innerWidth - e - i)
|
|
214
221
|
);
|
|
215
222
|
break;
|
|
216
223
|
default:
|
|
217
|
-
|
|
224
|
+
h = Math.min(
|
|
218
225
|
v + r,
|
|
219
226
|
window.innerHeight - o - i
|
|
220
|
-
),
|
|
227
|
+
), s = t.x + t.width / 2 - e / 2, s = Math.max(
|
|
221
228
|
i,
|
|
222
|
-
Math.min(
|
|
229
|
+
Math.min(s, window.innerWidth - e - i)
|
|
223
230
|
);
|
|
224
231
|
break;
|
|
225
232
|
}
|
|
226
|
-
return { top:
|
|
233
|
+
return { top: h, left: s, placement: c };
|
|
227
234
|
};
|
|
228
|
-
if (
|
|
229
|
-
left: g >= e +
|
|
230
|
-
right:
|
|
235
|
+
if (p !== "auto" && {
|
|
236
|
+
left: g >= e + r,
|
|
237
|
+
right: d >= e + r,
|
|
231
238
|
top: m >= o + r,
|
|
232
239
|
bottom: w >= o + r
|
|
233
|
-
}[
|
|
234
|
-
return
|
|
240
|
+
}[p])
|
|
241
|
+
return f([p, "left", "right", "top", "bottom"]);
|
|
235
242
|
const H = t.width <= 320, M = e >= t.width * 1.15;
|
|
236
243
|
if (H && M) {
|
|
237
|
-
const
|
|
238
|
-
if (g >= e +
|
|
239
|
-
return
|
|
244
|
+
const c = g >= d ? ["left", "right"] : ["right", "left"];
|
|
245
|
+
if (g >= e + r || d >= e + r)
|
|
246
|
+
return f([...c, "top", "bottom"]);
|
|
240
247
|
}
|
|
241
|
-
if (t.width <= 280 && t.x >= window.innerWidth * 0.35 && g >= e +
|
|
242
|
-
return
|
|
243
|
-
if (t.width >= 480 &&
|
|
248
|
+
if (t.width <= 280 && t.x >= window.innerWidth * 0.35 && g >= e + r)
|
|
249
|
+
return f(["left", "right", "top", "bottom"]);
|
|
250
|
+
if (t.width >= 480 && a >= window.innerWidth - i - 80 && g >= e + r) {
|
|
251
|
+
const c = t.y + t.height / 2 - o / 2;
|
|
244
252
|
return {
|
|
245
253
|
placement: "left",
|
|
246
|
-
left: Math.max(i, t.x - e -
|
|
254
|
+
left: Math.max(i, t.x - e - r),
|
|
247
255
|
top: Math.max(
|
|
248
256
|
i,
|
|
249
257
|
Math.min(
|
|
250
|
-
|
|
258
|
+
c,
|
|
251
259
|
window.innerHeight - o - i
|
|
252
260
|
)
|
|
253
261
|
)
|
|
254
262
|
};
|
|
263
|
+
}
|
|
255
264
|
if (t.height > t.width * 2.5) {
|
|
256
|
-
if (
|
|
257
|
-
return
|
|
258
|
-
if (g >= e +
|
|
259
|
-
return
|
|
265
|
+
if (d >= e + r)
|
|
266
|
+
return f(["right", "left", "top", "bottom"]);
|
|
267
|
+
if (g >= e + r)
|
|
268
|
+
return f(["left", "right", "top", "bottom"]);
|
|
260
269
|
}
|
|
261
270
|
const I = t.y + t.height / 2 > window.innerHeight * 0.55;
|
|
262
271
|
let T;
|
|
263
|
-
return I && m >= o + r && w < o + r * 2 ? T = "top" : T = w >= o + r || w >= m ? "bottom" : "top",
|
|
272
|
+
return I && m >= o + r && w < o + r * 2 ? T = "top" : T = w >= o + r || w >= m ? "bottom" : "top", f([T, "left", "right", "top", "bottom"]);
|
|
264
273
|
}
|
|
265
274
|
export {
|
|
266
275
|
D as GUIDANCE_POPOVER_CARET_CLEARANCE,
|
|
267
|
-
|
|
268
|
-
|
|
276
|
+
R as GUIDANCE_POPOVER_GAP,
|
|
277
|
+
C as GUIDANCE_SPOTLIGHT_PADDING,
|
|
269
278
|
A as GUIDANCE_TARGET_SCROLL_PADDING,
|
|
270
279
|
G as GUIDANCE_VIEWPORT_PADDING,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
+
z as beginTourScrollSnapshot,
|
|
281
|
+
O as buildHighlightRect,
|
|
282
|
+
Z as buildHighlightRectForTarget,
|
|
283
|
+
$ as computePopoverPosition,
|
|
284
|
+
J as endTourScrollSnapshot,
|
|
285
|
+
P as getVisibleTargetRect,
|
|
286
|
+
B as needsGuidanceTargetScroll,
|
|
287
|
+
K as scrollGuidanceTargetIntoView,
|
|
288
|
+
Q as useAdvanceOnTargetClick
|
|
280
289
|
};
|