shinkansen-engine 1.4.1 → 1.4.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/index.d.mts CHANGED
@@ -1,4 +1,8 @@
1
- import type { PinionProps } from 'shinkansen-pinion/pinion'
1
+ import type {
2
+ PinionType,
3
+ ParamsType,
4
+ PinionProps
5
+ } from 'shinkansen-pinion/pinion'
2
6
  import type { GearsProps } from 'shinkansen-gears/gears'
3
7
  import type { CheckboxProps } from 'shinkansen-cogs/cogs/checkbox'
4
8
  import type { EmailProps } from 'shinkansen-cogs/cogs/email'
@@ -19,6 +23,8 @@ declare global {
19
23
  export namespace Components {
20
24
  export namespace Pinion {
21
25
  export type {
26
+ PinionType,
27
+ ParamsType,
22
28
  PinionProps
23
29
  }
24
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shinkansen-engine",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Shinkansen Engine",
5
5
  "keywords": [
6
6
  "Shinkansen",
@@ -11,7 +11,7 @@
11
11
  "React",
12
12
  "React Router"
13
13
  ],
14
- "main": "./src/index.cjs",
14
+ "main": "./src/index.mjs",
15
15
  "type": "module",
16
16
  "types": "./index.d.mts",
17
17
  "author": {
@@ -102,7 +102,7 @@
102
102
  "sass-loader": "^16.0.5",
103
103
  "shinkansen-cogs": "1.8.13",
104
104
  "shinkansen-gears": "1.2.9",
105
- "shinkansen-pantograph": "1.3.354",
105
+ "shinkansen-pantograph": "1.4.0",
106
106
  "shinkansen-pinion": "1.3.1",
107
107
  "shinkansen-rails": "1.0.293",
108
108
  "shinkansen-signals": "1.1.222",
@@ -116,7 +116,7 @@
116
116
  "peerDependencies": {
117
117
  "shinkansen-cogs": "1.8.x",
118
118
  "shinkansen-gears": "1.2.x",
119
- "shinkansen-pantograph": "1.3.x",
119
+ "shinkansen-pantograph": "1.4.x",
120
120
  "shinkansen-pinion": "1.3.x",
121
121
  "shinkansen-rails": "1.0.x",
122
122
  "shinkansen-signals": "1.1.x",
@@ -1,3 +1,9 @@
1
+ /**
2
+ * @typedef {EngineTypes.Components.Pinion.PinionType} PinionType
3
+ * @typedef {EngineTypes.Components.Pinion.ParamsType} ParamsType
4
+ * @typedef {EngineTypes.Components.Gears.GearsProps} GearsProps
5
+ */
6
+
1
7
  import React, { Component } from 'react'
2
8
  import PropTypes from 'prop-types'
3
9
 
@@ -8,16 +14,37 @@ import {
8
14
  DEFAULT_HANDLE_CHANGE
9
15
  } from '#engine/common'
10
16
 
11
- const DEFAULT_PARAMS = {}
17
+ /**
18
+ * @type {ParamsType}
19
+ */
20
+ const DEFAULT_PARAMS = {
21
+ components: {},
22
+ errors: []
23
+ }
12
24
 
25
+ /**
26
+ * @type {GearsProps}
27
+ */
13
28
  const DEFAULT_GEARS = {}
14
29
 
15
30
  export default class Engine extends Component {
16
31
  render () {
17
32
  const {
33
+ /**
34
+ * @type {PinionType}
35
+ */
18
36
  pinion,
37
+ /**
38
+ * @type {ParamsType}
39
+ */
19
40
  params = DEFAULT_PARAMS,
41
+ /**
42
+ * @type {() => void}
43
+ */
20
44
  onChange = DEFAULT_HANDLE_CHANGE,
45
+ /**
46
+ * @type {GearsType}
47
+ */
21
48
  gears: {
22
49
  reverse,
23
50
  forward,