@rpg-engine/long-bow 0.8.177 → 0.8.178

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.8.177",
3
+ "version": "0.8.178",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -18,6 +18,7 @@ interface IStepperProps {
18
18
  onClick: (() => void) | (() => Promise<void>) | ((e: any) => Promise<void>);
19
19
  };
20
20
  onError?: (message: string) => void;
21
+ onStepChange?: (stepIndex: number) => void;
21
22
  useSideArrows?: boolean; // New prop to control arrow position
22
23
  styles?: {
23
24
  stepperProgressColor?: string;
@@ -28,6 +29,7 @@ export const Stepper: React.FC<IStepperProps> = ({
28
29
  steps,
29
30
  finalCTAButton,
30
31
  onError,
32
+ onStepChange: onStepChangeProp,
31
33
  useSideArrows = false, // Default to false for backwards compatibility
32
34
  styles,
33
35
  }) => {
@@ -60,6 +62,7 @@ export const Stepper: React.FC<IStepperProps> = ({
60
62
  }
61
63
  }
62
64
  setCurrentStep(step);
65
+ onStepChangeProp?.(step);
63
66
  };
64
67
 
65
68
  const renderArrows = () => {
@@ -16,11 +16,12 @@ export interface ITutorialLesson {
16
16
  export interface ITutorialStepperProps {
17
17
  lessons: ITutorialLesson[];
18
18
  onLessonFinish: () => void;
19
+ onStepChange?: (stepIndex: number) => void;
19
20
  imageStyle?: CSSProperties;
20
21
  }
21
22
 
22
23
  export const TutorialStepper = React.memo(
23
- ({ lessons, onLessonFinish, imageStyle }: ITutorialStepperProps) => {
24
+ ({ lessons, onLessonFinish, onStepChange, imageStyle }: ITutorialStepperProps) => {
24
25
  const generateLessons = useMemo(
25
26
  () =>
26
27
  lessons.map((lesson, index) => ({
@@ -74,6 +75,7 @@ export const TutorialStepper = React.memo(
74
75
  label: 'Close',
75
76
  onClick: onLessonFinish,
76
77
  }}
78
+ onStepChange={onStepChange}
77
79
  useSideArrows
78
80
  />
79
81
  </Container>