shinkansen-sprockets 1.1.94 → 1.1.97

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": "shinkansen-sprockets",
3
- "version": "1.1.94",
3
+ "version": "1.1.97",
4
4
  "description": "Shinkansen Sprockets",
5
5
  "keywords": [
6
6
  "Shinkansen",
@@ -12,6 +12,7 @@
12
12
  ],
13
13
  "main": "./src/index.cjs",
14
14
  "type": "module",
15
+ "types": "./src/index.d.cts",
15
16
  "author": {
16
17
  "name": "Jonathan Perry for Modern Poacher Limited",
17
18
  "email": "modernpoacher@modernpoacher.com",
@@ -19,7 +20,7 @@
19
20
  },
20
21
  "license": "MIT",
21
22
  "engines": {
22
- "node": ">=18.5.0"
23
+ "node": ">=18.12.0"
23
24
  },
24
25
  "repository": {
25
26
  "type": "git",
@@ -50,40 +51,40 @@
50
51
  "fast-deep-equal": "^3.1.3"
51
52
  },
52
53
  "devDependencies": {
53
- "@babel/core": "^7.22.15",
54
+ "@babel/core": "^7.22.17",
54
55
  "@babel/eslint-parser": "^7.22.15",
55
56
  "@babel/plugin-proposal-class-properties": "^7.18.6",
56
- "@babel/plugin-proposal-export-default-from": "^7.22.5",
57
+ "@babel/plugin-proposal-export-default-from": "^7.22.17",
57
58
  "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
58
59
  "@babel/preset-env": "^7.22.15",
59
60
  "@babel/preset-react": "^7.22.15",
60
61
  "@babel/register": "^7.22.15",
61
- "@modernpoacher/design-system": "1.0.71",
62
- "@modernpoacher/hooks": "^1.0.433",
63
- "@sequencemedia/gulp": "^1.1.70",
64
- "@sequencemedia/gulp-clean-css": "^1.0.32",
65
- "@sequencemedia/gulp-css-purge": "^1.1.25",
66
- "@sequencemedia/gulp-debug": "^1.0.36",
67
- "@sequencemedia/gulp-postcss": "^1.0.35",
68
- "@sequencemedia/gulp-sass": "^1.0.31",
69
- "@sequencemedia/gulp-sourcemaps": "^1.0.32",
62
+ "@modernpoacher/design-system": "1.0.72",
63
+ "@modernpoacher/hooks": "^1.0.434",
64
+ "@sequencemedia/gulp": "^1.1.73",
65
+ "@sequencemedia/gulp-clean-css": "^1.0.34",
66
+ "@sequencemedia/gulp-css-purge": "^1.1.27",
67
+ "@sequencemedia/gulp-debug": "^1.0.38",
68
+ "@sequencemedia/gulp-postcss": "^1.0.37",
69
+ "@sequencemedia/gulp-sass": "^1.0.33",
70
+ "@sequencemedia/gulp-sourcemaps": "^1.0.34",
70
71
  "@storybook/addon-actions": "^7.4.0",
71
72
  "@storybook/addon-essentials": "^7.4.0",
72
73
  "@storybook/addon-links": "^7.4.0",
73
74
  "@storybook/react": "^7.4.0",
74
75
  "@storybook/react-webpack5": "^7.4.0",
75
76
  "@types/react": "^18.2.21",
76
- "@typescript-eslint/eslint-plugin": "5.61.0",
77
- "@typescript-eslint/parser": "5.61.0",
77
+ "@typescript-eslint/eslint-plugin": "^6.6.0",
78
+ "@typescript-eslint/parser": "^6.6.0",
78
79
  "autoprefixer": "^10.4.15",
79
80
  "babel-plugin-module-resolver": "^5.0.0",
80
- "core-js": "^3.32.1",
81
+ "core-js": "^3.32.2",
81
82
  "cross-env": "^7.0.3",
82
83
  "cssnano": "^6.0.1",
83
84
  "del": "^7.1.0",
84
- "eslint": "^8.48.0",
85
+ "eslint": "^8.49.0",
85
86
  "eslint-config-standard": "^17.1.0",
86
- "eslint-config-standard-with-typescript": "35.0.0",
87
+ "eslint-config-standard-with-typescript": "^39.0.0",
87
88
  "eslint-import-resolver-babel-module": "^5.3.2",
88
89
  "eslint-plugin-react": "^7.33.2",
89
90
  "glob-all": "^3.3.1",
@@ -93,7 +94,7 @@
93
94
  "postcss-easy-import": "^4.0.0",
94
95
  "postcss-map": "^0.11.0",
95
96
  "postcss-normalize": "^10.0.1",
96
- "postcss-scss": "^4.0.7",
97
+ "postcss-scss": "^4.0.8",
97
98
  "prop-types": "^15.8.1",
98
99
  "react": "^18.2.0",
99
100
  "react-dom": "^18.2.0",
package/src/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  declare namespace SprocketsTypes {
2
2
  export type OnChangeType = () => void
3
3
 
4
- export type AnswerDefinitionType = {
4
+ export interface AnswerDefinitionType {
5
5
  answer: {
6
6
  title: string
7
7
  value: string | string[]
@@ -13,41 +13,39 @@ declare namespace SprocketsTypes {
13
13
  }
14
14
  }
15
15
 
16
- export type ErrorDefinitionType = {
17
- type: string,
18
- uri: string,
16
+ export interface ErrorDefinitionType {
17
+ type: string
18
+ uri: string
19
19
  params: {
20
20
  expectedType: string
21
21
  }
22
22
  }
23
23
 
24
- export type ComponentsType = {}
25
-
26
- export type FieldChangeType = {
27
- text: string,
24
+ export interface FieldChangeType {
25
+ text: string
28
26
  href: string
29
27
  }
30
28
 
31
- export type FieldErrorType = {
32
- text: string,
29
+ export interface FieldErrorType {
30
+ text: string
33
31
  href: string
34
32
  }
35
33
  }
36
34
 
37
35
  declare module 'shinkansen-sprockets/components/common/text-content' {
38
- import React from 'react'
36
+ import type React from 'react'
39
37
 
40
- export type TextContentProps = {
38
+ export interface TextContentProps {
41
39
  textContent: string
42
40
  }
43
41
 
44
- export default function TextContent(props: TextContentProps): React.JSX.Element
42
+ export default function TextContent (props: TextContentProps): React.JSX.Element
45
43
  }
46
44
 
47
45
  declare module 'shinkansen-sprockets/components/description' {
48
46
  import React from 'react'
49
47
 
50
- export type DescriptionProps = {
48
+ export interface DescriptionProps {
51
49
  description: string
52
50
  }
53
51
 
@@ -57,7 +55,7 @@ declare module 'shinkansen-sprockets/components/description' {
57
55
  declare module 'shinkansen-sprockets/components/error-message' {
58
56
  import React from 'react'
59
57
 
60
- export type ErrorMessageProps = {
58
+ export interface ErrorMessageProps {
61
59
  errorMessage: string
62
60
  }
63
61
 
@@ -67,7 +65,7 @@ declare module 'shinkansen-sprockets/components/error-message' {
67
65
  declare module 'shinkansen-sprockets/components/title' {
68
66
  import React from 'react'
69
67
 
70
- export type TitleProps = {
68
+ export interface TitleProps {
71
69
  title: string
72
70
  }
73
71
 
@@ -77,9 +75,9 @@ declare module 'shinkansen-sprockets/components/title' {
77
75
  declare module 'shinkansen-sprockets/components/group' {
78
76
  import React from 'react'
79
77
 
80
- export type GroupProps = {
81
- onChange: SprocketsTypes.OnChangeType,
82
- groupRef: object,
78
+ export interface GroupProps {
79
+ onChange: SprocketsTypes.OnChangeType
80
+ groupRef: object
83
81
  children: React.JSX.Element | React.JSX.Element[]
84
82
  }
85
83
 
@@ -155,10 +153,10 @@ declare module 'shinkansen-sprockets/sprockets/fieldset' {
155
153
  declare module 'shinkansen-sprockets/sprockets' {
156
154
  import React from 'react'
157
155
 
158
- export type SprocketProps = {
159
- title: string,
160
- onChange: SprocketsTypes.OnChangeType,
161
- groupRef: object,
156
+ export interface SprocketProps {
157
+ title: string
158
+ onChange: SprocketsTypes.OnChangeType
159
+ groupRef: object
162
160
  children: React.JSX.Element | React.JSX.Element[]
163
161
  }
164
162
 
@@ -178,7 +176,7 @@ declare module 'shinkansen-sprockets/transformers/error-summary' {
178
176
  }
179
177
 
180
178
  declare module 'shinkansen-sprockets/transformers/common' {
181
- export function getKey(href: string, text: string, index: number): string
179
+ export function getKey (href: string, text: string, index: number): string
182
180
  }
183
181
 
184
182
  declare module 'shinkansen-sprockets' {
package/tsconfig.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "NodeNext",
4
+ "target": "ESNext",
5
+ "moduleResolution": "NodeNext",
6
+ "noEmit": true,
7
+ "strict": true,
8
+ "isolatedModules": true,
9
+ "baseUrl": "."
10
+ }
11
+ }