shinkansen-engine 1.2.355 → 1.2.358
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/babel.config.cjs +1 -0
- package/package.json +41 -40
- package/src/common/index.mjs +7 -0
- package/src/engine/index.jsx +10 -12
package/babel.config.cjs
CHANGED
|
@@ -204,6 +204,7 @@ const plugins = [
|
|
|
204
204
|
/**
|
|
205
205
|
* Storybook & Jest - Engine
|
|
206
206
|
*/
|
|
207
|
+
'shinkansen-engine/common': './src/common/index.mjs',
|
|
207
208
|
'shinkansen-engine/components/cogs': './src/components/cogs/index.cjs',
|
|
208
209
|
'shinkansen-engine/components/sprockets': './src/components/sprockets/index.cjs',
|
|
209
210
|
'shinkansen-engine/components/gears': './src/components/gears/index.cjs',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shinkansen-engine",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.358",
|
|
4
4
|
"description": "Shinkansen Engine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Shinkansen",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "Jonathan Perry for Modern Poacher Limited",
|
|
19
19
|
"email": "modernpoacher@modernpoacher.com",
|
|
20
|
-
"url": "
|
|
20
|
+
"url": "https://modernpoacher.com"
|
|
21
21
|
},
|
|
22
|
-
"license": "
|
|
22
|
+
"license": "ISC",
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=18.12.0"
|
|
25
25
|
},
|
|
@@ -50,57 +50,57 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"debug": "^4.3.5",
|
|
53
|
-
"shinkansen-cogs": "1.7.
|
|
54
|
-
"shinkansen-gears": "1.1.
|
|
55
|
-
"shinkansen-pantograph": "1.3.
|
|
56
|
-
"shinkansen-pinion": "1.1.
|
|
57
|
-
"shinkansen-rails": "1.0.
|
|
58
|
-
"shinkansen-signals": "1.1.
|
|
59
|
-
"shinkansen-sprockets": "1.1.
|
|
60
|
-
"shinkansen-transmission": "2.2.
|
|
53
|
+
"shinkansen-cogs": "1.7.165",
|
|
54
|
+
"shinkansen-gears": "1.1.338",
|
|
55
|
+
"shinkansen-pantograph": "1.3.217",
|
|
56
|
+
"shinkansen-pinion": "1.1.385",
|
|
57
|
+
"shinkansen-rails": "1.0.185",
|
|
58
|
+
"shinkansen-signals": "1.1.162",
|
|
59
|
+
"shinkansen-sprockets": "1.1.326",
|
|
60
|
+
"shinkansen-transmission": "2.2.183"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@babel/core": "^7.24.
|
|
64
|
-
"@babel/eslint-parser": "^7.
|
|
63
|
+
"@babel/core": "^7.24.9",
|
|
64
|
+
"@babel/eslint-parser": "^7.25.0",
|
|
65
65
|
"@babel/plugin-syntax-import-assertions": "^7.24.7",
|
|
66
|
-
"@babel/preset-env": "^7.
|
|
66
|
+
"@babel/preset-env": "^7.25.0",
|
|
67
67
|
"@babel/preset-react": "^7.24.7",
|
|
68
68
|
"@babel/register": "^7.24.6",
|
|
69
|
-
"@modernpoacher/design-system": "1.0.
|
|
70
|
-
"@modernpoacher/hooks": "^1.0.
|
|
71
|
-
"@sequencemedia/gulp": "^1.1.
|
|
72
|
-
"@sequencemedia/gulp-clean-css": "^1.0.
|
|
73
|
-
"@sequencemedia/gulp-css-purge": "^1.1.
|
|
74
|
-
"@sequencemedia/gulp-debug": "^1.0.
|
|
75
|
-
"@sequencemedia/gulp-postcss": "^1.0.
|
|
76
|
-
"@sequencemedia/gulp-sass": "^1.0.
|
|
77
|
-
"@sequencemedia/gulp-sourcemaps": "^1.0.
|
|
78
|
-
"@sequencemedia/sinon-chai": "^0.0.
|
|
79
|
-
"@storybook/addon-actions": "
|
|
80
|
-
"@storybook/addon-essentials": "
|
|
81
|
-
"@storybook/addon-links": "
|
|
82
|
-
"@storybook/react": "
|
|
83
|
-
"@storybook/react-webpack5": "
|
|
69
|
+
"@modernpoacher/design-system": "1.0.177",
|
|
70
|
+
"@modernpoacher/hooks": "^1.0.485",
|
|
71
|
+
"@sequencemedia/gulp": "^1.1.205",
|
|
72
|
+
"@sequencemedia/gulp-clean-css": "^1.0.117",
|
|
73
|
+
"@sequencemedia/gulp-css-purge": "^1.1.120",
|
|
74
|
+
"@sequencemedia/gulp-debug": "^1.0.122",
|
|
75
|
+
"@sequencemedia/gulp-postcss": "^1.0.132",
|
|
76
|
+
"@sequencemedia/gulp-sass": "^1.0.118",
|
|
77
|
+
"@sequencemedia/gulp-sourcemaps": "^1.0.122",
|
|
78
|
+
"@sequencemedia/sinon-chai": "^0.0.10",
|
|
79
|
+
"@storybook/addon-actions": "7.6.20",
|
|
80
|
+
"@storybook/addon-essentials": "7.6.20",
|
|
81
|
+
"@storybook/addon-links": "7.6.20",
|
|
82
|
+
"@storybook/react": "7.6.20",
|
|
83
|
+
"@storybook/react-webpack5": "7.6.20",
|
|
84
84
|
"@types/react": "^18.3.3",
|
|
85
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
86
|
-
"@typescript-eslint/parser": "^7.
|
|
85
|
+
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
|
86
|
+
"@typescript-eslint/parser": "^7.17.0",
|
|
87
87
|
"autoprefixer": "^10.4.19",
|
|
88
88
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
89
89
|
"chai": "^5.1.1",
|
|
90
90
|
"core-js": "^3.37.1",
|
|
91
91
|
"cross-env": "^7.0.3",
|
|
92
|
-
"cssnano": "^7.0.
|
|
92
|
+
"cssnano": "^7.0.4",
|
|
93
93
|
"del": "^7.1.0",
|
|
94
94
|
"eslint": "8.57.0",
|
|
95
95
|
"eslint-config-love": "47.0.0",
|
|
96
96
|
"eslint-config-standard": "^17.1.0",
|
|
97
97
|
"eslint-import-resolver-babel-module": "^5.3.2",
|
|
98
|
-
"eslint-plugin-react": "^7.
|
|
98
|
+
"eslint-plugin-react": "^7.35.0",
|
|
99
99
|
"glob-all": "^3.3.1",
|
|
100
|
-
"husky": "^9.
|
|
100
|
+
"husky": "^9.1.3",
|
|
101
101
|
"jest": "^29.7.0",
|
|
102
|
-
"mocha": "^10.
|
|
103
|
-
"postcss": "^8.4.
|
|
102
|
+
"mocha": "^10.7.0",
|
|
103
|
+
"postcss": "^8.4.40",
|
|
104
104
|
"postcss-easy-import": "^4.0.0",
|
|
105
105
|
"postcss-map": "^0.11.0",
|
|
106
106
|
"postcss-normalize": "^10.0.1",
|
|
@@ -108,13 +108,13 @@
|
|
|
108
108
|
"prop-types": "^15.8.1",
|
|
109
109
|
"react": "^18.3.1",
|
|
110
110
|
"react-dom": "^18.3.1",
|
|
111
|
-
"react-router": "^6.
|
|
112
|
-
"react-router-dom": "^6.
|
|
111
|
+
"react-router": "^6.25.1",
|
|
112
|
+
"react-router-dom": "^6.25.1",
|
|
113
113
|
"react-test-renderer": "^18.3.1",
|
|
114
114
|
"regenerator-runtime": "^0.14.1",
|
|
115
|
-
"sass": "^1.77.
|
|
115
|
+
"sass": "^1.77.8",
|
|
116
116
|
"sinon": "^18.0.0",
|
|
117
|
-
"storybook": "
|
|
117
|
+
"storybook": "7.6.20",
|
|
118
118
|
"vinyl-paths": "^5.0.0"
|
|
119
119
|
},
|
|
120
120
|
"imports": {
|
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"require": "./src/index.cjs",
|
|
130
130
|
"import": "./src/index.mjs"
|
|
131
131
|
},
|
|
132
|
+
"./common": "./src/common/index.mjs",
|
|
132
133
|
"./components/cogs": "./src/components/cogs/index.cjs",
|
|
133
134
|
"./components/gears": "./src/components/gears/index.cjs",
|
|
134
135
|
"./components/gears/forward": "./src/components/gears/forward/index.cjs",
|
package/src/engine/index.jsx
CHANGED
|
@@ -4,21 +4,25 @@ import PropTypes from 'prop-types'
|
|
|
4
4
|
import Pinion from 'shinkansen-engine/components/pinion'
|
|
5
5
|
import Gears from 'shinkansen-engine/components/gears'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
7
|
+
import {
|
|
8
|
+
DEFAULT_HANDLE_CHANGE
|
|
9
|
+
} from 'shinkansen-engine/common'
|
|
10
|
+
|
|
11
|
+
const DEFAULT_PARAMS = {}
|
|
12
|
+
|
|
13
|
+
const DEFAULT_GEARS = {}
|
|
10
14
|
|
|
11
15
|
export default class Engine extends Component {
|
|
12
16
|
render () {
|
|
13
17
|
const {
|
|
14
18
|
pinion,
|
|
15
|
-
params,
|
|
16
|
-
onChange,
|
|
19
|
+
params = DEFAULT_PARAMS,
|
|
20
|
+
onChange = DEFAULT_HANDLE_CHANGE,
|
|
17
21
|
gears: {
|
|
18
22
|
reverse,
|
|
19
23
|
forward,
|
|
20
24
|
pattern
|
|
21
|
-
}
|
|
25
|
+
} = DEFAULT_GEARS
|
|
22
26
|
} = this.props
|
|
23
27
|
|
|
24
28
|
return (
|
|
@@ -48,9 +52,3 @@ Engine.propTypes = {
|
|
|
48
52
|
}),
|
|
49
53
|
onChange: PropTypes.func
|
|
50
54
|
}
|
|
51
|
-
|
|
52
|
-
Engine.defaultProps = {
|
|
53
|
-
params: {},
|
|
54
|
-
gears: {},
|
|
55
|
-
onChange
|
|
56
|
-
}
|