shinkansen-engine 1.2.519 → 1.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/babel.config.cjs +3 -1
- package/eslint.config.mjs +12 -59
- package/index.d.mts +107 -0
- package/package.json +19 -14
- package/src/engine/index.jsx +4 -4
package/babel.config.cjs
CHANGED
package/eslint.config.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import globals from 'globals'
|
|
2
|
+
// @ts-ignore
|
|
2
3
|
import standard from '@sequencemedia/eslint-config-standard/configs/recommended/merge'
|
|
4
|
+
// @ts-ignore
|
|
3
5
|
import typescript from '@sequencemedia/eslint-config-typescript/configs/recommended/merge'
|
|
4
6
|
import babelParser from '@babel/eslint-parser'
|
|
5
7
|
import typescriptParser from '@typescript-eslint/parser'
|
|
@@ -58,12 +60,11 @@ export default [
|
|
|
58
60
|
]
|
|
59
61
|
},
|
|
60
62
|
/**
|
|
61
|
-
* React config for all `jsx` and `
|
|
63
|
+
* React config for all `jsx` and `jsx` files
|
|
62
64
|
*/
|
|
63
65
|
{
|
|
64
66
|
...reactPlugin.configs.flat.recommended,
|
|
65
67
|
settings: {
|
|
66
|
-
...reactPlugin.configs.flat.recommended.settings,
|
|
67
68
|
...reactSettings
|
|
68
69
|
}
|
|
69
70
|
},
|
|
@@ -111,15 +112,15 @@ export default [
|
|
|
111
112
|
}
|
|
112
113
|
}),
|
|
113
114
|
/**
|
|
114
|
-
* Standard config for all `jsx`
|
|
115
|
+
* Standard config for all `jsx`
|
|
115
116
|
*/
|
|
116
117
|
standard({
|
|
117
118
|
files: [
|
|
118
|
-
'src/**/*.
|
|
119
|
+
'src/**/*.jsx',
|
|
119
120
|
'stories/**/*.jsx'
|
|
120
121
|
],
|
|
121
122
|
ignores: [
|
|
122
|
-
'src/**/__tests__/**/*.
|
|
123
|
+
'src/**/__tests__/**/*.jsx',
|
|
123
124
|
'stories/**/__tests__/**/*.jsx'
|
|
124
125
|
],
|
|
125
126
|
languageOptions: {
|
|
@@ -148,7 +149,7 @@ export default [
|
|
|
148
149
|
}),
|
|
149
150
|
standard({
|
|
150
151
|
files: [
|
|
151
|
-
'src/**/__tests__/**/*.
|
|
152
|
+
'src/**/__tests__/**/*.jsx',
|
|
152
153
|
'stories/**/__tests__/**/*.jsx'
|
|
153
154
|
],
|
|
154
155
|
languageOptions: {
|
|
@@ -184,82 +185,34 @@ export default [
|
|
|
184
185
|
'**/*.{mts,cts}'
|
|
185
186
|
],
|
|
186
187
|
ignores: [
|
|
187
|
-
'src'
|
|
188
|
-
'stories',
|
|
189
|
-
'test'
|
|
190
|
-
],
|
|
191
|
-
languageOptions: {
|
|
192
|
-
globals: {
|
|
193
|
-
...globals.node
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}),
|
|
197
|
-
typescript({
|
|
198
|
-
files: [
|
|
199
|
-
'src/**/*.{mts,cts}',
|
|
200
|
-
'test/**/*.{mts,cts}'
|
|
201
|
-
],
|
|
202
|
-
languageOptions: {
|
|
203
|
-
globals: {
|
|
204
|
-
...globals.browser
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}),
|
|
208
|
-
/**
|
|
209
|
-
* TypeScript config for only `tsx` files
|
|
210
|
-
*/
|
|
211
|
-
typescript({
|
|
212
|
-
files: [
|
|
213
|
-
'src/**/*.tsx'
|
|
214
|
-
],
|
|
215
|
-
ignores: [
|
|
216
|
-
'src/**/__tests__/**/*.tsx'
|
|
188
|
+
'src'
|
|
217
189
|
],
|
|
218
190
|
languageOptions: {
|
|
219
191
|
parser: typescriptParser,
|
|
220
192
|
parserOptions: {
|
|
221
|
-
...reactParserOptions,
|
|
222
193
|
projectService: true,
|
|
223
194
|
project: 'tsconfig.json'
|
|
224
195
|
},
|
|
225
196
|
globals: {
|
|
226
|
-
...globals.
|
|
197
|
+
...globals.node,
|
|
198
|
+
EngineTypes: 'readonly'
|
|
227
199
|
}
|
|
228
|
-
},
|
|
229
|
-
plugins: {
|
|
230
|
-
...reactPlugins
|
|
231
|
-
},
|
|
232
|
-
rules: {
|
|
233
|
-
...reactRules
|
|
234
|
-
},
|
|
235
|
-
settings: {
|
|
236
|
-
...reactSettings
|
|
237
200
|
}
|
|
238
201
|
}),
|
|
239
202
|
typescript({
|
|
240
203
|
files: [
|
|
241
|
-
'src
|
|
204
|
+
'src/**/*.{mts,cts}'
|
|
242
205
|
],
|
|
243
206
|
languageOptions: {
|
|
244
207
|
parser: typescriptParser,
|
|
245
208
|
parserOptions: {
|
|
246
|
-
...reactParserOptions,
|
|
247
209
|
projectService: true,
|
|
248
210
|
project: 'tsconfig.json'
|
|
249
211
|
},
|
|
250
212
|
globals: {
|
|
251
213
|
...globals.browser,
|
|
252
|
-
|
|
214
|
+
EngineTypes: 'readonly'
|
|
253
215
|
}
|
|
254
|
-
},
|
|
255
|
-
plugins: {
|
|
256
|
-
...reactPlugins
|
|
257
|
-
},
|
|
258
|
-
rules: {
|
|
259
|
-
...reactRules
|
|
260
|
-
},
|
|
261
|
-
settings: {
|
|
262
|
-
...reactSettings
|
|
263
216
|
}
|
|
264
217
|
})
|
|
265
218
|
]
|
package/index.d.mts
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { PinionProps } from 'shinkansen-pinion/pinion'
|
|
2
|
+
import type { GearsProps } from 'shinkansen-gears/gears'
|
|
3
|
+
import type { CheckboxProps } from 'shinkansen-cogs/cogs/checkbox'
|
|
4
|
+
import type { EmailProps } from 'shinkansen-cogs/cogs/email'
|
|
5
|
+
import type { NumberProps } from 'shinkansen-cogs/cogs/number'
|
|
6
|
+
import type { PasswordProps } from 'shinkansen-cogs/cogs/password'
|
|
7
|
+
import type { RadioProps } from 'shinkansen-cogs/cogs/radio'
|
|
8
|
+
import type { SelectProps } from 'shinkansen-cogs/cogs/select'
|
|
9
|
+
import type { TextProps } from 'shinkansen-cogs/cogs/text'
|
|
10
|
+
import type { TextareaProps } from 'shinkansen-cogs/cogs/textarea'
|
|
11
|
+
import type { CheckAnswersProps } from 'shinkansen-sprockets/sprockets/check-answers'
|
|
12
|
+
import type { ErrorSummaryProps } from 'shinkansen-sprockets/sprockets/error-summary'
|
|
13
|
+
import type { FieldsetProps } from 'shinkansen-sprockets/sprockets/fieldset'
|
|
14
|
+
|
|
15
|
+
declare global {
|
|
16
|
+
namespace EngineTypes {
|
|
17
|
+
export type EngineProps = PinionProps & { gears: GearsProps }
|
|
18
|
+
|
|
19
|
+
export namespace Components {
|
|
20
|
+
export namespace Pinion {
|
|
21
|
+
export type {
|
|
22
|
+
PinionProps
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export namespace Gears {
|
|
27
|
+
export type {
|
|
28
|
+
GearsProps
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export namespace Cogs {
|
|
33
|
+
export namespace Cog {
|
|
34
|
+
export namespace Checkbox {
|
|
35
|
+
export type {
|
|
36
|
+
CheckboxProps
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export namespace Email {
|
|
41
|
+
export type {
|
|
42
|
+
EmailProps
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export namespace Number {
|
|
47
|
+
export type {
|
|
48
|
+
NumberProps
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export namespace Password {
|
|
53
|
+
export type {
|
|
54
|
+
PasswordProps
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export namespace Radio {
|
|
59
|
+
export type {
|
|
60
|
+
RadioProps
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export namespace Select {
|
|
65
|
+
export type {
|
|
66
|
+
SelectProps
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export namespace Text {
|
|
71
|
+
export type {
|
|
72
|
+
TextProps
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export namespace Textarea {
|
|
77
|
+
export type {
|
|
78
|
+
TextareaProps
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export namespace Sprockets {
|
|
85
|
+
export namespace Sprocket {
|
|
86
|
+
export namespace CheckAnswers {
|
|
87
|
+
export type {
|
|
88
|
+
CheckAnswersProps
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export namespace ErrorSummary {
|
|
93
|
+
export type {
|
|
94
|
+
ErrorSummaryProps
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export namespace Fieldset {
|
|
99
|
+
export type {
|
|
100
|
+
FieldsetProps
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shinkansen-engine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Shinkansen Engine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Shinkansen",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"main": "./src/index.cjs",
|
|
15
15
|
"type": "module",
|
|
16
|
-
"types": "./
|
|
16
|
+
"types": "./index.d.mts",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "Jonathan Perry for Modern Poacher Limited",
|
|
19
19
|
"email": "modernpoacher@modernpoacher.com",
|
|
@@ -51,19 +51,23 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@babel/core": "^7.26.9",
|
|
53
53
|
"@babel/eslint-parser": "^7.26.8",
|
|
54
|
-
"@babel/plugin-syntax-import-
|
|
54
|
+
"@babel/plugin-syntax-import-attributes": "^7.26.0",
|
|
55
55
|
"@babel/preset-env": "^7.26.9",
|
|
56
56
|
"@babel/preset-react": "^7.26.3",
|
|
57
57
|
"@babel/register": "^7.25.9",
|
|
58
58
|
"@modernpoacher/design-system": "1.1.27",
|
|
59
|
-
"@sequencemedia/eslint-config-standard": "^0.2.
|
|
59
|
+
"@sequencemedia/eslint-config-standard": "^0.2.25",
|
|
60
60
|
"@sequencemedia/eslint-config-typescript": "^0.1.36",
|
|
61
61
|
"@storybook/addon-actions": "7.6.20",
|
|
62
62
|
"@storybook/addon-essentials": "7.6.20",
|
|
63
63
|
"@storybook/addon-links": "7.6.20",
|
|
64
64
|
"@storybook/react": "7.6.20",
|
|
65
65
|
"@storybook/react-webpack5": "7.6.20",
|
|
66
|
+
"@types/babel__register": "^7.17.3",
|
|
67
|
+
"@types/debug": "^4.1.12",
|
|
68
|
+
"@types/jest": "^29.5.14",
|
|
66
69
|
"@types/react": "18.3.13",
|
|
70
|
+
"@types/react-test-renderer": "^19.0.0",
|
|
67
71
|
"@typescript-eslint/eslint-plugin": "^8.24.1",
|
|
68
72
|
"@typescript-eslint/parser": "^8.24.1",
|
|
69
73
|
"autoprefixer": "^10.4.20",
|
|
@@ -90,32 +94,33 @@
|
|
|
90
94
|
"prop-types": "^15.8.1",
|
|
91
95
|
"react": "18.3.1",
|
|
92
96
|
"react-dom": "18.3.1",
|
|
93
|
-
"react-router": "^7.
|
|
97
|
+
"react-router": "^7.2.0",
|
|
98
|
+
"react-router-dom": "^7.1.5",
|
|
94
99
|
"react-test-renderer": "18.3.1",
|
|
95
100
|
"remove-files-webpack-plugin": "^1.5.0",
|
|
96
101
|
"sass": "^1.85.0",
|
|
97
102
|
"sass-loader": "^16.0.5",
|
|
98
|
-
"shinkansen-cogs": "1.
|
|
103
|
+
"shinkansen-cogs": "1.8.0",
|
|
99
104
|
"shinkansen-gears": "1.1.445",
|
|
100
|
-
"shinkansen-pantograph": "1.3.
|
|
101
|
-
"shinkansen-pinion": "1.1.
|
|
102
|
-
"shinkansen-rails": "1.0.
|
|
103
|
-
"shinkansen-signals": "1.1.
|
|
104
|
-
"shinkansen-sprockets": "1.
|
|
105
|
-
"shinkansen-transmission": "2.2.
|
|
105
|
+
"shinkansen-pantograph": "1.3.343",
|
|
106
|
+
"shinkansen-pinion": "1.1.551",
|
|
107
|
+
"shinkansen-rails": "1.0.280",
|
|
108
|
+
"shinkansen-signals": "1.1.210",
|
|
109
|
+
"shinkansen-sprockets": "1.2.0",
|
|
110
|
+
"shinkansen-transmission": "2.2.230",
|
|
106
111
|
"sinon": "^19.0.2",
|
|
107
112
|
"storybook": "7.6.20",
|
|
108
113
|
"webpack": "^5.98.0",
|
|
109
114
|
"webpack-cli": "^6.0.1"
|
|
110
115
|
},
|
|
111
116
|
"peerDependencies": {
|
|
112
|
-
"shinkansen-cogs": "1.
|
|
117
|
+
"shinkansen-cogs": "1.8.x",
|
|
113
118
|
"shinkansen-gears": "1.1.x",
|
|
114
119
|
"shinkansen-pantograph": "1.3.x",
|
|
115
120
|
"shinkansen-pinion": "1.1.x",
|
|
116
121
|
"shinkansen-rails": "1.0.x",
|
|
117
122
|
"shinkansen-signals": "1.1.x",
|
|
118
|
-
"shinkansen-sprockets": "1.
|
|
123
|
+
"shinkansen-sprockets": "1.2.x",
|
|
119
124
|
"shinkansen-transmission": "2.2.x"
|
|
120
125
|
},
|
|
121
126
|
"imports": {
|
package/src/engine/index.jsx
CHANGED
|
@@ -43,11 +43,11 @@ export default class Engine extends Component {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
Engine.propTypes = {
|
|
46
|
-
pinion: PropTypes.shape().isRequired,
|
|
47
|
-
params: PropTypes.shape(),
|
|
46
|
+
pinion: PropTypes.shape({}).isRequired,
|
|
47
|
+
params: PropTypes.shape({}),
|
|
48
48
|
gears: PropTypes.shape({
|
|
49
|
-
forward: PropTypes.shape(),
|
|
50
|
-
reverse: PropTypes.shape(),
|
|
49
|
+
forward: PropTypes.shape({}),
|
|
50
|
+
reverse: PropTypes.shape({}),
|
|
51
51
|
pattern: PropTypes.string
|
|
52
52
|
}),
|
|
53
53
|
onChange: PropTypes.func
|