@modernpoacher/sprockets 0.0.7 → 0.0.9

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.
Files changed (2) hide show
  1. package/package.json +14 -13
  2. package/src/index.d.cts +14 -34
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/sprockets",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "Sprockets",
5
5
  "keywords": [
6
6
  "Sprockets",
@@ -8,6 +8,7 @@
8
8
  ],
9
9
  "main": "./src/index.cjs",
10
10
  "type": "module",
11
+ "types": "./src/index.d.cts",
11
12
  "author": {
12
13
  "name": "Jonathan Perry for Modern Poacher Limited",
13
14
  "email": "modernpoacher@modernpoacher.com",
@@ -53,23 +54,23 @@
53
54
  "@babel/preset-env": "^7.22.15",
54
55
  "@babel/preset-react": "^7.22.15",
55
56
  "@babel/register": "^7.22.15",
56
- "@modernpoacher/design-system": "1.0.71",
57
- "@modernpoacher/hooks": "^1.0.433",
58
- "@sequencemedia/gulp": "^1.1.70",
59
- "@sequencemedia/gulp-clean-css": "^1.0.32",
60
- "@sequencemedia/gulp-css-purge": "^1.1.25",
61
- "@sequencemedia/gulp-debug": "^1.0.36",
62
- "@sequencemedia/gulp-postcss": "^1.0.35",
63
- "@sequencemedia/gulp-sass": "^1.0.31",
64
- "@sequencemedia/gulp-sourcemaps": "^1.0.32",
57
+ "@modernpoacher/design-system": "1.0.72",
58
+ "@modernpoacher/hooks": "^1.0.434",
59
+ "@sequencemedia/gulp": "^1.1.71",
60
+ "@sequencemedia/gulp-clean-css": "^1.0.33",
61
+ "@sequencemedia/gulp-css-purge": "^1.1.26",
62
+ "@sequencemedia/gulp-debug": "^1.0.37",
63
+ "@sequencemedia/gulp-postcss": "^1.0.36",
64
+ "@sequencemedia/gulp-sass": "^1.0.32",
65
+ "@sequencemedia/gulp-sourcemaps": "^1.0.33",
65
66
  "@storybook/addon-actions": "^7.4.0",
66
67
  "@storybook/addon-essentials": "^7.4.0",
67
68
  "@storybook/addon-links": "^7.4.0",
68
69
  "@storybook/react": "^7.4.0",
69
70
  "@storybook/react-webpack5": "^7.4.0",
70
71
  "@types/react": "^18.2.21",
71
- "@typescript-eslint/eslint-plugin": "5.61.0",
72
- "@typescript-eslint/parser": "5.61.0",
72
+ "@typescript-eslint/eslint-plugin": "^6.6.0",
73
+ "@typescript-eslint/parser": "^6.6.0",
73
74
  "autoprefixer": "^10.4.15",
74
75
  "babel-plugin-module-resolver": "^5.0.0",
75
76
  "core-js": "^3.32.2",
@@ -78,7 +79,7 @@
78
79
  "del": "^7.1.0",
79
80
  "eslint": "^8.49.0",
80
81
  "eslint-config-standard": "^17.1.0",
81
- "eslint-config-standard-with-typescript": "35.0.0",
82
+ "eslint-config-standard-with-typescript": "^39.0.0",
82
83
  "eslint-import-resolver-babel-module": "^5.3.2",
83
84
  "eslint-plugin-react": "^7.33.2",
84
85
  "glob-all": "^3.3.1",
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[]
@@ -12,42 +12,22 @@ declare namespace SprocketsTypes {
12
12
  visuallyHiddenText?: string
13
13
  }
14
14
  }
15
-
16
- export type ErrorDefinitionType = {
17
- type: string,
18
- uri: string,
19
- params: {
20
- expectedType: string
21
- }
22
- }
23
-
24
- export type ComponentsType = {}
25
-
26
- export type FieldChangeType = {
27
- text: string,
28
- href: string
29
- }
30
-
31
- export type FieldErrorType = {
32
- text: string,
33
- href: string
34
- }
35
15
  }
36
16
 
37
17
  declare module '@modernpoacher/sprockets/components/common/text-content' {
38
- import React from 'react'
18
+ import type React from 'react'
39
19
 
40
- export type TextContentProps = {
20
+ export interface TextContentProps {
41
21
  textContent: string
42
22
  }
43
23
 
44
- export default function TextContent(props: TextContentProps): React.JSX.Element
24
+ export default function TextContent (props: TextContentProps): React.JSX.Element
45
25
  }
46
26
 
47
27
  declare module '@modernpoacher/sprockets/components/description' {
48
28
  import React from 'react'
49
29
 
50
- export type DescriptionProps = {
30
+ export interface DescriptionProps {
51
31
  description: string
52
32
  }
53
33
 
@@ -57,7 +37,7 @@ declare module '@modernpoacher/sprockets/components/description' {
57
37
  declare module '@modernpoacher/sprockets/components/error-message' {
58
38
  import React from 'react'
59
39
 
60
- export type ErrorMessageProps = {
40
+ export interface ErrorMessageProps {
61
41
  errorMessage: string
62
42
  }
63
43
 
@@ -67,7 +47,7 @@ declare module '@modernpoacher/sprockets/components/error-message' {
67
47
  declare module '@modernpoacher/sprockets/components/title' {
68
48
  import React from 'react'
69
49
 
70
- export type TitleProps = {
50
+ export interface TitleProps {
71
51
  title: string
72
52
  }
73
53
 
@@ -77,9 +57,9 @@ declare module '@modernpoacher/sprockets/components/title' {
77
57
  declare module '@modernpoacher/sprockets/components/group' {
78
58
  import React from 'react'
79
59
 
80
- export type GroupProps = {
81
- onChange: SprocketsTypes.OnChangeType,
82
- groupRef: object,
60
+ export interface GroupProps {
61
+ onChange: SprocketsTypes.OnChangeType
62
+ groupRef: object
83
63
  children: React.JSX.Element | React.JSX.Element[]
84
64
  }
85
65
 
@@ -155,10 +135,10 @@ declare module '@modernpoacher/sprockets/sprockets/fieldset' {
155
135
  declare module '@modernpoacher/sprockets/sprockets' {
156
136
  import React from 'react'
157
137
 
158
- export type SprocketProps = {
159
- title: string,
160
- onChange: SprocketsTypes.OnChangeType,
161
- groupRef: object,
138
+ export interface SprocketProps {
139
+ title: string
140
+ onChange: SprocketsTypes.OnChangeType
141
+ groupRef: object
162
142
  children: React.JSX.Element | React.JSX.Element[]
163
143
  }
164
144