@itcase/storybook-config 1.0.18 → 1.0.19
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,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/storybook-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"author": "ITCase",
|
|
5
5
|
"description": "Code style linter configuration presets",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20.12.0"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
+
"build": "npm run build-js",
|
|
11
|
+
"build-js": "rm -rf dist && NODE_ENV=production rollup -c",
|
|
10
12
|
"prepare": "husky",
|
|
11
13
|
"storybook-react": "storybook dev -p 6006 --config-dir .storybook-react",
|
|
12
14
|
"storybook-next-js": "storybook dev -p 6006 -c .storybook-next-js",
|
|
@@ -20,10 +22,22 @@
|
|
|
20
22
|
"url": "https://github.com/ITCase/itcase-storybook-config.git"
|
|
21
23
|
},
|
|
22
24
|
"main": "config/index.js",
|
|
25
|
+
"exports": {
|
|
26
|
+
"./components/*": {
|
|
27
|
+
"types": "./dist/types/components/*/index.d.ts",
|
|
28
|
+
"import": "./dist/components/*.js",
|
|
29
|
+
"require": "./dist/cjs/components/*.js"
|
|
30
|
+
},
|
|
31
|
+
"./comfig/*": {
|
|
32
|
+
"types": "./dist/types/config/*/index.d.ts",
|
|
33
|
+
"import": "./dist/config/*.js",
|
|
34
|
+
"require": "./dist/cjs/config/*.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
23
37
|
"files": [
|
|
24
38
|
"README.md",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
39
|
+
"config",
|
|
40
|
+
"dist"
|
|
27
41
|
],
|
|
28
42
|
"publishConfig": {
|
|
29
43
|
"access": "public",
|
|
@@ -34,15 +48,13 @@
|
|
|
34
48
|
},
|
|
35
49
|
"dependencies": {
|
|
36
50
|
"@itcase/config": "^1.0.7",
|
|
37
|
-
"@storybook/addon-designs": "^8.2.0",
|
|
38
|
-
"storybook-addon-source-link": "^0.2.1",
|
|
39
51
|
"@itcase/storybook-addon-auth": "^1.0.4",
|
|
40
52
|
"@storybook/addon-actions": "^8.5.5",
|
|
41
53
|
"@storybook/addon-controls": "^8.5.5",
|
|
54
|
+
"@storybook/addon-designs": "^8.2.0",
|
|
42
55
|
"@storybook/addon-essentials": "^8.5.5",
|
|
43
56
|
"@storybook/addon-interactions": "^8.5.5",
|
|
44
57
|
"@storybook/addon-links": "^8.5.5",
|
|
45
|
-
"@storybook/react-vite": "^8.5.5",
|
|
46
58
|
"@storybook/addon-styling-webpack": "^1.0.1",
|
|
47
59
|
"@storybook/addon-themes": "^8.5.5",
|
|
48
60
|
"@storybook/addon-viewport": "^8.5.5",
|
|
@@ -52,32 +64,41 @@
|
|
|
52
64
|
"@storybook/nextjs": "^8.5.5",
|
|
53
65
|
"@storybook/preview-api": "^8.5.5",
|
|
54
66
|
"@storybook/react": "^8.5.5",
|
|
67
|
+
"@storybook/react-vite": "^8.5.5",
|
|
55
68
|
"@storybook/react-webpack5": "^8.5.5",
|
|
56
69
|
"@storybook/theming": "^8.5.5",
|
|
57
70
|
"http-proxy-middleware": "^3.0.3",
|
|
58
71
|
"msw": "^2.7.0",
|
|
59
72
|
"msw-storybook-addon": "^2.0.4",
|
|
60
73
|
"react-docgen": "^7.1.1",
|
|
61
|
-
"react-docgen-typescript-plugin": "^1.0.8"
|
|
74
|
+
"react-docgen-typescript-plugin": "^1.0.8",
|
|
75
|
+
"storybook-addon-source-link": "^0.2.1"
|
|
62
76
|
},
|
|
63
77
|
"devDependencies": {
|
|
64
|
-
"react": "^18",
|
|
65
|
-
"react-dom": "^18",
|
|
66
|
-
"@types/react": "^18",
|
|
67
|
-
"@types/react-dom": "^18",
|
|
68
78
|
"@commitlint/cli": "^19.7.1",
|
|
69
79
|
"@commitlint/config-conventional": "^19.7.1",
|
|
70
80
|
"@itcase/common": "^1.2.17",
|
|
71
|
-
"@itcase/lint": "^1.0.
|
|
81
|
+
"@itcase/lint": "^1.0.41",
|
|
72
82
|
"@itcase/ui": "^1.3.25",
|
|
83
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
84
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
85
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
73
86
|
"@semantic-release/changelog": "^6.0.3",
|
|
74
87
|
"@semantic-release/git": "^10.0.1",
|
|
75
88
|
"@semantic-release/release-notes-generator": "14.0.3",
|
|
89
|
+
"@types/react": "^18",
|
|
90
|
+
"@types/react-dom": "^18",
|
|
76
91
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
77
92
|
"eslint": "9.20.1",
|
|
93
|
+
"glob": "^11.0.1",
|
|
78
94
|
"husky": "^9.1.7",
|
|
79
95
|
"lint-staged": "^15.4.3",
|
|
80
96
|
"prettier": "^3.5.0",
|
|
97
|
+
"react": "^18",
|
|
98
|
+
"react-dom": "^18",
|
|
99
|
+
"rollup": "^4.34.6",
|
|
100
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
101
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
81
102
|
"semantic-release": "^24.2.2",
|
|
82
103
|
"storybook": "^8.5.5",
|
|
83
104
|
"stylelint": "^16.14.1",
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react'
|
|
2
|
-
|
|
3
|
-
let BACKEND_URL = process.env.EMAIL_URL
|
|
4
|
-
|
|
5
|
-
if (process.env.NODE_ENV === 'production') {
|
|
6
|
-
BACKEND_URL = `${process.env.REST_BASE_URL}/storybook`
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function EmailTemplatePreview(props) {
|
|
10
|
-
const style = {
|
|
11
|
-
width: '100%',
|
|
12
|
-
height: '100%',
|
|
13
|
-
position: 'absolute',
|
|
14
|
-
top: '0',
|
|
15
|
-
right: '0',
|
|
16
|
-
bottom: '0',
|
|
17
|
-
left: '0',
|
|
18
|
-
overflow: 'hidden',
|
|
19
|
-
border: '0',
|
|
20
|
-
overflowX: 'hidden',
|
|
21
|
-
overflowY: 'hidden',
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
const emailPreviewIframe = document.getElementById('emailPreview')
|
|
26
|
-
const loaded = () => {
|
|
27
|
-
const email = emailPreviewIframe.getElementsByClassName('email-body').length
|
|
28
|
-
if (!email) {
|
|
29
|
-
alert(
|
|
30
|
-
'Need to run the backend server to display email templates, use: python manage.py runserver',
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
emailPreviewIframe.addEventListener('load', loaded, true)
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<React.Fragment>
|
|
39
|
-
<iframe
|
|
40
|
-
width="100%"
|
|
41
|
-
height="100%"
|
|
42
|
-
id="emailPreview"
|
|
43
|
-
src={`${BACKEND_URL}${props.url}`}
|
|
44
|
-
style={style}
|
|
45
|
-
/>
|
|
46
|
-
</React.Fragment>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { EmailTemplatePreview }
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from 'react'
|
|
2
|
-
|
|
3
|
-
function FormSubmitWrapper(props) {
|
|
4
|
-
const formRef = useRef()
|
|
5
|
-
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
if (formRef?.current) {
|
|
8
|
-
formRef.current.submit()
|
|
9
|
-
}
|
|
10
|
-
}, [formRef])
|
|
11
|
-
|
|
12
|
-
return React.cloneElement(props.children, {
|
|
13
|
-
ref: formRef,
|
|
14
|
-
})
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { FormSubmitWrapper }
|