@korsolutions/guidon 1.0.1 → 1.0.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/commonjs/babel.config.js +15 -0
- package/dist/commonjs/babel.config.js.map +1 -0
- package/dist/commonjs/bob.config.js +11 -0
- package/dist/commonjs/bob.config.js.map +1 -0
- package/dist/commonjs/components/GuidonOverlay.js +206 -0
- package/dist/commonjs/components/GuidonOverlay.js.map +1 -0
- package/dist/commonjs/components/GuidonProvider.js +157 -0
- package/dist/commonjs/components/GuidonProvider.js.map +1 -0
- package/dist/commonjs/components/GuidonTarget.js +108 -0
- package/dist/commonjs/components/GuidonTarget.js.map +1 -0
- package/dist/commonjs/components/GuidonTooltip.js +422 -0
- package/dist/commonjs/components/GuidonTooltip.js.map +1 -0
- package/dist/commonjs/components/index.js +40 -0
- package/dist/commonjs/components/index.js.map +1 -0
- package/dist/commonjs/hooks/index.js +13 -0
- package/dist/commonjs/hooks/index.js.map +1 -0
- package/dist/commonjs/hooks/useGuidonRef.js +132 -0
- package/dist/commonjs/hooks/useGuidonRef.js.map +1 -0
- package/dist/commonjs/index.js +143 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/persistence/adapters.js +213 -0
- package/dist/commonjs/persistence/adapters.js.map +1 -0
- package/dist/commonjs/persistence/hooks.js +153 -0
- package/dist/commonjs/persistence/hooks.js.map +1 -0
- package/dist/commonjs/persistence/index.js +28 -0
- package/dist/commonjs/persistence/index.js.map +1 -0
- package/dist/commonjs/store.js +305 -0
- package/dist/commonjs/store.js.map +1 -0
- package/dist/commonjs/tsconfig.json +32 -0
- package/dist/commonjs/types.js +6 -0
- package/dist/commonjs/types.js.map +1 -0
- package/dist/module/babel.config.js +15 -0
- package/dist/module/babel.config.js.map +1 -0
- package/dist/module/bob.config.js +11 -0
- package/dist/module/bob.config.js.map +1 -0
- package/dist/module/components/GuidonOverlay.js +201 -0
- package/dist/module/components/GuidonOverlay.js.map +1 -0
- package/dist/module/components/GuidonProvider.js +152 -0
- package/dist/module/components/GuidonProvider.js.map +1 -0
- package/dist/module/components/GuidonTarget.js +104 -0
- package/dist/module/components/GuidonTarget.js.map +1 -0
- package/dist/module/components/GuidonTooltip.js +417 -0
- package/dist/module/components/GuidonTooltip.js.map +1 -0
- package/dist/module/components/index.js +7 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/hooks/index.js +4 -0
- package/dist/module/hooks/index.js.map +1 -0
- package/dist/module/hooks/useGuidonRef.js +129 -0
- package/dist/module/hooks/useGuidonRef.js.map +1 -0
- package/dist/module/index.js +17 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/persistence/adapters.js +203 -0
- package/dist/module/persistence/adapters.js.map +1 -0
- package/dist/module/persistence/hooks.js +148 -0
- package/dist/module/persistence/hooks.js.map +1 -0
- package/dist/module/persistence/index.js +5 -0
- package/dist/module/persistence/index.js.map +1 -0
- package/dist/module/store.js +295 -0
- package/dist/module/store.js.map +1 -0
- package/dist/module/tsconfig.json +32 -0
- package/dist/module/types.js +4 -0
- package/dist/module/types.js.map +1 -0
- package/dist/typescript/commonjs/components/GuidonOverlay.d.ts +9 -0
- package/dist/typescript/commonjs/components/GuidonOverlay.d.ts.map +1 -0
- package/dist/typescript/commonjs/components/GuidonProvider.d.ts +14 -0
- package/dist/typescript/commonjs/components/GuidonProvider.d.ts.map +1 -0
- package/dist/typescript/commonjs/components/GuidonTarget.d.ts +7 -0
- package/dist/typescript/commonjs/components/GuidonTarget.d.ts.map +1 -0
- package/dist/typescript/commonjs/components/GuidonTooltip.d.ts +24 -0
- package/dist/typescript/commonjs/components/GuidonTooltip.d.ts.map +1 -0
- package/dist/typescript/commonjs/components/index.d.ts +5 -0
- package/dist/typescript/commonjs/components/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/hooks/index.d.ts +2 -0
- package/dist/typescript/commonjs/hooks/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/hooks/useGuidonRef.d.ts +35 -0
- package/dist/typescript/commonjs/hooks/useGuidonRef.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +7 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/package.json +1 -0
- package/dist/typescript/commonjs/persistence/adapters.d.ts +57 -0
- package/dist/typescript/commonjs/persistence/adapters.d.ts.map +1 -0
- package/dist/typescript/commonjs/persistence/hooks.d.ts +29 -0
- package/dist/typescript/commonjs/persistence/hooks.d.ts.map +1 -0
- package/dist/typescript/commonjs/persistence/index.d.ts +3 -0
- package/dist/typescript/commonjs/persistence/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/store.d.ts +89 -0
- package/dist/typescript/commonjs/store.d.ts.map +1 -0
- package/dist/{index-D_JFvCIg.d.mts → typescript/commonjs/types.d.ts} +40 -104
- package/dist/typescript/commonjs/types.d.ts.map +1 -0
- package/dist/typescript/module/components/GuidonOverlay.d.ts +9 -0
- package/dist/typescript/module/components/GuidonOverlay.d.ts.map +1 -0
- package/dist/typescript/module/components/GuidonProvider.d.ts +14 -0
- package/dist/typescript/module/components/GuidonProvider.d.ts.map +1 -0
- package/dist/typescript/module/components/GuidonTarget.d.ts +7 -0
- package/dist/typescript/module/components/GuidonTarget.d.ts.map +1 -0
- package/dist/typescript/module/components/GuidonTooltip.d.ts +24 -0
- package/dist/typescript/module/components/GuidonTooltip.d.ts.map +1 -0
- package/dist/typescript/module/components/index.d.ts +5 -0
- package/dist/typescript/module/components/index.d.ts.map +1 -0
- package/dist/typescript/module/hooks/index.d.ts +2 -0
- package/dist/typescript/module/hooks/index.d.ts.map +1 -0
- package/dist/typescript/module/hooks/useGuidonRef.d.ts +35 -0
- package/dist/typescript/module/hooks/useGuidonRef.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +7 -0
- package/dist/typescript/module/index.d.ts.map +1 -0
- package/dist/typescript/module/package.json +1 -0
- package/dist/typescript/module/persistence/adapters.d.ts +57 -0
- package/dist/typescript/module/persistence/adapters.d.ts.map +1 -0
- package/dist/typescript/module/persistence/hooks.d.ts +29 -0
- package/dist/typescript/module/persistence/hooks.d.ts.map +1 -0
- package/dist/typescript/module/persistence/index.d.ts +3 -0
- package/dist/typescript/module/persistence/index.d.ts.map +1 -0
- package/dist/typescript/module/store.d.ts +89 -0
- package/dist/typescript/module/store.d.ts.map +1 -0
- package/dist/{index-D_JFvCIg.d.ts → typescript/module/types.d.ts} +40 -104
- package/dist/typescript/module/types.d.ts.map +1 -0
- package/package.json +25 -13
- package/src/babel.config.js +18 -0
- package/src/bob.config.js +14 -0
- package/src/components/GuidonOverlay.tsx +60 -4
- package/src/components/GuidonProvider.tsx +29 -1
- package/src/components/GuidonTarget.tsx +26 -16
- package/src/components/GuidonTooltip.tsx +143 -9
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useGuidonRef.ts +154 -0
- package/src/index.ts +6 -0
- package/src/store.ts +40 -0
- package/src/tsconfig.json +32 -0
- package/src/types.ts +32 -2
- package/dist/index.d.mts +0 -128
- package/dist/index.d.ts +0 -128
- package/dist/index.js +0 -1097
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -1072
- package/dist/index.mjs.map +0 -1
- package/dist/persistence/index.d.mts +0 -2
- package/dist/persistence/index.d.ts +0 -2
- package/dist/persistence/index.js +0 -300
- package/dist/persistence/index.js.map +0 -1
- package/dist/persistence/index.mjs +0 -291
- package/dist/persistence/index.mjs.map +0 -1
package/dist/index.d.mts
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { G as GuidonTargetProps, a as GuidonTheme, b as GuidonStep, c as GuidonProviderProps, d as GuidonStore, e as GuidonConfig, T as TargetMeasurements } from './index-D_JFvCIg.mjs';
|
|
3
|
-
export { l as GuidonActions, g as GuidonPersistenceAdapter, f as GuidonProgress, k as GuidonState, h as GuidonTooltipLabels, i as GuidonTooltipRenderProps, j as TooltipPosition, q as createApiAdapter, p as createAsyncStorageAdapter, r as createCompositeAdapter, o as createLocalStorageAdapter, n as createMemoryAdapter, m as createNoopAdapter, u as useGuidonPersistence, s as useShouldShowGuidon } from './index-D_JFvCIg.mjs';
|
|
4
|
-
import * as zustand from 'zustand';
|
|
5
|
-
import 'react';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Wrapper component that marks an element as a walkthrough target
|
|
9
|
-
* Automatically measures and reports its position to the walkthrough store
|
|
10
|
-
*/
|
|
11
|
-
declare function GuidonTarget({ children, targetId, active, }: GuidonTargetProps): react_jsx_runtime.JSX.Element;
|
|
12
|
-
|
|
13
|
-
interface GuidonOverlayProps {
|
|
14
|
-
theme?: GuidonTheme;
|
|
15
|
-
animationDuration?: number;
|
|
16
|
-
onBackdropPress?: () => void;
|
|
17
|
-
}
|
|
18
|
-
declare function GuidonOverlay({ theme, animationDuration, onBackdropPress, }: GuidonOverlayProps): react_jsx_runtime.JSX.Element | null;
|
|
19
|
-
|
|
20
|
-
interface GuidonTooltipProps {
|
|
21
|
-
theme?: GuidonTheme;
|
|
22
|
-
animationDuration?: number;
|
|
23
|
-
renderCustomTooltip?: (props: {
|
|
24
|
-
step: GuidonStep;
|
|
25
|
-
currentIndex: number;
|
|
26
|
-
totalSteps: number;
|
|
27
|
-
onNext: () => void;
|
|
28
|
-
onPrevious: () => void;
|
|
29
|
-
onSkip: () => void;
|
|
30
|
-
}) => React.ReactNode;
|
|
31
|
-
labels?: {
|
|
32
|
-
next?: string;
|
|
33
|
-
previous?: string;
|
|
34
|
-
skip?: string;
|
|
35
|
-
finish?: string;
|
|
36
|
-
stepOf?: (current: number, total: number) => string;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
declare function GuidonTooltip({ theme, animationDuration, renderCustomTooltip, labels, }: GuidonTooltipProps): react_jsx_runtime.JSX.Element | null;
|
|
40
|
-
|
|
41
|
-
interface GuidonContextValue {
|
|
42
|
-
start: () => void;
|
|
43
|
-
skip: () => void;
|
|
44
|
-
reset: () => void;
|
|
45
|
-
replay: () => Promise<void>;
|
|
46
|
-
isActive: boolean;
|
|
47
|
-
isCompleted: boolean;
|
|
48
|
-
isLoading: boolean;
|
|
49
|
-
}
|
|
50
|
-
declare function useGuidonContext(): GuidonContextValue;
|
|
51
|
-
declare function GuidonProvider({ children, config, autoStart, shouldStart, persistenceAdapter, portalComponent: Portal, renderTooltip, tooltipLabels, onBackdropPress, }: GuidonProviderProps): react_jsx_runtime.JSX.Element;
|
|
52
|
-
|
|
53
|
-
declare const useGuidonStore: zustand.UseBoundStore<zustand.StoreApi<GuidonStore>>;
|
|
54
|
-
/**
|
|
55
|
-
* Guidon API for external control
|
|
56
|
-
* Can be used outside of React components
|
|
57
|
-
*/
|
|
58
|
-
declare const Guidon: {
|
|
59
|
-
/**
|
|
60
|
-
* Configure the walkthrough with steps and options
|
|
61
|
-
*/
|
|
62
|
-
configure: (config: GuidonConfig) => void;
|
|
63
|
-
/**
|
|
64
|
-
* Start the walkthrough
|
|
65
|
-
*/
|
|
66
|
-
start: () => void;
|
|
67
|
-
/**
|
|
68
|
-
* Go to the next step
|
|
69
|
-
*/
|
|
70
|
-
next: () => void;
|
|
71
|
-
/**
|
|
72
|
-
* Go to the previous step
|
|
73
|
-
*/
|
|
74
|
-
previous: () => void;
|
|
75
|
-
/**
|
|
76
|
-
* Go to a specific step by index
|
|
77
|
-
*/
|
|
78
|
-
goToStep: (index: number) => void;
|
|
79
|
-
/**
|
|
80
|
-
* Skip the walkthrough
|
|
81
|
-
*/
|
|
82
|
-
skip: () => void;
|
|
83
|
-
/**
|
|
84
|
-
* Complete the walkthrough
|
|
85
|
-
*/
|
|
86
|
-
complete: () => void;
|
|
87
|
-
/**
|
|
88
|
-
* Reset the walkthrough to initial state
|
|
89
|
-
*/
|
|
90
|
-
reset: () => void;
|
|
91
|
-
/**
|
|
92
|
-
* Check if the walkthrough is currently active
|
|
93
|
-
*/
|
|
94
|
-
isActive: () => boolean;
|
|
95
|
-
/**
|
|
96
|
-
* Check if the walkthrough has been completed
|
|
97
|
-
*/
|
|
98
|
-
isCompleted: () => boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Get the current step index
|
|
101
|
-
*/
|
|
102
|
-
getCurrentStepIndex: () => number;
|
|
103
|
-
/**
|
|
104
|
-
* Get the current step
|
|
105
|
-
*/
|
|
106
|
-
getCurrentStep: () => GuidonStep | null;
|
|
107
|
-
/**
|
|
108
|
-
* Get all steps
|
|
109
|
-
*/
|
|
110
|
-
getSteps: () => GuidonStep[];
|
|
111
|
-
/**
|
|
112
|
-
* Subscribe to store changes
|
|
113
|
-
*/
|
|
114
|
-
subscribe: (listener: (state: GuidonStore, prevState: GuidonStore) => void) => () => void;
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* Hook selectors for common use cases
|
|
118
|
-
*/
|
|
119
|
-
declare const useGuidonActive: () => boolean;
|
|
120
|
-
declare const useGuidonStep: () => GuidonStep | null;
|
|
121
|
-
declare const useGuidonProgress: () => {
|
|
122
|
-
currentStep: number;
|
|
123
|
-
totalSteps: number;
|
|
124
|
-
percentage: number;
|
|
125
|
-
};
|
|
126
|
-
declare const useTargetMeasurements: (targetId: string) => TargetMeasurements;
|
|
127
|
-
|
|
128
|
-
export { Guidon, GuidonConfig, GuidonOverlay, GuidonProvider, GuidonProviderProps, GuidonStep, GuidonStore, GuidonTarget, GuidonTargetProps, GuidonTheme, GuidonTooltip, TargetMeasurements, useGuidonActive, useGuidonContext, useGuidonProgress, useGuidonStep, useGuidonStore, useTargetMeasurements };
|
package/dist/index.d.ts
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { G as GuidonTargetProps, a as GuidonTheme, b as GuidonStep, c as GuidonProviderProps, d as GuidonStore, e as GuidonConfig, T as TargetMeasurements } from './index-D_JFvCIg.js';
|
|
3
|
-
export { l as GuidonActions, g as GuidonPersistenceAdapter, f as GuidonProgress, k as GuidonState, h as GuidonTooltipLabels, i as GuidonTooltipRenderProps, j as TooltipPosition, q as createApiAdapter, p as createAsyncStorageAdapter, r as createCompositeAdapter, o as createLocalStorageAdapter, n as createMemoryAdapter, m as createNoopAdapter, u as useGuidonPersistence, s as useShouldShowGuidon } from './index-D_JFvCIg.js';
|
|
4
|
-
import * as zustand from 'zustand';
|
|
5
|
-
import 'react';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Wrapper component that marks an element as a walkthrough target
|
|
9
|
-
* Automatically measures and reports its position to the walkthrough store
|
|
10
|
-
*/
|
|
11
|
-
declare function GuidonTarget({ children, targetId, active, }: GuidonTargetProps): react_jsx_runtime.JSX.Element;
|
|
12
|
-
|
|
13
|
-
interface GuidonOverlayProps {
|
|
14
|
-
theme?: GuidonTheme;
|
|
15
|
-
animationDuration?: number;
|
|
16
|
-
onBackdropPress?: () => void;
|
|
17
|
-
}
|
|
18
|
-
declare function GuidonOverlay({ theme, animationDuration, onBackdropPress, }: GuidonOverlayProps): react_jsx_runtime.JSX.Element | null;
|
|
19
|
-
|
|
20
|
-
interface GuidonTooltipProps {
|
|
21
|
-
theme?: GuidonTheme;
|
|
22
|
-
animationDuration?: number;
|
|
23
|
-
renderCustomTooltip?: (props: {
|
|
24
|
-
step: GuidonStep;
|
|
25
|
-
currentIndex: number;
|
|
26
|
-
totalSteps: number;
|
|
27
|
-
onNext: () => void;
|
|
28
|
-
onPrevious: () => void;
|
|
29
|
-
onSkip: () => void;
|
|
30
|
-
}) => React.ReactNode;
|
|
31
|
-
labels?: {
|
|
32
|
-
next?: string;
|
|
33
|
-
previous?: string;
|
|
34
|
-
skip?: string;
|
|
35
|
-
finish?: string;
|
|
36
|
-
stepOf?: (current: number, total: number) => string;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
declare function GuidonTooltip({ theme, animationDuration, renderCustomTooltip, labels, }: GuidonTooltipProps): react_jsx_runtime.JSX.Element | null;
|
|
40
|
-
|
|
41
|
-
interface GuidonContextValue {
|
|
42
|
-
start: () => void;
|
|
43
|
-
skip: () => void;
|
|
44
|
-
reset: () => void;
|
|
45
|
-
replay: () => Promise<void>;
|
|
46
|
-
isActive: boolean;
|
|
47
|
-
isCompleted: boolean;
|
|
48
|
-
isLoading: boolean;
|
|
49
|
-
}
|
|
50
|
-
declare function useGuidonContext(): GuidonContextValue;
|
|
51
|
-
declare function GuidonProvider({ children, config, autoStart, shouldStart, persistenceAdapter, portalComponent: Portal, renderTooltip, tooltipLabels, onBackdropPress, }: GuidonProviderProps): react_jsx_runtime.JSX.Element;
|
|
52
|
-
|
|
53
|
-
declare const useGuidonStore: zustand.UseBoundStore<zustand.StoreApi<GuidonStore>>;
|
|
54
|
-
/**
|
|
55
|
-
* Guidon API for external control
|
|
56
|
-
* Can be used outside of React components
|
|
57
|
-
*/
|
|
58
|
-
declare const Guidon: {
|
|
59
|
-
/**
|
|
60
|
-
* Configure the walkthrough with steps and options
|
|
61
|
-
*/
|
|
62
|
-
configure: (config: GuidonConfig) => void;
|
|
63
|
-
/**
|
|
64
|
-
* Start the walkthrough
|
|
65
|
-
*/
|
|
66
|
-
start: () => void;
|
|
67
|
-
/**
|
|
68
|
-
* Go to the next step
|
|
69
|
-
*/
|
|
70
|
-
next: () => void;
|
|
71
|
-
/**
|
|
72
|
-
* Go to the previous step
|
|
73
|
-
*/
|
|
74
|
-
previous: () => void;
|
|
75
|
-
/**
|
|
76
|
-
* Go to a specific step by index
|
|
77
|
-
*/
|
|
78
|
-
goToStep: (index: number) => void;
|
|
79
|
-
/**
|
|
80
|
-
* Skip the walkthrough
|
|
81
|
-
*/
|
|
82
|
-
skip: () => void;
|
|
83
|
-
/**
|
|
84
|
-
* Complete the walkthrough
|
|
85
|
-
*/
|
|
86
|
-
complete: () => void;
|
|
87
|
-
/**
|
|
88
|
-
* Reset the walkthrough to initial state
|
|
89
|
-
*/
|
|
90
|
-
reset: () => void;
|
|
91
|
-
/**
|
|
92
|
-
* Check if the walkthrough is currently active
|
|
93
|
-
*/
|
|
94
|
-
isActive: () => boolean;
|
|
95
|
-
/**
|
|
96
|
-
* Check if the walkthrough has been completed
|
|
97
|
-
*/
|
|
98
|
-
isCompleted: () => boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Get the current step index
|
|
101
|
-
*/
|
|
102
|
-
getCurrentStepIndex: () => number;
|
|
103
|
-
/**
|
|
104
|
-
* Get the current step
|
|
105
|
-
*/
|
|
106
|
-
getCurrentStep: () => GuidonStep | null;
|
|
107
|
-
/**
|
|
108
|
-
* Get all steps
|
|
109
|
-
*/
|
|
110
|
-
getSteps: () => GuidonStep[];
|
|
111
|
-
/**
|
|
112
|
-
* Subscribe to store changes
|
|
113
|
-
*/
|
|
114
|
-
subscribe: (listener: (state: GuidonStore, prevState: GuidonStore) => void) => () => void;
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* Hook selectors for common use cases
|
|
118
|
-
*/
|
|
119
|
-
declare const useGuidonActive: () => boolean;
|
|
120
|
-
declare const useGuidonStep: () => GuidonStep | null;
|
|
121
|
-
declare const useGuidonProgress: () => {
|
|
122
|
-
currentStep: number;
|
|
123
|
-
totalSteps: number;
|
|
124
|
-
percentage: number;
|
|
125
|
-
};
|
|
126
|
-
declare const useTargetMeasurements: (targetId: string) => TargetMeasurements;
|
|
127
|
-
|
|
128
|
-
export { Guidon, GuidonConfig, GuidonOverlay, GuidonProvider, GuidonProviderProps, GuidonStep, GuidonStore, GuidonTarget, GuidonTargetProps, GuidonTheme, GuidonTooltip, TargetMeasurements, useGuidonActive, useGuidonContext, useGuidonProgress, useGuidonStep, useGuidonStore, useTargetMeasurements };
|