impact-nova 2.2.7 → 2.2.9

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 (121) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid-header-dom.js +6 -8
  2. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +1 -1
  3. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +25 -13
  4. package/dist/components/data/ag-grid-react/headers/components/section-renderers.js +19 -18
  5. package/dist/components/data/ag-grid-react/headers/custom-header.js +1 -1
  6. package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.js +7 -7
  7. package/dist/components/data/ag-grid-react/info-system-story-columns.d.ts +38 -1
  8. package/dist/components/data/ag-grid-react/strip-column-min-width-constraints.d.ts +3 -0
  9. package/dist/components/data/data-table/data-table.d.ts +1 -1
  10. package/dist/components/data/data-table/data-table.js +41 -39
  11. package/dist/components/data/data-table/data-table.types.d.ts +1 -1
  12. package/dist/components/flows/filter-panel/filter-panel.js +101 -94
  13. package/dist/components/flows/filter-strip/filter-tag-list.js +96 -88
  14. package/dist/components/flows/guidance/adapters/ag-grid-adapter.d.ts +13 -0
  15. package/dist/components/flows/guidance/adapters/ag-grid-adapter.js +30 -0
  16. package/dist/components/flows/guidance/adapters/ag-grid.d.ts +2 -0
  17. package/dist/components/flows/guidance/adapters/ag-grid.js +6 -0
  18. package/dist/components/flows/guidance/adapters/dialog.d.ts +1 -0
  19. package/dist/components/flows/guidance/adapters/dialog.js +5 -0
  20. package/dist/components/flows/guidance/adapters/overlay-adapter.d.ts +5 -0
  21. package/dist/components/flows/guidance/adapters/overlay-adapter.js +21 -0
  22. package/dist/components/flows/guidance/engine.d.ts +1 -0
  23. package/dist/components/flows/guidance/engine.js +36 -0
  24. package/dist/components/flows/guidance/guidance-context.d.ts +29 -0
  25. package/dist/components/flows/guidance/guidance-context.js +35 -0
  26. package/dist/components/flows/guidance/guidance-error-boundary.d.ts +16 -0
  27. package/dist/components/flows/guidance/guidance-error-boundary.js +49 -0
  28. package/dist/components/flows/guidance/guidance-layer.d.ts +2 -0
  29. package/dist/components/flows/guidance/guidance-layer.js +71 -0
  30. package/dist/components/flows/guidance/guidance-provider.d.ts +3 -0
  31. package/dist/components/flows/guidance/guidance-provider.js +58 -0
  32. package/dist/components/flows/guidance/guidance-target.d.ts +7 -0
  33. package/dist/components/flows/guidance/guidance-target.js +27 -0
  34. package/dist/components/flows/guidance/guidance.types.d.ts +1 -0
  35. package/dist/components/flows/guidance/help-center/filter-help-center-guides.d.ts +7 -0
  36. package/dist/components/flows/guidance/help-center/filter-help-center-guides.js +11 -0
  37. package/dist/components/flows/guidance/help-center/guide-catalog.d.ts +3 -0
  38. package/dist/components/flows/guidance/help-center/guide-catalog.js +118 -0
  39. package/dist/components/flows/guidance/help-center/help-center-header.d.ts +3 -0
  40. package/dist/components/flows/guidance/help-center/help-center-header.js +43 -0
  41. package/dist/components/flows/guidance/help-center/help-center.constants.d.ts +5 -0
  42. package/dist/components/flows/guidance/help-center/help-center.constants.js +7 -0
  43. package/dist/components/flows/guidance/help-center/help-center.d.ts +10 -0
  44. package/dist/components/flows/guidance/help-center/help-center.js +95 -0
  45. package/dist/components/flows/guidance/help-center/help-center.story-helpers.d.ts +10 -0
  46. package/dist/components/flows/guidance/help-center/help-center.types.d.ts +39 -0
  47. package/dist/components/flows/guidance/help-center.d.ts +6 -0
  48. package/dist/components/flows/guidance/help-center.js +19 -0
  49. package/dist/components/flows/guidance/hooks/use-guidance.d.ts +19 -0
  50. package/dist/components/flows/guidance/hooks/use-guidance.js +50 -0
  51. package/dist/components/flows/guidance/hooks/use-help-center.d.ts +24 -0
  52. package/dist/components/flows/guidance/hooks/use-help-center.js +67 -0
  53. package/dist/components/flows/guidance/hooks/useGuidanceOverlayGeometry.d.ts +2 -0
  54. package/dist/components/flows/guidance/hooks/useGuidanceOverlayGeometry.js +30 -0
  55. package/dist/components/flows/guidance/index.d.ts +18 -0
  56. package/dist/components/flows/guidance/index.js +48 -0
  57. package/dist/components/flows/guidance/renderers/announcement-renderer.d.ts +3 -0
  58. package/dist/components/flows/guidance/renderers/announcement-renderer.js +40 -0
  59. package/dist/components/flows/guidance/renderers/coach-mark-renderer.d.ts +2 -0
  60. package/dist/components/flows/guidance/renderers/coach-mark-renderer.js +14 -0
  61. package/dist/components/flows/guidance/renderers/guidance-card-shared.d.ts +42 -0
  62. package/dist/components/flows/guidance/renderers/guidance-card-shared.js +213 -0
  63. package/dist/components/flows/guidance/renderers/guidance-renderer-shared.d.ts +48 -0
  64. package/dist/components/flows/guidance/renderers/guidance-renderer-shared.js +254 -0
  65. package/dist/components/flows/guidance/renderers/guidance-tour-overlay.d.ts +11 -0
  66. package/dist/components/flows/guidance/renderers/guidance-tour-overlay.js +217 -0
  67. package/dist/components/flows/guidance/renderers/renderer-registry.d.ts +6 -0
  68. package/dist/components/flows/guidance/renderers/renderer-registry.js +19 -0
  69. package/dist/components/flows/guidance/renderers/spotlight-renderer.d.ts +2 -0
  70. package/dist/components/flows/guidance/renderers/spotlight-renderer.js +14 -0
  71. package/dist/components/flows/guidance/renderers.d.ts +4 -0
  72. package/dist/components/flows/guidance/renderers.js +11 -0
  73. package/dist/components/flows/guidance/target.d.ts +3 -0
  74. package/dist/components/flows/guidance/target.js +6 -0
  75. package/dist/components/flows/guidance/triggers.d.ts +2 -0
  76. package/dist/components/flows/guidance/triggers.js +16 -0
  77. package/dist/components/flows/guidance/use-guidance-target.d.ts +5 -0
  78. package/dist/components/flows/guidance/use-guidance-target.js +16 -0
  79. package/dist/components/flows/guidance/utils/motion-settle.d.ts +2 -0
  80. package/dist/components/flows/guidance/utils/motion-settle.js +17 -0
  81. package/dist/components/forms/prompt/prompt.js +13 -13
  82. package/dist/i18n/defaultMessages.d.ts +13 -0
  83. package/dist/i18n/defaultMessages.js +23 -11
  84. package/dist/i18n/index.d.ts +1 -1
  85. package/dist/i18n/locales/de.js +12 -0
  86. package/dist/i18n/locales/es.js +12 -0
  87. package/dist/i18n/locales/hi.js +12 -0
  88. package/dist/i18n/locales/kn.js +12 -0
  89. package/dist/impact-nova-components.css +52 -10
  90. package/dist/impact-nova.css +1 -1
  91. package/dist/lib/guidance/analytics/analytics-adapter.d.ts +16 -0
  92. package/dist/lib/guidance/analytics/analytics-adapter.js +50 -0
  93. package/dist/lib/guidance/engine/guidance-engine.d.ts +74 -0
  94. package/dist/lib/guidance/engine/guidance-engine.js +384 -0
  95. package/dist/lib/guidance/engine/guide-registry.d.ts +21 -0
  96. package/dist/lib/guidance/engine/guide-registry.js +71 -0
  97. package/dist/lib/guidance/engine/manifest-validator.d.ts +4 -0
  98. package/dist/lib/guidance/engine/manifest-validator.js +102 -0
  99. package/dist/lib/guidance/engine/step-navigation.d.ts +5 -0
  100. package/dist/lib/guidance/engine/step-navigation.js +35 -0
  101. package/dist/lib/guidance/index.d.ts +12 -0
  102. package/dist/lib/guidance/storage/storage-adapter.d.ts +10 -0
  103. package/dist/lib/guidance/storage/storage-adapter.js +51 -0
  104. package/dist/lib/guidance/storage/storage-keys.d.ts +10 -0
  105. package/dist/lib/guidance/storage/storage-keys.js +23 -0
  106. package/dist/lib/guidance/targets/ref-registry.d.ts +12 -0
  107. package/dist/lib/guidance/targets/ref-registry.js +65 -0
  108. package/dist/lib/guidance/targets/target-resolver.d.ts +13 -0
  109. package/dist/lib/guidance/targets/target-resolver.js +85 -0
  110. package/dist/lib/guidance/triggers/built-in-triggers.d.ts +14 -0
  111. package/dist/lib/guidance/triggers/built-in-triggers.js +88 -0
  112. package/dist/lib/guidance/triggers/trigger-registry.d.ts +9 -0
  113. package/dist/lib/guidance/triggers/trigger-registry.js +44 -0
  114. package/dist/lib/guidance/types/guidance.types.d.ts +181 -0
  115. package/dist/lib/overflow/is-line-clamp-text-clipped.d.ts +2 -0
  116. package/dist/lib/overflow/is-line-clamp-text-clipped.js +33 -0
  117. package/dist/lib/overflow/is-text-overflowing.d.ts +1 -0
  118. package/dist/lib/overflow/is-text-overflowing.js +8 -3
  119. package/dist/llms/rules/installation.js +1 -1
  120. package/dist/llms/rules/requirements.js +1 -1
  121. package/package.json +51 -22
