@aladinbs/react-guided-tour 1.0.2 → 1.1.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.
- package/README.md +103 -1
- package/dist/components/ErrorBoundary.d.ts +31 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/Toast.d.ts +14 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/ToastProvider.d.ts +28 -0
- package/dist/components/ToastProvider.d.ts.map +1 -0
- package/dist/components/TourOverlay.d.ts +2 -1
- package/dist/components/TourOverlay.d.ts.map +1 -1
- package/dist/components/TourPopover.d.ts +2 -1
- package/dist/components/TourPopover.d.ts.map +1 -1
- package/dist/components/TourProvider.d.ts +10 -2
- package/dist/components/TourProvider.d.ts.map +1 -1
- package/dist/components/TourRunner.d.ts +2 -1
- package/dist/components/TourRunner.d.ts.map +1 -1
- package/dist/core/TourActions.d.ts +10 -0
- package/dist/core/TourActions.d.ts.map +1 -1
- package/dist/core/TourEngine.d.ts +32 -0
- package/dist/core/TourEngine.d.ts.map +1 -1
- package/dist/hooks/useErrorHandler.d.ts +26 -0
- package/dist/hooks/useErrorHandler.d.ts.map +1 -0
- package/dist/hooks/useToastErrorHandler.d.ts +15 -0
- package/dist/hooks/useToastErrorHandler.d.ts.map +1 -0
- package/dist/hooks/useTourEngine.d.ts +4 -0
- package/dist/hooks/useTourEngine.d.ts.map +1 -1
- package/dist/hooks/useTourHighlight.d.ts +4 -0
- package/dist/hooks/useTourHighlight.d.ts.map +1 -1
- package/dist/index.d.ts +140 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +617 -144
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +641 -163
- package/dist/index.js.map +1 -1
- package/dist/integrations/TabIntegration.d.ts.map +1 -1
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/positioning.d.ts +13 -0
- package/dist/utils/positioning.d.ts.map +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -12,6 +12,8 @@ A modern, flexible React TypeScript tour guide library with advanced highlightin
|
|
|
12
12
|
- 💾 **State Persistence** - localStorage integration to remember tour completion and progress
|
|
13
13
|
- ⚡ **Performance Optimized** - Framework-agnostic core with efficient React integration
|
|
14
14
|
- 🎪 **Action System** - Automated interactions (clicks, navigation, tab switching)
|
|
15
|
+
- 🔒 **Interaction Blocking** - Prevent user interactions outside the tour target for focused guidance
|
|
16
|
+
- 👆 **Click-to-Advance** - Allow users to click target elements directly to advance tour steps
|
|
15
17
|
- 🔄 **Event System** - Rich event hooks for tour lifecycle management
|
|
16
18
|
- 🎯 **TypeScript First** - Full type safety with comprehensive type definitions
|
|
17
19
|
|
|
@@ -141,6 +143,8 @@ interface TourConfig {
|
|
|
141
143
|
onStepChange?: (step: TourStep, index: number) => void;
|
|
142
144
|
allowKeyboardNavigation?: boolean; // Enable keyboard controls
|
|
143
145
|
allowClickOutside?: boolean; // Allow clicking outside to close
|
|
146
|
+
blockInteractions?: boolean; // Block interactions outside tour target
|
|
147
|
+
clickToAdvance?: boolean; // Enable click-to-advance globally
|
|
144
148
|
showProgress?: boolean; // Show step progress indicator
|
|
145
149
|
storage?: {
|
|
146
150
|
key?: string; // localStorage key (default: 'tour-{id}')
|
|
@@ -168,6 +172,8 @@ interface TourStep {
|
|
|
168
172
|
canSkip?: boolean; // Allow skipping this step
|
|
169
173
|
waitForElement?: boolean; // Wait for target element to appear
|
|
170
174
|
waitTimeout?: number; // Timeout for element waiting (ms)
|
|
175
|
+
blockInteractions?: boolean; // Override global interaction blocking for this step
|
|
176
|
+
clickToAdvance?: boolean; // Override global click-to-advance for this step
|
|
171
177
|
}
|
|
172
178
|
```
|
|
173
179
|
|
|
@@ -279,6 +285,92 @@ Navigate through multi-step wizards:
|
|
|
279
285
|
}
|
|
280
286
|
```
|
|
281
287
|
|
|
288
|
+
### Interaction Blocking
|
|
289
|
+
|
|
290
|
+
Control user interactions during the tour to create focused guidance experiences:
|
|
291
|
+
|
|
292
|
+
```tsx
|
|
293
|
+
const tourConfig: TourConfig = {
|
|
294
|
+
id: 'focused-tour',
|
|
295
|
+
blockInteractions: true, // Block interactions globally
|
|
296
|
+
steps: [
|
|
297
|
+
{
|
|
298
|
+
id: 'step1',
|
|
299
|
+
title: 'Focused Step',
|
|
300
|
+
content: 'Users can only interact with the highlighted element.',
|
|
301
|
+
target: '#important-button',
|
|
302
|
+
blockInteractions: true, // Enforce blocking for this step
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
id: 'step2',
|
|
306
|
+
title: 'Free Interaction',
|
|
307
|
+
content: 'Users can click anywhere during this step.',
|
|
308
|
+
target: '#another-element',
|
|
309
|
+
blockInteractions: false, // Override global setting for this step
|
|
310
|
+
},
|
|
311
|
+
],
|
|
312
|
+
};
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**Features:**
|
|
316
|
+
- **Global Control**: Set `blockInteractions: true` in tour config to block interactions for all steps
|
|
317
|
+
- **Per-Step Override**: Use `blockInteractions` in individual steps to override the global setting
|
|
318
|
+
- **Visual Feedback**: Shows a "🔒 Interactions blocked" indicator when active
|
|
319
|
+
- **Smart Targeting**: Only the highlighted element and tour UI remain interactive
|
|
320
|
+
- **Keyboard Blocking**: Prevents keyboard interactions except tour navigation keys
|
|
321
|
+
|
|
322
|
+
**When to use:**
|
|
323
|
+
- Complex interfaces where users might get distracted
|
|
324
|
+
- Critical onboarding flows that must be completed in order
|
|
325
|
+
- Preventing accidental clicks that could break the tour flow
|
|
326
|
+
- Ensuring users focus on specific elements
|
|
327
|
+
|
|
328
|
+
### Click-to-Advance
|
|
329
|
+
|
|
330
|
+
Enable users to interact directly with tour target elements to advance to the next step:
|
|
331
|
+
|
|
332
|
+
```tsx
|
|
333
|
+
const tourConfig: TourConfig = {
|
|
334
|
+
id: "interactive-tour",
|
|
335
|
+
clickToAdvance: true, // Enable globally
|
|
336
|
+
steps: [
|
|
337
|
+
{
|
|
338
|
+
id: "button-interaction",
|
|
339
|
+
title: "Try the Button",
|
|
340
|
+
content: "Click the button below to continue the tour!",
|
|
341
|
+
target: "#my-button",
|
|
342
|
+
clickToAdvance: true, // Enable for this step
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
id: "form-interaction",
|
|
346
|
+
title: "Fill the Form",
|
|
347
|
+
content: "Complete this form field to proceed.",
|
|
348
|
+
target: "#email-input",
|
|
349
|
+
clickToAdvance: false, // Disable for this step (use Next button)
|
|
350
|
+
},
|
|
351
|
+
],
|
|
352
|
+
};
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
**Features:**
|
|
356
|
+
- **Global Control**: Set `clickToAdvance: true` in tour config to enable for all steps
|
|
357
|
+
- **Per-Step Override**: Use `clickToAdvance` in individual steps to override the global setting
|
|
358
|
+
- **Smart UI**: Next button is automatically hidden when click-to-advance is active
|
|
359
|
+
- **Visual Guidance**: Shows "👆 Click the highlighted element to continue" instruction
|
|
360
|
+
- **Event Handling**: Automatically captures clicks on target elements and advances tour
|
|
361
|
+
|
|
362
|
+
**When to use:**
|
|
363
|
+
- Interactive tutorials where users need to practice using actual UI elements
|
|
364
|
+
- Onboarding flows for buttons, forms, and interactive components
|
|
365
|
+
- Training scenarios where clicking the real element is part of the learning
|
|
366
|
+
- Reducing cognitive load by eliminating the need to find the Next button
|
|
367
|
+
|
|
368
|
+
**Best practices:**
|
|
369
|
+
- Use for clickable elements like buttons, links, and form controls
|
|
370
|
+
- Combine with `blockInteractions: true` to ensure users click the right element
|
|
371
|
+
- Provide clear instructions in the step content about what to click
|
|
372
|
+
- Consider accessibility - ensure target elements are keyboard accessible
|
|
373
|
+
|
|
282
374
|
### Custom Integrations
|
|
283
375
|
|
|
284
376
|
Extend the tour system with custom integrations:
|
|
@@ -564,8 +656,18 @@ const tourConfig: TourConfig = {
|
|
|
564
656
|
|
|
565
657
|
## 🤝 Contributing
|
|
566
658
|
|
|
567
|
-
We welcome contributions!
|
|
659
|
+
We welcome contributions from the community! Whether you're fixing bugs, adding new features, improving documentation, or helping with testing, your contributions are valuable.
|
|
660
|
+
|
|
661
|
+
### Quick Start for Contributors
|
|
662
|
+
|
|
663
|
+
1. **Fork the repository** and clone it locally
|
|
664
|
+
2. **Install dependencies**: `npm install`
|
|
665
|
+
3. **Build the library**: `npm run build`
|
|
666
|
+
4. **Run the example**: `npm run example`
|
|
667
|
+
5. **Make your changes** and test thoroughly
|
|
668
|
+
6. **Submit a pull request**
|
|
568
669
|
|
|
569
670
|
## 📄 License
|
|
570
671
|
|
|
571
672
|
MIT License - see [LICENSE](LICENSE) file for details.
|
|
673
|
+
# react-guided-tour
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { Component, ReactNode } from 'react';
|
|
2
|
+
export interface ErrorInfo {
|
|
3
|
+
componentStack: string;
|
|
4
|
+
errorBoundary?: string;
|
|
5
|
+
errorBoundaryStack?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ErrorBoundaryState {
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
error: Error | null;
|
|
10
|
+
errorInfo: ErrorInfo | null;
|
|
11
|
+
}
|
|
12
|
+
export interface ErrorBoundaryProps {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
fallback?: (error: Error, errorInfo: ErrorInfo, retry: () => void) => ReactNode;
|
|
15
|
+
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
16
|
+
isolate?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
19
|
+
private retryTimeoutId;
|
|
20
|
+
constructor(props: ErrorBoundaryProps);
|
|
21
|
+
static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
|
|
22
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
23
|
+
componentWillUnmount(): void;
|
|
24
|
+
retry: () => void;
|
|
25
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare function withErrorBoundary<P extends object>(Component: React.ComponentType<P>, errorBoundaryProps?: Omit<ErrorBoundaryProps, 'children'>): {
|
|
28
|
+
(props: P): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpD,MAAM,WAAW,SAAS;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;IAChF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAClF,OAAO,CAAC,cAAc,CAAuB;gBAEjC,KAAK,EAAE,kBAAkB;IASrC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAO1E,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;IAapD,oBAAoB;IAMpB,KAAK,aAMH;IAEF,MAAM;CAkEP;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAChD,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACjC,kBAAkB,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;YAExB,CAAC;;EASnC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ToastType = 'error' | 'warning' | 'success' | 'info';
|
|
3
|
+
export interface ToastProps {
|
|
4
|
+
id: string;
|
|
5
|
+
type: ToastType;
|
|
6
|
+
title: string;
|
|
7
|
+
message: string;
|
|
8
|
+
duration?: number;
|
|
9
|
+
onClose: (id: string) => void;
|
|
10
|
+
showDetails?: boolean;
|
|
11
|
+
details?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const Toast: React.NamedExoticComponent<ToastProps>;
|
|
14
|
+
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../src/components/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAEjE,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,KAAK,wCAiKhB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ToastType } from './Toast';
|
|
3
|
+
export interface ToastData {
|
|
4
|
+
id: string;
|
|
5
|
+
type: ToastType;
|
|
6
|
+
title: string;
|
|
7
|
+
message: string;
|
|
8
|
+
duration?: number;
|
|
9
|
+
showDetails?: boolean;
|
|
10
|
+
details?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ToastContextValue {
|
|
13
|
+
showToast: (toast: Omit<ToastData, 'id'>) => string;
|
|
14
|
+
showError: (title: string, message: string, details?: string) => string;
|
|
15
|
+
showWarning: (title: string, message: string) => string;
|
|
16
|
+
showSuccess: (title: string, message: string) => string;
|
|
17
|
+
showInfo: (title: string, message: string) => string;
|
|
18
|
+
removeToast: (id: string) => void;
|
|
19
|
+
clearAllToasts: () => void;
|
|
20
|
+
}
|
|
21
|
+
export interface ToastProviderProps {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
maxToasts?: number;
|
|
24
|
+
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
25
|
+
}
|
|
26
|
+
export declare const ToastProvider: React.NamedExoticComponent<ToastProviderProps>;
|
|
27
|
+
export declare function useToast(): ToastContextValue;
|
|
28
|
+
//# sourceMappingURL=ToastProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastProvider.d.ts","sourceRoot":"","sources":["../../src/components/ToastProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoD,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAS,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,MAAM,CAAC;IACpD,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IACxE,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IACxD,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IACxD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IACrD,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAID,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,CAAC;CACtE;AAED,eAAO,MAAM,aAAa,gDAqIxB,CAAC;AAEH,wBAAgB,QAAQ,IAAI,iBAAiB,CAM5C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export interface TourOverlayProps {
|
|
2
3
|
className?: string;
|
|
3
4
|
}
|
|
4
|
-
export declare
|
|
5
|
+
export declare const TourOverlay: React.NamedExoticComponent<TourOverlayProps>;
|
|
5
6
|
//# sourceMappingURL=TourOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TourOverlay.d.ts","sourceRoot":"","sources":["../../src/components/TourOverlay.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TourOverlay.d.ts","sourceRoot":"","sources":["../../src/components/TourOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAIzE,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,8CAwQtB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export interface TourPopoverProps {
|
|
2
3
|
className?: string;
|
|
3
4
|
}
|
|
4
|
-
export declare
|
|
5
|
+
export declare const TourPopover: React.NamedExoticComponent<TourPopoverProps>;
|
|
5
6
|
//# sourceMappingURL=TourPopover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TourPopover.d.ts","sourceRoot":"","sources":["../../src/components/TourPopover.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TourPopover.d.ts","sourceRoot":"","sources":["../../src/components/TourPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAOjF,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,8CAsWtB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { TourConfig, TourTheme } from '../types';
|
|
3
3
|
import { UseTourEngineReturn } from '../hooks/useTourEngine';
|
|
4
4
|
interface TourContextValue extends UseTourEngineReturn {
|
|
@@ -9,7 +9,15 @@ export interface TourProviderProps {
|
|
|
9
9
|
config: TourConfig;
|
|
10
10
|
children: ReactNode;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Main provider component that initializes the tour system and provides context.
|
|
14
|
+
* Wraps the application with tour functionality.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TourProvider: React.NamedExoticComponent<TourProviderProps>;
|
|
17
|
+
/**
|
|
18
|
+
* Hook to access tour functionality and state.
|
|
19
|
+
* Must be used within a TourProvider.
|
|
20
|
+
*/
|
|
13
21
|
export declare function useTour(): TourContextValue;
|
|
14
22
|
export {};
|
|
15
23
|
//# sourceMappingURL=TourProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TourProvider.d.ts","sourceRoot":"","sources":["../../src/components/TourProvider.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"TourProvider.d.ts","sourceRoot":"","sources":["../../src/components/TourProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAW,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAiB,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE5E,UAAU,gBAAiB,SAAQ,mBAAmB;IACpD,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;CAClB;AAID,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AA4BD;;;GAGG;AACH,eAAO,MAAM,YAAY,+CAkBvB,CAAC;AAEH;;;GAGG;AACH,wBAAgB,OAAO,IAAI,gBAAgB,CAM1C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export interface TourRunnerProps {
|
|
2
3
|
className?: string;
|
|
3
4
|
}
|
|
4
|
-
export declare
|
|
5
|
+
export declare const TourRunner: React.NamedExoticComponent<TourRunnerProps>;
|
|
5
6
|
//# sourceMappingURL=TourRunner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TourRunner.d.ts","sourceRoot":"","sources":["../../src/components/TourRunner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TourRunner.d.ts","sourceRoot":"","sources":["../../src/components/TourRunner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,6CAiBrB,CAAC"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { TourAction, Integration } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Manages and executes tour actions with pluggable integration support.
|
|
4
|
+
* Handles clicks, navigation, and custom actions through registered integrations.
|
|
5
|
+
*/
|
|
2
6
|
export declare class TourActions {
|
|
3
7
|
private integrations;
|
|
4
8
|
registerIntegration(integration: Integration): void;
|
|
5
9
|
unregisterIntegration(name: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* Executes a tour action using the appropriate integration or default handler.
|
|
12
|
+
*/
|
|
6
13
|
execute(action: TourAction, element?: HTMLElement): Promise<void>;
|
|
7
14
|
private findIntegration;
|
|
15
|
+
/**
|
|
16
|
+
* Default action handler for built-in action types.
|
|
17
|
+
*/
|
|
8
18
|
private executeDefault;
|
|
9
19
|
private handleClick;
|
|
10
20
|
private handleNavigate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TourActions.d.ts","sourceRoot":"","sources":["../../src/core/TourActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEnD,qBAAa,WAAW;IACtB,OAAO,CAAC,YAAY,CAAuC;IAEpD,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAInD,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"TourActions.d.ts","sourceRoot":"","sources":["../../src/core/TourActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEnD;;;GAGG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,YAAY,CAAuC;IAEpD,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAInD,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIhD;;OAEG;IACU,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB9E,OAAO,CAAC,eAAe;IASvB;;OAEG;YACW,cAAc;YA0Bd,WAAW;YAwBX,cAAc;IAkB5B,OAAO,CAAC,KAAK;IAIN,yBAAyB,IAAI,MAAM,EAAE;IAIrC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAG7C"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { TourConfig, TourStep, TourState, TourEngineEvents, TourEventCallback } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Core tour engine that manages tour state, navigation, and lifecycle.
|
|
4
|
+
* Handles step progression, state persistence, and event emission.
|
|
5
|
+
*/
|
|
2
6
|
export declare class TourEngine {
|
|
3
7
|
private config;
|
|
4
8
|
private state;
|
|
@@ -8,11 +12,29 @@ export declare class TourEngine {
|
|
|
8
12
|
private initializeState;
|
|
9
13
|
getState(): TourState;
|
|
10
14
|
getConfig(): TourConfig;
|
|
15
|
+
/**
|
|
16
|
+
* Starts the tour from the current step index.
|
|
17
|
+
*/
|
|
11
18
|
start(): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Advances to the next step in the tour.
|
|
21
|
+
*/
|
|
12
22
|
next(): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Goes back to the previous step in the tour.
|
|
25
|
+
*/
|
|
13
26
|
previous(): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Navigates to a specific step by index.
|
|
29
|
+
*/
|
|
14
30
|
goToStep(index: number): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Skips the current tour and marks it as skipped.
|
|
33
|
+
*/
|
|
15
34
|
skip(): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Completes the tour and marks it as finished.
|
|
37
|
+
*/
|
|
16
38
|
complete(): Promise<void>;
|
|
17
39
|
stop(): Promise<void>;
|
|
18
40
|
getCurrentStep(): TourStep | null;
|
|
@@ -20,7 +42,13 @@ export declare class TourEngine {
|
|
|
20
42
|
isLastStep(): boolean;
|
|
21
43
|
canGoNext(): boolean;
|
|
22
44
|
canGoPrevious(): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Determines if the tour should be shown based on completion/skip state.
|
|
47
|
+
*/
|
|
23
48
|
shouldShowTour(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Resets tour state and clears localStorage.
|
|
51
|
+
*/
|
|
24
52
|
resetTourState(): void;
|
|
25
53
|
private waitForElement;
|
|
26
54
|
private markStepCompleted;
|
|
@@ -30,6 +58,10 @@ export declare class TourEngine {
|
|
|
30
58
|
on<K extends keyof TourEngineEvents>(event: K, callback: TourEventCallback<TourEngineEvents[K]>): void;
|
|
31
59
|
off<K extends keyof TourEngineEvents>(event: K, callback: TourEventCallback<TourEngineEvents[K]>): void;
|
|
32
60
|
private emit;
|
|
61
|
+
/**
|
|
62
|
+
* Subscribes to tour state changes.
|
|
63
|
+
* Returns an unsubscribe function.
|
|
64
|
+
*/
|
|
33
65
|
subscribe(callback: (state: TourState) => void): () => void;
|
|
34
66
|
}
|
|
35
67
|
//# sourceMappingURL=TourEngine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TourEngine.d.ts","sourceRoot":"","sources":["../../src/core/TourEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGhG,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,KAAK,CAAY;IACzB,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,SAAS,CAAwD;gBAE7D,MAAM,EAAE,UAAU;IAM9B,OAAO,CAAC,eAAe;IAmBhB,QAAQ,IAAI,SAAS;IAIrB,SAAS,IAAI,UAAU;
|
|
1
|
+
{"version":3,"file":"TourEngine.d.ts","sourceRoot":"","sources":["../../src/core/TourEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGhG;;;GAGG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,KAAK,CAAY;IACzB,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,SAAS,CAAwD;gBAE7D,MAAM,EAAE,UAAU;IAM9B,OAAO,CAAC,eAAe;IAmBhB,QAAQ,IAAI,SAAS;IAIrB,SAAS,IAAI,UAAU;IAI9B;;OAEG;IACU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA2BnC;;OAEG;IACU,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAoClC;;OAEG;IACU,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAUtC;;OAEG;IACU,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAyDnD;;OAEG;IACU,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BlC;;OAEG;IACU,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAmBzB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAO3B,cAAc,IAAI,QAAQ,GAAG,IAAI;IAIjC,WAAW,IAAI,OAAO;IAItB,UAAU,IAAI,OAAO;IAIrB,SAAS,IAAI,OAAO;IAIpB,aAAa,IAAI,OAAO;IAI/B;;OAEG;IACI,cAAc,IAAI,OAAO;IAKhC;;OAEG;IACI,cAAc,IAAI,IAAI;YAOf,cAAc;IA6B5B,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,WAAW;IA2BnB,OAAO,CAAC,QAAQ;IAKT,EAAE,CAAC,CAAC,SAAS,MAAM,gBAAgB,EACxC,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC/C,IAAI;IAOA,GAAG,CAAC,CAAC,SAAS,MAAM,gBAAgB,EACzC,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC/C,IAAI;IAOP,OAAO,CAAC,IAAI;IAUZ;;;OAGG;IACI,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,GAAG,MAAM,IAAI;CAmBnE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ErrorHandlerOptions {
|
|
2
|
+
onError?: (error: Error, context?: string) => void;
|
|
3
|
+
logErrors?: boolean;
|
|
4
|
+
retryAttempts?: number;
|
|
5
|
+
retryDelay?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface UseErrorHandlerReturn {
|
|
8
|
+
handleError: (error: Error, context?: string) => void;
|
|
9
|
+
handleAsyncError: <T>(asyncFn: () => Promise<T>, context?: string, fallback?: T) => Promise<T | undefined>;
|
|
10
|
+
wrapFunction: <T extends (...args: unknown[]) => unknown>(fn: T, context?: string) => T;
|
|
11
|
+
wrapAsyncFunction: <T extends (...args: unknown[]) => Promise<unknown>>(fn: T, context?: string) => T;
|
|
12
|
+
}
|
|
13
|
+
export declare function useErrorHandler(options?: ErrorHandlerOptions): UseErrorHandlerReturn;
|
|
14
|
+
export declare function createSafeAsyncOperation<T>(operation: () => Promise<T>, options?: {
|
|
15
|
+
context?: string;
|
|
16
|
+
fallback?: T;
|
|
17
|
+
onError?: (error: Error) => void;
|
|
18
|
+
retryAttempts?: number;
|
|
19
|
+
retryDelay?: number;
|
|
20
|
+
}): () => Promise<T | undefined>;
|
|
21
|
+
export declare function useErrorBoundary(): {
|
|
22
|
+
handleError: (error: Error, _errorInfo?: {
|
|
23
|
+
componentStack: string;
|
|
24
|
+
}) => never;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=useErrorHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useErrorHandler.d.ts","sourceRoot":"","sources":["../../src/hooks/useErrorHandler.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,gBAAgB,EAAE,CAAC,CAAC,EAClB,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,OAAO,CAAC,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,CAAC,KACT,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAC5B,YAAY,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EACtD,EAAE,EAAE,CAAC,EACL,OAAO,CAAC,EAAE,MAAM,KACb,CAAC,CAAC;IACP,iBAAiB,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,EACpE,EAAE,EAAE,CAAC,EACL,OAAO,CAAC,EAAE,MAAM,KACb,CAAC,CAAC;CACR;AAED,wBAAgB,eAAe,CAAC,OAAO,GAAE,mBAAwB,GAAG,qBAAqB,CAuFxF;AAGD,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAC3B,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CAChB,SAUW,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAiCxC;AAGD,wBAAgB,gBAAgB;yBACU,KAAK,eAAe;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE;EAMvF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ToastErrorHandlerOptions {
|
|
2
|
+
onError?: (error: Error, context?: string) => void;
|
|
3
|
+
logErrors?: boolean;
|
|
4
|
+
retryAttempts?: number;
|
|
5
|
+
retryDelay?: number;
|
|
6
|
+
toastTitle?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface UseToastErrorHandlerReturn {
|
|
9
|
+
handleError: (error: Error, context?: string) => void;
|
|
10
|
+
handleAsyncError: <T>(asyncFn: () => Promise<T>, context?: string, fallback?: T) => Promise<T | undefined>;
|
|
11
|
+
wrapFunction: <T extends (...args: unknown[]) => unknown>(fn: T, context?: string) => T;
|
|
12
|
+
wrapAsyncFunction: <T extends (...args: unknown[]) => Promise<unknown>>(fn: T, context?: string) => T;
|
|
13
|
+
}
|
|
14
|
+
export declare function useToastErrorHandler(options?: ToastErrorHandlerOptions): UseToastErrorHandlerReturn;
|
|
15
|
+
//# sourceMappingURL=useToastErrorHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToastErrorHandler.d.ts","sourceRoot":"","sources":["../../src/hooks/useToastErrorHandler.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,gBAAgB,EAAE,CAAC,CAAC,EAClB,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,OAAO,CAAC,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,CAAC,KACT,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAC5B,YAAY,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EACtD,EAAE,EAAE,CAAC,EACL,OAAO,CAAC,EAAE,MAAM,KACb,CAAC,CAAC;IACP,iBAAiB,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,EACpE,EAAE,EAAE,CAAC,EACL,OAAO,CAAC,EAAE,MAAM,KACb,CAAC,CAAC;CACR;AAED,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,wBAA6B,GAAG,0BAA0B,CA6FvG"}
|
|
@@ -17,5 +17,9 @@ export interface UseTourEngineReturn {
|
|
|
17
17
|
engine: TourEngine;
|
|
18
18
|
actions: TourActions;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Hook that creates and manages a tour engine instance.
|
|
22
|
+
* Provides tour control methods and state management with error handling.
|
|
23
|
+
*/
|
|
20
24
|
export declare function useTourEngine(config: TourConfig): UseTourEngineReturn;
|
|
21
25
|
//# sourceMappingURL=useTourEngine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTourEngine.d.ts","sourceRoot":"","sources":["../../src/hooks/useTourEngine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useTourEngine.d.ts","sourceRoot":"","sources":["../../src/hooks/useTourEngine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAG3D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,WAAW,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,mBAAmB,CAuFrE"}
|
|
@@ -4,5 +4,9 @@ export interface UseTourHighlightReturn {
|
|
|
4
4
|
highlightStyle: React.CSSProperties;
|
|
5
5
|
isVisible: boolean;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Hook that manages element highlighting for tour steps.
|
|
9
|
+
* Finds target elements, positions highlights, and handles dynamic content.
|
|
10
|
+
*/
|
|
7
11
|
export declare function useTourHighlight(step: TourStep | null): UseTourHighlightReturn;
|
|
8
12
|
//# sourceMappingURL=useTourHighlight.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTourHighlight.d.ts","sourceRoot":"","sources":["../../src/hooks/useTourHighlight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAmB,MAAM,UAAU,CAAC;AAGrD,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,WAAW,GAAG,IAAI,CAAC;IAClC,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,sBAAsB,
|
|
1
|
+
{"version":3,"file":"useTourHighlight.d.ts","sourceRoot":"","sources":["../../src/hooks/useTourHighlight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAmB,MAAM,UAAU,CAAC;AAGrD,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,WAAW,GAAG,IAAI,CAAC;IAClC,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,sBAAsB,CAyH9E"}
|