react-shepherd 4.1.0 → 4.3.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 +166 -0
- package/dist/Shepherd.es.js +1586 -3262
- package/dist/Shepherd.es.js.map +1 -1
- package/dist/Shepherd.js +1586 -3261
- package/dist/Shepherd.js.map +1 -1
- package/dist/index.d.ts +5 -4
- package/package.json +22 -17
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
2
|
import Shepherd from 'shepherd.js';
|
|
3
3
|
import Step from 'shepherd.js/src/types/step';
|
|
4
4
|
import Tour from 'shepherd.js/src/types/tour';
|
|
5
|
-
|
|
5
|
+
type StepType = 'back' | 'cancel' | 'next';
|
|
6
6
|
export interface ShepherdButtonWithType extends Step.StepOptionsButton {
|
|
7
7
|
type?: StepType;
|
|
8
8
|
}
|
|
@@ -12,11 +12,12 @@ export interface ShepherdOptionsWithType extends Step.StepOptions {
|
|
|
12
12
|
interface ShepherdProps {
|
|
13
13
|
steps: Array<ShepherdOptionsWithType>;
|
|
14
14
|
tourOptions: Tour.TourOptions;
|
|
15
|
-
children
|
|
15
|
+
children: React.ReactNode;
|
|
16
16
|
}
|
|
17
17
|
declare const ShepherdTourContext: React.Context<Shepherd.Tour | null>;
|
|
18
18
|
declare const ShepherdTourContextConsumer: React.Consumer<Shepherd.Tour | null>;
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const useShepherdTour: ({ tourOptions, steps }: Pick<ShepherdProps, 'steps' | 'tourOptions'>) => Shepherd.Tour;
|
|
20
|
+
export declare const ShepherdTour: FC<ShepherdProps>;
|
|
20
21
|
export type { default as Step } from 'shepherd.js/src/types/step';
|
|
21
22
|
export type { default as Tour } from 'shepherd.js/src/types/tour';
|
|
22
23
|
export { ShepherdTourContextConsumer as TourMethods, ShepherdTourContext };
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-shepherd",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "A React wrapper for the site tour library Shepherd",
|
|
5
|
-
"homepage": "https://
|
|
5
|
+
"homepage": "https://react-shepherd.vercel.app/",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/shipshapecode/react-shepherd.git"
|
|
@@ -24,10 +24,14 @@
|
|
|
24
24
|
"release": "release-it",
|
|
25
25
|
"start": "rollup -c -w",
|
|
26
26
|
"test": "cross-env CI=1 jest",
|
|
27
|
-
"test:watch": "jest --watch"
|
|
27
|
+
"test:watch": "jest --watch",
|
|
28
|
+
"lint": "eslint src --ext js,jsx,ts,tsx --max-warnings 0",
|
|
29
|
+
"lint:ci": "TIMING=all yarn lint --format junit --output-file reports/junit/junit.xml",
|
|
30
|
+
"lint:fix": "yarn lint --fix"
|
|
28
31
|
},
|
|
29
32
|
"dependencies": {
|
|
30
|
-
"
|
|
33
|
+
"resize-observer-polyfill": "^1.5.1",
|
|
34
|
+
"shepherd.js": "^11.0.1"
|
|
31
35
|
},
|
|
32
36
|
"devDependencies": {
|
|
33
37
|
"@babel/core": "^7.5.4",
|
|
@@ -50,24 +54,25 @@
|
|
|
50
54
|
"@babel/plugin-syntax-import-meta": "^7.2.0",
|
|
51
55
|
"@babel/preset-env": "^7.5.4",
|
|
52
56
|
"@babel/preset-react": "^7.0.0",
|
|
53
|
-
"@svgr/rollup": "^
|
|
54
|
-
"@testing-library/react": "^
|
|
55
|
-
"@types/jest": "^
|
|
57
|
+
"@svgr/rollup": "^8.1.0",
|
|
58
|
+
"@testing-library/react": "^14.0.0",
|
|
59
|
+
"@types/jest": "^29.0.0",
|
|
56
60
|
"@types/node": "^18.0.3",
|
|
57
61
|
"@types/react": "^18.0.15",
|
|
58
62
|
"@types/react-dom": "^18.0.6",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
|
64
|
+
"@typescript-eslint/parser": "^5.30.5",
|
|
59
65
|
"cross-env": "^7.0.0",
|
|
60
|
-
"eslint": "
|
|
61
|
-
"eslint-config-
|
|
62
|
-
"eslint-
|
|
63
|
-
"eslint-plugin-import": "^2.
|
|
64
|
-
"eslint-plugin-
|
|
65
|
-
"eslint-plugin-
|
|
66
|
-
"eslint-plugin-react": "^
|
|
67
|
-
"eslint-plugin-standard": "^5.0.0",
|
|
66
|
+
"eslint": "^7.32.0 || ^8.2.0",
|
|
67
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
68
|
+
"eslint-import-resolver-typescript": "^3.2.5",
|
|
69
|
+
"eslint-plugin-import": "^2.25.3",
|
|
70
|
+
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
71
|
+
"eslint-plugin-react": "^7.28.0",
|
|
72
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
68
73
|
"install-peers-cli": "^2.2.0",
|
|
69
74
|
"jest": "^28.1.2",
|
|
70
|
-
"jest-environment-jsdom": "^
|
|
75
|
+
"jest-environment-jsdom": "^29.0.1",
|
|
71
76
|
"release-it": "^14.0.2",
|
|
72
77
|
"release-it-lerna-changelog": "^4.0.1",
|
|
73
78
|
"rollup": "^2.6.1",
|
|
@@ -87,7 +92,7 @@
|
|
|
87
92
|
"react-dom": "^17.0.2 || 18.x"
|
|
88
93
|
},
|
|
89
94
|
"engines": {
|
|
90
|
-
"node": ">=
|
|
95
|
+
"node": ">=16",
|
|
91
96
|
"npm": ">=7"
|
|
92
97
|
},
|
|
93
98
|
"publishConfig": {
|