@@ -0,0 +1,213 @@
1
+ import { jsxs as o, jsx as n } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Cross as v } from "impact-nova-icons";
4
+ import { Button as x } from "../../../primitives/button/button.js";
5
+ import { cn as h } from "../../../../lib/utils.js";
6
+ const u = 5, f = 2;
7
+ function b(s, e) {
8
+ if (e <= u)
9
+ return Array.from({ length: e }, (r, l) => ({
10
+ kind: "step",
11
+ stepIndex: l
12
+ }));
13
+ const t = Math.max(
14
+ 0,
15
+ Math.min(
16
+ s - 2,
17
+ e - u
18
+ )
19
+ ), a = t + u - 1, i = [];
20
+ if (t > 0)
21
+ for (let r = 0; r < f; r += 1)
22
+ i.push({
23
+ kind: "ellipsis",
24
+ markerId: `leading-${r}`
25
+ });
26
+ for (let r = t; r <= a; r += 1)
27
+ i.push({ kind: "step", stepIndex: r });
28
+ if (a < e - 1)
29
+ for (let r = 0; r < f; r += 1)
30
+ i.push({
31
+ kind: "ellipsis",
32
+ markerId: `trailing-${r}`
33
+ });
34
+ return i;
35
+ }
36
+ function y({
37
+ onClose: s,
38
+ closeAriaLabel: e,
39
+ className: t
40
+ }) {
41
+ return /* @__PURE__ */ n(
42
+ x,
43
+ {
44
+ variant: "ghost",
45
+ size: "iconSm",
46
+ className: h(
47
+ "shrink-0 text-content-tertiary hover:text-content-secondary",
48
+ t
49
+ ),
50
+ "aria-label": e,
51
+ onClick: s,
52
+ children: /* @__PURE__ */ n(v, { className: "size-3.5" })
53
+ }
54
+ );
55
+ }
56
+ function I({
57
+ activeStepIndex: s,
58
+ totalSteps: e
59
+ }) {
60
+ return e <= 1 ? null : /* @__PURE__ */ n(
61
+ C,
62
+ {
63
+ activeStepIndex: s,
64
+ totalSteps: e
65
+ }
66
+ );
67
+ }
68
+ function C({
69
+ activeStepIndex: s,
70
+ totalSteps: e
71
+ }) {
72
+ const t = b(s, e);
73
+ return /* @__PURE__ */ n(
74
+ "div",
75
+ {
76
+ className: "flex items-center justify-center gap-1.5",
77
+ role: "progressbar",
78
+ "aria-valuemin": 1,
79
+ "aria-valuenow": s + 1,
80
+ "aria-valuemax": e,
81
+ "aria-label": `Step ${s + 1} of ${e}`,
82
+ children: t.map((a) => {
83
+ if (a.kind === "ellipsis")
84
+ return /* @__PURE__ */ n(
85
+ "span",
86
+ {
87
+ className: "size-1 rounded-full bg-stroke",
88
+ "aria-hidden": "true"
89
+ },
90
+ a.markerId
91
+ );
92
+ const i = a.stepIndex;
93
+ return /* @__PURE__ */ n(
94
+ "span",
95
+ {
96
+ className: h(
97
+ "rounded-full transition-all",
98
+ i === s ? "size-2.5 bg-[var(--guidance-step-counter-active,var(--color-primary))]" : "size-2 bg-stroke"
99
+ )
100
+ },
101
+ i
102
+ );
103
+ })
104
+ }
105
+ );
106
+ }
107
+ function w({
108
+ activeStepIndex: s,
109
+ totalSteps: e,
110
+ skippable: t,
111
+ primaryActionLabel: a,
112
+ onSkip: i,
113
+ onPrimaryAction: r,
114
+ showPrimaryAction: l,
115
+ footerHint: c
116
+ }) {
117
+ const d = e > 1;
118
+ return /* @__PURE__ */ o("div", { className: "mt-4 flex flex-col", children: [
119
+ d ? /* @__PURE__ */ n("div", { className: "flex justify-center", children: /* @__PURE__ */ n(
120
+ I,
121
+ {
122
+ activeStepIndex: s,
123
+ totalSteps: e
124
+ }
125
+ ) }) : null,
126
+ /* @__PURE__ */ o("div", { className: "flex items-center justify-between gap-3", children: [
127
+ /* @__PURE__ */ n("div", { className: "shrink-0", children: t ? /* @__PURE__ */ n(
128
+ "button",
129
+ {
130
+ type: "button",
131
+ className: "flex h-6 items-center text-sm leading-4 text-content-tertiary transition-colors hover:text-content-secondary",
132
+ onClick: i,
133
+ children: "Skip"
134
+ }
135
+ ) : null }),
136
+ /* @__PURE__ */ n("div", { className: "min-w-0 text-right", children: l ? /* @__PURE__ */ n(
137
+ x,
138
+ {
139
+ size: "sm",
140
+ className: "rounded-full px-4",
141
+ onClick: r,
142
+ children: a
143
+ }
144
+ ) : c ? /* @__PURE__ */ n("span", { className: "text-xs font-medium leading-snug text-content-tertiary", children: c }) : null })
145
+ ] })
146
+ ] });
147
+ }
148
+ function z({
149
+ title: s,
150
+ body: e,
151
+ optionalFooter: t,
152
+ stepIndex: a,
153
+ totalSteps: i,
154
+ skippable: r,
155
+ primaryActionLabel: l,
156
+ onSkip: c,
157
+ onDismiss: d,
158
+ onPrimaryAction: p,
159
+ showPrimaryAction: N,
160
+ footerHint: m,
161
+ titleId: g,
162
+ bodyId: k
163
+ }) {
164
+ return /* @__PURE__ */ o("div", { className: "p-4", children: [
165
+ /* @__PURE__ */ o("div", { className: "flex items-center justify-between gap-2", children: [
166
+ /* @__PURE__ */ n(
167
+ "h3",
168
+ {
169
+ id: g,
170
+ className: "min-w-0 text-base font-bold leading-5 text-content",
171
+ children: s
172
+ }
173
+ ),
174
+ /* @__PURE__ */ n(
175
+ y,
176
+ {
177
+ onClose: d,
178
+ closeAriaLabel: "Close",
179
+ className: "-me-1 shrink-0"
180
+ }
181
+ )
182
+ ] }),
183
+ e ? /* @__PURE__ */ n(
184
+ "p",
185
+ {
186
+ id: k,
187
+ className: "mt-2 text-sm leading-relaxed text-content-secondary",
188
+ children: e
189
+ }
190
+ ) : null,
191
+ t && !m ? /* @__PURE__ */ n("p", { className: "mt-1.5 text-xs text-content-tertiary", children: t }) : null,
192
+ /* @__PURE__ */ n(
193
+ w,
194
+ {
195
+ activeStepIndex: a,
196
+ totalSteps: i,
197
+ skippable: r,
198
+ primaryActionLabel: l,
199
+ onSkip: c,
200
+ onPrimaryAction: p,
201
+ showPrimaryAction: N,
202
+ footerHint: m
203
+ }
204
+ )
205
+ ] });
206
+ }
207
+ export {
208
+ y as GuidanceCardCloseButton,
209
+ z as GuidanceStepPanel,
210
+ I as GuidanceStepProgress,
211
+ C as GuidanceStepProgressDots,
212
+ w as GuidanceTourNavFooter
213
+ };
@@ -0,0 +1,48 @@
1
+ import { RenderInstruction } from '../../../../lib/guidance';
2
+ import * as React from 'react';
3
+ export declare const GUIDANCE_SPOTLIGHT_PADDING = 8;
4
+ export declare const GUIDANCE_POPOVER_GAP = 12;
5
+ export declare const GUIDANCE_VIEWPORT_PADDING = 16;
6
+ export declare const GUIDANCE_TARGET_ANIMATION_POLL_MS = 32;
7
+ export declare const GUIDANCE_TARGET_ANIMATION_POLL_DURATION_MS = 320;
8
+ export declare const GUIDANCE_TARGET_STABLE_FRAME_COUNT = 2;
9
+ export declare const GUIDANCE_TARGET_SCROLL_SETTLE_MS = 400;
10
+ export declare const GUIDANCE_TARGET_SCROLL_PADDING = 32;
11
+ export declare const GUIDANCE_OVERLAY_TRANSITION_MS = 120;
12
+ export declare const GUIDANCE_CLICK_TARGET_ADVANCE_MS = 150;
13
+ export interface HighlightRect {
14
+ x: number;
15
+ y: number;
16
+ width: number;
17
+ height: number;
18
+ }
19
+ export interface PopoverPosition {
20
+ top: number;
21
+ left: number;
22
+ placement: 'top' | 'bottom' | 'left' | 'right';
23
+ }
24
+ export declare function getVisibleTargetRect(targetElement: HTMLElement): HighlightRect;
25
+ export interface ScrollContainerSnapshot {
26
+ element: HTMLElement;
27
+ scrollTop: number;
28
+ scrollLeft: number;
29
+ }
30
+ export declare function beginTourScrollSnapshot(targetElement: HTMLElement): void;
31
+ export declare function endTourScrollSnapshot(): void;
32
+ export declare function needsGuidanceTargetScroll(targetElement: HTMLElement, viewportPadding?: number): boolean;
33
+ export declare function scrollGuidanceTargetIntoView(targetElement: HTMLElement, viewportPadding?: number): void;
34
+ export declare function useScrollGuidanceTargetIntoView(targetElement: HTMLElement | null | undefined, stepId: string): boolean;
35
+ export declare function useTargetRect(targetElement: HTMLElement | null | undefined): HighlightRect | null;
36
+ export declare function useStableTargetRect(targetElement: HTMLElement | null | undefined, stepId?: string): HighlightRect | null;
37
+ export declare function useAdvanceOnTargetClick(instruction: RenderInstruction, onNext: () => void): boolean;
38
+ export declare function useElevateGuidanceTarget(targetElement: HTMLElement | null | undefined, shouldElevate?: boolean): void;
39
+ export declare function buildHighlightRect(targetRect: HighlightRect, padding?: number, clipBounds?: HighlightRect): HighlightRect;
40
+ export declare function buildHighlightRectForTarget(targetElement: HTMLElement, padding?: number): HighlightRect;
41
+ export declare function buildHighlightStyle(targetRect: HighlightRect, padding?: number): React.CSSProperties;
42
+ export declare function computePopoverPosition(options: {
43
+ targetRect: HighlightRect;
44
+ popoverWidth: number;
45
+ popoverHeight: number;
46
+ gap?: number;
47
+ viewportPadding?: number;
48
+ }): PopoverPosition;
@@ -0,0 +1,254 @@
1
+ import * as A from "react";
2
+ const T = 8, S = 12, H = 16, v = 32;
3
+ function R(e) {
4
+ const t = window.getComputedStyle(e);
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
+ }
7
+ function C(e) {
8
+ const t = [];
9
+ let n = e.parentElement;
10
+ for (; n; )
11
+ R(n) && t.push(n), n = n.parentElement;
12
+ return t;
13
+ }
14
+ function h(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,
17
+ t.x + t.width
18
+ ), r = Math.min(
19
+ e.y + e.height,
20
+ t.y + t.height
21
+ );
22
+ return i <= n || r <= o ? null : {
23
+ x: n,
24
+ y: o,
25
+ width: i - n,
26
+ height: r - o
27
+ };
28
+ }
29
+ function f(e) {
30
+ return {
31
+ x: e.left,
32
+ y: e.top,
33
+ width: e.width,
34
+ height: e.height
35
+ };
36
+ }
37
+ function M(e) {
38
+ let t = f(
39
+ e.getBoundingClientRect()
40
+ );
41
+ for (const i of C(e)) {
42
+ const r = h(
43
+ t,
44
+ f(i.getBoundingClientRect())
45
+ );
46
+ if (!r)
47
+ break;
48
+ t = r;
49
+ }
50
+ const n = {
51
+ x: 0,
52
+ y: 0,
53
+ width: window.innerWidth,
54
+ height: window.innerHeight
55
+ };
56
+ return h(
57
+ t,
58
+ n
59
+ ) ?? t;
60
+ }
61
+ function E(e) {
62
+ let t = {
63
+ x: 0,
64
+ y: 0,
65
+ width: window.innerWidth,
66
+ height: window.innerHeight
67
+ };
68
+ for (const n of C(e)) {
69
+ const o = h(
70
+ t,
71
+ f(n.getBoundingClientRect())
72
+ );
73
+ o && (t = o);
74
+ }
75
+ return t;
76
+ }
77
+ function x(e) {
78
+ const t = [];
79
+ let n = e.parentElement;
80
+ for (; n; ) {
81
+ const o = window.getComputedStyle(n);
82
+ (o.overflowY === "auto" || o.overflowY === "scroll" || o.overflowY === "overlay") && n.scrollHeight > n.clientHeight && t.push(n), n = n.parentElement;
83
+ }
84
+ return t;
85
+ }
86
+ function I(e) {
87
+ return x(e).map((t) => ({
88
+ element: t,
89
+ scrollTop: t.scrollTop,
90
+ scrollLeft: t.scrollLeft
91
+ }));
92
+ }
93
+ function L(e) {
94
+ for (const t of e)
95
+ t.element.isConnected && (t.element.scrollTop = t.scrollTop, t.element.scrollLeft = t.scrollLeft);
96
+ }
97
+ let s = null;
98
+ function _(e) {
99
+ s === null && (s = I(e));
100
+ }
101
+ function V() {
102
+ s !== null && (L(s), s = null);
103
+ }
104
+ function D(e, t = v) {
105
+ const n = e.getBoundingClientRect(), o = window.innerHeight;
106
+ return n.top < t || n.bottom > o - t;
107
+ }
108
+ function B(e) {
109
+ const { targetElement: t, scrollContainer: n, viewportPadding: o } = e, i = n.getBoundingClientRect(), r = t.getBoundingClientRect(), c = n.clientHeight - o * 2;
110
+ if (r.height >= c) {
111
+ const l = r.top - i.top - o;
112
+ Math.abs(l) > 1 && (n.scrollTop += l);
113
+ return;
114
+ }
115
+ if (r.top < i.top + o) {
116
+ n.scrollTop -= i.top + o - r.top;
117
+ return;
118
+ }
119
+ r.bottom > i.bottom - o && (n.scrollTop += r.bottom - (i.bottom - o));
120
+ }
121
+ function O(e, t = v) {
122
+ if (!D(e, t))
123
+ return;
124
+ const o = x(e)[0];
125
+ if (o) {
126
+ B({
127
+ targetElement: e,
128
+ scrollContainer: o,
129
+ viewportPadding: t
130
+ });
131
+ return;
132
+ }
133
+ e.scrollIntoView({
134
+ behavior: "auto",
135
+ block: "center",
136
+ inline: "nearest"
137
+ });
138
+ }
139
+ function N(e, t) {
140
+ const n = e.advanceOn === "click-target";
141
+ return A.useEffect(() => {
142
+ if (!n)
143
+ return;
144
+ const o = e.target?.element;
145
+ if (!o)
146
+ return;
147
+ const i = () => {
148
+ queueMicrotask(() => {
149
+ t();
150
+ });
151
+ };
152
+ return o.addEventListener("click", i, { once: !0 }), () => {
153
+ o.removeEventListener("click", i);
154
+ };
155
+ }, [
156
+ n,
157
+ e.stepId,
158
+ e.target?.element,
159
+ t
160
+ ]), n;
161
+ }
162
+ function G(e, t = T, n) {
163
+ const o = {
164
+ x: e.x - t,
165
+ y: e.y - t,
166
+ width: e.width + t * 2,
167
+ height: e.height + t * 2
168
+ };
169
+ return n ? h(o, n) ?? o : o;
170
+ }
171
+ function F(e, t = T) {
172
+ const n = M(e), o = E(e);
173
+ return G(n, t, o);
174
+ }
175
+ function U(e) {
176
+ const {
177
+ targetRect: t,
178
+ popoverWidth: n,
179
+ popoverHeight: o,
180
+ gap: i = S,
181
+ viewportPadding: r = H
182
+ } = e, c = t.x + t.width, g = t.y + t.height, l = t.x, y = window.innerWidth - c;
183
+ if (t.width <= 280 && t.x >= window.innerWidth * 0.35 && l >= n + i)
184
+ return {
185
+ placement: "left",
186
+ left: Math.max(r, t.x - n - i),
187
+ top: Math.max(
188
+ r,
189
+ Math.min(
190
+ t.y,
191
+ window.innerHeight - o - r
192
+ )
193
+ )
194
+ };
195
+ if (t.width >= 480 && c >= window.innerWidth - r - 80 && l >= n + i)
196
+ return {
197
+ placement: "left",
198
+ left: Math.max(r, t.x - n - i),
199
+ top: Math.max(
200
+ r,
201
+ Math.min(
202
+ t.y + 16,
203
+ window.innerHeight - o - r
204
+ )
205
+ )
206
+ };
207
+ if (t.height > t.width * 2.5) {
208
+ const m = Math.max(
209
+ r,
210
+ Math.min(
211
+ t.y,
212
+ window.innerHeight - o - r
213
+ )
214
+ );
215
+ if (y >= n + i)
216
+ return {
217
+ placement: "right",
218
+ left: c + i,
219
+ top: m
220
+ };
221
+ if (l >= n + i)
222
+ return {
223
+ placement: "left",
224
+ left: t.x - n - i,
225
+ top: m
226
+ };
227
+ }
228
+ const p = window.innerHeight - g, w = t.y, b = t.y + t.height / 2 > window.innerHeight * 0.55;
229
+ let a;
230
+ b && w >= o + i && p < o + i * 2 ? a = "top" : a = p >= o + i || p >= w ? "bottom" : "top";
231
+ let u = a === "bottom" ? g + i : t.y - o - i, d = t.x + t.width / 2 - n / 2;
232
+ return d = Math.max(
233
+ r,
234
+ Math.min(d, window.innerWidth - n - r)
235
+ ), u = Math.max(
236
+ r,
237
+ Math.min(u, window.innerHeight - o - r)
238
+ ), { top: u, left: d, placement: a };
239
+ }
240
+ export {
241
+ S as GUIDANCE_POPOVER_GAP,
242
+ T as GUIDANCE_SPOTLIGHT_PADDING,
243
+ v as GUIDANCE_TARGET_SCROLL_PADDING,
244
+ H as GUIDANCE_VIEWPORT_PADDING,
245
+ _ as beginTourScrollSnapshot,
246
+ G as buildHighlightRect,
247
+ F as buildHighlightRectForTarget,
248
+ U as computePopoverPosition,
249
+ V as endTourScrollSnapshot,
250
+ M as getVisibleTargetRect,
251
+ D as needsGuidanceTargetScroll,
252
+ O as scrollGuidanceTargetIntoView,
253
+ N as useAdvanceOnTargetClick
254
+ };
@@ -0,0 +1,11 @@
1
+ import { RenderInstruction } from '../../../../lib/guidance';
2
+ import * as React from 'react';
3
+ interface GuidanceTourOverlayProps {
4
+ instruction: RenderInstruction;
5
+ overlayComponent: 'guidance-spotlight' | 'guidance-coach-mark';
6
+ onNext: () => void;
7
+ onSkip: () => void;
8
+ onDismiss: () => void;
9
+ }
10
+ export declare function GuidanceTourOverlay({ instruction, overlayComponent, onNext, onSkip, onDismiss, }: GuidanceTourOverlayProps): React.ReactElement | null;
11
+ export {};