@papillonarts/setup 0.17.0 → 0.19.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/eslint/index.d.mts +1 -1
- package/eslint/index.d.mts.map +1 -1
- package/eslint/index.mjs +2 -1
- package/jest/config.d.ts +1 -0
- package/jest/config.d.ts.map +1 -1
- package/jest/config.js +6 -2
- package/jest/setup.d.ts.map +1 -1
- package/jest/setup.js +1 -0
- package/package.json +3 -3
- package/storybook/mainSetup.d.ts +5 -7
- package/storybook/mainSetup.d.ts.map +1 -1
- package/storybook/mainSetup.js +60 -77
- package/storybook/managerSetup.d.ts.map +1 -1
- package/storybook/managerSetup.js +1 -0
- package/storybook/previewSetup.d.ts +2 -9
- package/storybook/previewSetup.d.ts.map +1 -1
- package/storybook/previewSetup.js +55 -39
- package/webpack/constant/index.d.ts +1 -1
- package/webpack/constant/index.js +1 -1
- package/webpack/plugin/webpackManifestPlugin.js +0 -1
- package/webpack/setup/commonSetup.d.ts +1 -1
package/eslint/index.d.mts
CHANGED
package/eslint/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/eslint/index.mjs"],"names":[],"mappings":"AAsBA;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/eslint/index.mjs"],"names":[],"mappings":"AAsBA;;qCAgIC"}
|
package/eslint/index.mjs
CHANGED
|
@@ -143,7 +143,8 @@ export function getESLintSetup({ eslintIgnores }) {
|
|
|
143
143
|
'@typescript-eslint/prefer-nullish-coalescing': 0,
|
|
144
144
|
'object-curly-spacing': 0,
|
|
145
145
|
'comma-dangle': 0,
|
|
146
|
-
'no-unused-vars':
|
|
146
|
+
'no-unused-vars': 'off',
|
|
147
|
+
'@typescript-eslint/no-unused-vars': 'error',
|
|
147
148
|
},
|
|
148
149
|
},
|
|
149
150
|
])
|
package/jest/config.d.ts
CHANGED
|
@@ -23,5 +23,6 @@ export function getJestSetup({ testPathIgnorePatterns, coverageDirectory, collec
|
|
|
23
23
|
transformIgnorePatterns: string[];
|
|
24
24
|
moduleFileExtensions: string[];
|
|
25
25
|
coverageThreshold: any;
|
|
26
|
+
modulePathIgnorePatterns: string[];
|
|
26
27
|
};
|
|
27
28
|
//# sourceMappingURL=config.d.ts.map
|
package/jest/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/jest/config.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/jest/config.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBC"}
|
package/jest/config.js
CHANGED
|
@@ -23,7 +23,9 @@ function getJestSetup(_ref) {
|
|
|
23
23
|
collectCoverage: collectCoverage,
|
|
24
24
|
coverageReporters: ['lcov', 'text'],
|
|
25
25
|
collectCoverageFrom: collectCoverageFrom,
|
|
26
|
-
|
|
26
|
+
// https://jest-extended.jestcommunity.dev/docs/getting-started/setup
|
|
27
|
+
// https://jest-extended.jestcommunity.dev/docs/matchers
|
|
28
|
+
setupFilesAfterEnv: ['<rootDir>/jest.setup.js', 'jest-extended/all'],
|
|
27
29
|
moduleNameMapper: {
|
|
28
30
|
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|md)$': '<rootDir>/.mock/file.js',
|
|
29
31
|
'^.+\\.(css|less|scss|md)$': 'identity-obj-proxy'
|
|
@@ -31,6 +33,8 @@ function getJestSetup(_ref) {
|
|
|
31
33
|
// https://jestjs.io/docs/tutorial-react-native#transformignorepatterns-customization
|
|
32
34
|
transformIgnorePatterns: ['node_modules/(?!((@)?uuid|parse5|jsdom/node_modules/parse5)/)'],
|
|
33
35
|
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
|
|
34
|
-
coverageThreshold: coverageThreshold
|
|
36
|
+
coverageThreshold: coverageThreshold,
|
|
37
|
+
// https://github.com/storybookjs/addon-jest
|
|
38
|
+
modulePathIgnorePatterns: ['<rootDir>/node_modules', '<rootDir>/jest-test-results.json']
|
|
35
39
|
};
|
|
36
40
|
}
|
package/jest/setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/jest/setup.js"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/jest/setup.js"],"names":[],"mappings":"AAIA,qCAKC"}
|
package/jest/setup.js
CHANGED
|
@@ -8,6 +8,7 @@ require("jsdom-global/register");
|
|
|
8
8
|
var _react = require("@testing-library/react");
|
|
9
9
|
var _jestAxe = require("jest-axe");
|
|
10
10
|
function runJestSetup() {
|
|
11
|
+
global.act = _react.act;
|
|
11
12
|
global.renderToJSON = function (component) {
|
|
12
13
|
return (0, _react.render)(component).container;
|
|
13
14
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papillonarts/setup",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Papillon Arts Setup",
|
|
5
5
|
"homepage": "https://github.com/papillonarts/papillonarts/tree/master/packages/setup",
|
|
6
6
|
"repository": {
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"install-packages": "npm i",
|
|
26
26
|
"install-papillonarts-latest": "echo \"setup skipping install-papillonarts-latest\" && exit 0",
|
|
27
27
|
"generate-typing": "tsc",
|
|
28
|
-
"generate-commonjs": "rm -rf build && babel --copy-files --no-copy-ignored --extensions '.js,.jsx,.ts,.tsx' --out-dir build src --ignore **/__tests__",
|
|
28
|
+
"generate-commonjs": "rm -rf build && babel --copy-files --no-copy-ignored --extensions '.js,.jsx,.ts,.tsx,.md' --out-dir build src --ignore **/__tests__,**/*.md",
|
|
29
29
|
"build": "npm-run-all generate-commonjs generate-typing",
|
|
30
30
|
"build-test": "npm run build",
|
|
31
31
|
"build-acceptance": "npm run build",
|
|
32
32
|
"build-release": "npm run build"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "1e0d601dc56a0abcde7730828eb1d83faca7222a"
|
|
35
35
|
}
|
package/storybook/mainSetup.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
rootAttributesDefaults: any;
|
|
7
|
-
}): StorybookConfig;
|
|
1
|
+
export declare function getStorybookMainSetup({ stories, staticDirs, includePaths }: {
|
|
2
|
+
stories: any;
|
|
3
|
+
staticDirs: any;
|
|
4
|
+
includePaths: any;
|
|
5
|
+
}): import("@storybook/react-webpack5").StorybookConfig;
|
|
8
6
|
//# sourceMappingURL=mainSetup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mainSetup.d.ts","sourceRoot":"","sources":["../../src/storybook/mainSetup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mainSetup.d.ts","sourceRoot":"","sources":["../../src/storybook/mainSetup.ts"],"names":[],"mappings":"AAWA,wBAAgB,qBAAqB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE;;;;CAAA,uDA0P1E"}
|
package/storybook/mainSetup.js
CHANGED
|
@@ -9,24 +9,24 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
11
|
var _webpack = _interopRequireDefault(require("webpack"));
|
|
12
|
+
var _node = require("@storybook/react-webpack5/node");
|
|
12
13
|
var _object = require("@papillonarts/library/object");
|
|
13
14
|
var _webpack2 = require("@papillonarts/setup/webpack");
|
|
15
|
+
var _forkTsCheckerWebpackPlugin = _interopRequireDefault(require("fork-ts-checker-webpack-plugin"));
|
|
14
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* https://storybook.js.org/docs/configure/integration/typescript */
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* https://storybook.js.org/docs/configure/integration/typescript */
|
|
18
|
+
// https://storybook.js.org/docs/api
|
|
19
|
+
// https://storybook.js.org/docs/api/main-config/main-config
|
|
20
|
+
// https://storybook.js.org/docs/api/csf/csf-next#definemain
|
|
16
21
|
function getStorybookMainSetup(_ref) {
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// https://storybook.js.org/docs/react/api/main-config
|
|
22
|
-
return {
|
|
22
|
+
var stories = _ref.stories,
|
|
23
|
+
staticDirs = _ref.staticDirs,
|
|
24
|
+
includePaths = _ref.includePaths;
|
|
25
|
+
return (0, _node.defineMain)({
|
|
23
26
|
// https://storybook.js.org/docs/api/main-config/main-config-preview-body
|
|
24
27
|
previewBody: function previewBody(body) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return "\n ".concat(body, "\n <script type=\"text/javascript\">\n (() => {\n document.addEventListener('DOMContentLoaded', function() {\n const storybookRootElement = document.getElementById(\"storybook-root\")\n\n // https://primer.style/foundations/primitives/getting-started\n storybookRootElement.setAttribute(\"data-color-mode\", \"light\")\n storybookRootElement.setAttribute(\"data-light-theme\", \"light\")\n storybookRootElement.setAttribute(\"data-dark-theme\", \"dark\")\n });\n })()\n </script>\n ");
|
|
28
|
-
}
|
|
29
|
-
return "".concat(body);
|
|
28
|
+
// https://github.com/storybookjs/storybook/issues/24429
|
|
29
|
+
return "\n ".concat(body, "\n <script type=\"text/javascript\">\n (() => {\n document.addEventListener('DOMContentLoaded', function() {\n const storybookRootElement = document.getElementById(\"storybook-root\")\n\n // https://primer.style/foundations/primitives/getting-started\n storybookRootElement.setAttribute(\"data-color-mode\", \"light\")\n storybookRootElement.setAttribute(\"data-light-theme\", \"light\")\n storybookRootElement.setAttribute(\"data-dark-theme\", \"dark\")\n });\n })()\n </script>\n ");
|
|
30
30
|
},
|
|
31
31
|
// https://storybook.js.org/docs/react/configure/frameworks
|
|
32
32
|
framework: {
|
|
@@ -38,53 +38,31 @@ function getStorybookMainSetup(_ref) {
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
// https://storybook.js.org/docs/react/api/main-config-stories
|
|
41
|
-
stories:
|
|
41
|
+
stories: stories,
|
|
42
42
|
// https://storybook.js.org/docs/react/api/main-config-addons
|
|
43
43
|
// https://storybook.js.org/docs/react/addons/introduction
|
|
44
44
|
// https://storybook.js.org/integrations
|
|
45
45
|
addons: [
|
|
46
|
+
// https://github.com/chromaui/addon-visual-tests
|
|
47
|
+
// https://www.chromatic.com/docs/visual-tests-addon
|
|
48
|
+
// https://storybook.js.org/docs/writing-tests/visual-testing
|
|
49
|
+
// https://storybook.js.org/addons/chromatic
|
|
50
|
+
// https://storybook.js.org/addons/@chromatic-com/storybook
|
|
51
|
+
'@chromatic-com/storybook',
|
|
46
52
|
// https://storybook.js.org/addons/@storybook/addon-a11y
|
|
47
53
|
'@storybook/addon-a11y',
|
|
48
|
-
//
|
|
49
|
-
|
|
50
|
-
// https://storybook.js.org/addons/@storybook/addon-actions
|
|
51
|
-
// '@storybook/addon-actions',
|
|
52
|
-
|
|
53
|
-
// included by default in @storybook/addon-essentials
|
|
54
|
-
// https://storybook.js.org/docs/react/essentials/backgrounds
|
|
55
|
-
// https://storybook.js.org/addons/@storybook/addon-backgrounds
|
|
56
|
-
// '@storybook/addon-backgrounds',
|
|
57
|
-
|
|
58
|
-
// https://storybook.js.org/addons/chromatic
|
|
59
|
-
// chromatic
|
|
60
|
-
|
|
61
|
-
// included by default in @storybook/addon-essentials
|
|
62
|
-
// https://storybook.js.org/docs/react/essentials/controls
|
|
63
|
-
// https://storybook.js.org/addons/@storybook/addon-controls
|
|
64
|
-
// '@storybook/addon-controls',
|
|
65
|
-
|
|
66
|
-
// https://storybook.js.org/addons/storybook-addon-designs
|
|
67
|
-
// storybook-addon-designs
|
|
68
|
-
|
|
69
|
-
// included by default in @storybook/addon-essentials
|
|
70
|
-
// https://storybook.js.org/docs/react/essentials/docs (404)
|
|
54
|
+
// https://storybook.js.org/addons/@storybook/addon-designs
|
|
55
|
+
'@storybook/addon-designs',
|
|
71
56
|
// https://storybook.js.org/addons/@storybook/addon-docs
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
// https://storybook.js.org/docs/react/essentials/introduction
|
|
83
|
-
// https://storybook.js.org/integrations/tag/essentials
|
|
84
|
-
// '@storybook/addon-essentials',
|
|
85
|
-
|
|
86
|
-
// included by default in @storybook/addon-essentials
|
|
87
|
-
// https://storybook.js.org/docs/react/essentials/highlight (404)
|
|
57
|
+
{
|
|
58
|
+
name: '@storybook/addon-docs',
|
|
59
|
+
options: {
|
|
60
|
+
jsxOptions: {},
|
|
61
|
+
csfPluginOptions: null,
|
|
62
|
+
mdxPluginOptions: {},
|
|
63
|
+
transcludeMarkdown: true
|
|
64
|
+
}
|
|
65
|
+
},
|
|
88
66
|
// https://storybook.js.org/addons/@storybook/addon-highlight
|
|
89
67
|
// '@storybook/addon-highlight',
|
|
90
68
|
|
|
@@ -92,33 +70,17 @@ function getStorybookMainSetup(_ref) {
|
|
|
92
70
|
// '@storybook/addon-interactions',
|
|
93
71
|
|
|
94
72
|
// https://storybook.js.org/addons/@storybook/addon-jest
|
|
73
|
+
// https://github.com/storybookjs/addon-jest
|
|
95
74
|
'@storybook/addon-jest',
|
|
96
75
|
// https://storybook.js.org/addons/@storybook/addon-links
|
|
97
76
|
'@storybook/addon-links',
|
|
98
|
-
//
|
|
99
|
-
// msw-storybook-addon
|
|
100
|
-
|
|
101
|
-
// included by default in @storybook/addon-essentials
|
|
102
|
-
// https://storybook.js.org/docs/react/essentials/measure-and-outline
|
|
103
|
-
// https://storybook.js.org/addons/@storybook/addon-measure
|
|
104
|
-
// https://storybook.js.org/addons/@storybook/addon-outline
|
|
105
|
-
// '@storybook/addon-measure',
|
|
106
|
-
// '@storybook/addon-outline',
|
|
107
|
-
|
|
108
|
-
// included by default in @storybook/addon-essentials
|
|
109
|
-
// https://storybook.js.org/docs/react/essentials/toolbars-and-globals
|
|
110
|
-
// https://storybook.js.org/addons/@storybook/addon-toolbars
|
|
111
|
-
// '@storybook/addon-toolbars',
|
|
112
|
-
|
|
113
|
-
// included by default in @storybook/addon-essentials
|
|
114
|
-
// https://storybook.js.org/docs/react/essentials/viewport
|
|
115
|
-
// https://storybook.js.org/addons/@storybook/addon-viewport
|
|
116
|
-
// '@storybook/addon-viewport',
|
|
77
|
+
// 'storybook-addon-react-docgen',
|
|
117
78
|
|
|
118
|
-
'@chromatic-com/storybook',
|
|
119
79
|
// https://storybook.js.org/addons/@storybook/addon-styling-webpack
|
|
80
|
+
// https://storybook.js.org/recipes/sass
|
|
120
81
|
'@storybook/addon-styling-webpack',
|
|
121
82
|
// https://storybook.js.org/addons/@storybook/addon-themes
|
|
83
|
+
// https://github.com/storybookjs/storybook/tree/next/code/addons/themes
|
|
122
84
|
'@storybook/addon-themes', '@storybook/addon-webpack5-compiler-babel'],
|
|
123
85
|
// https://storybook.js.org/docs/react/api/main-config-babel
|
|
124
86
|
// ...
|
|
@@ -166,8 +128,9 @@ function getStorybookMainSetup(_ref) {
|
|
|
166
128
|
// ...
|
|
167
129
|
|
|
168
130
|
// https://storybook.js.org/docs/react/api/main-config-static-dirs
|
|
169
|
-
//
|
|
170
|
-
|
|
131
|
+
// https://storybook.js.org/docs/api/main-config/main-config-static-dirs
|
|
132
|
+
// https://storybook.js.org/docs/configure/integration/images-and-assets#serving-static-files-via-storybook-configuration
|
|
133
|
+
staticDirs: staticDirs,
|
|
171
134
|
// https://storybook.js.org/docs/react/api/main-config-typescript
|
|
172
135
|
// ...
|
|
173
136
|
|
|
@@ -217,7 +180,7 @@ function getStorybookMainSetup(_ref) {
|
|
|
217
180
|
loader: 'sass-loader',
|
|
218
181
|
options: {
|
|
219
182
|
sassOptions: {
|
|
220
|
-
includePaths:
|
|
183
|
+
includePaths: includePaths,
|
|
221
184
|
// https://sass-lang.com/documentation/js-api/interfaces/options/#quietDeps
|
|
222
185
|
// https://sass-lang.com/documentation/js-api/interfaces/options/#silenceDeprecations
|
|
223
186
|
// https://sass-lang.com/documentation/js-api/interfaces/deprecations/
|
|
@@ -245,6 +208,7 @@ function getStorybookMainSetup(_ref) {
|
|
|
245
208
|
config.plugins.push(new _webpack["default"].ProvidePlugin({
|
|
246
209
|
process: 'process/browser'
|
|
247
210
|
}));
|
|
211
|
+
config.plugins.push(new _forkTsCheckerWebpackPlugin["default"]());
|
|
248
212
|
config.resolve.fallback = _objectSpread(_objectSpread({}, config.resolve.fallback), {}, {
|
|
249
213
|
tty: require.resolve('tty-browserify')
|
|
250
214
|
});
|
|
@@ -260,9 +224,28 @@ function getStorybookMainSetup(_ref) {
|
|
|
260
224
|
}
|
|
261
225
|
return webpackFinal;
|
|
262
226
|
}(),
|
|
227
|
+
// https://storybook.js.org/docs/api/main-config/main-config-typescript
|
|
228
|
+
// https://storybook.js.org/docs/configure/integration/typescript
|
|
263
229
|
typescript: {
|
|
230
|
+
check: true,
|
|
231
|
+
checkOptions: {},
|
|
232
|
+
// https://storybook.js.org/addons/storybook-addon-react-docgen
|
|
233
|
+
// https://github.com/styleguidist/react-docgen-typescript
|
|
234
|
+
// https://github.com/hipstersmoothie/react-docgen-typescript-plugin
|
|
264
235
|
reactDocgen: 'react-docgen-typescript',
|
|
265
|
-
|
|
236
|
+
reactDocgenTypescriptOptions: {
|
|
237
|
+
shouldExtractLiteralValuesFromEnum: true,
|
|
238
|
+
propFilter: function propFilter(prop) {
|
|
239
|
+
if (prop.name === 'children') {
|
|
240
|
+
return true;
|
|
241
|
+
}
|
|
242
|
+
if (prop.parent) {
|
|
243
|
+
return !prop.parent.fileName.includes('node_modules') && !prop.parent.fileName.includes('@types/react') && !prop.parent.fileName.includes('@emotion');
|
|
244
|
+
}
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
skipCompiler: false
|
|
266
249
|
}
|
|
267
|
-
};
|
|
250
|
+
});
|
|
268
251
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"managerSetup.d.ts","sourceRoot":"","sources":["../../src/storybook/managerSetup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"managerSetup.d.ts","sourceRoot":"","sources":["../../src/storybook/managerSetup.ts"],"names":[],"mappings":"AAIA,wBAAgB,wBAAwB,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE;;;CAAA,QAKhE"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.setStorybookManagerSetup = setStorybookManagerSetup;
|
|
7
7
|
var _managerApi = require("storybook/manager-api");
|
|
8
8
|
var _theming = require("storybook/theming");
|
|
9
|
+
// https://storybook.js.org/docs/configure#configure-storybooks-ui
|
|
9
10
|
function setStorybookManagerSetup(_ref) {
|
|
10
11
|
var panelPosition = _ref.panelPosition,
|
|
11
12
|
theme = _ref.theme;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
a11y: any;
|
|
4
|
-
decorators: any;
|
|
5
|
-
docs: any;
|
|
6
|
-
};
|
|
7
|
-
}): {
|
|
8
|
-
parameters: {};
|
|
9
|
-
};
|
|
1
|
+
import type { Preview } from '@storybook/react-webpack5';
|
|
2
|
+
export declare function getStorybookPreviewSetup(): Preview;
|
|
10
3
|
//# sourceMappingURL=previewSetup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"previewSetup.d.ts","sourceRoot":"","sources":["../../src/storybook/previewSetup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"previewSetup.d.ts","sourceRoot":"","sources":["../../src/storybook/previewSetup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAsB,MAAM,2BAA2B,CAAA;AAI5E,wBAAgB,wBAAwB,IAAI,OAAO,CA6DlD"}
|
|
@@ -1,54 +1,70 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.getStorybookPreviewSetup = getStorybookPreviewSetup;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
7
|
var _reactRouterDom = require("react-router-dom");
|
|
10
8
|
var _blocks = require("@storybook/addon-docs/blocks");
|
|
11
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function getStorybookPreviewSetup(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
decorators
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
// https://storybook.js.org/docs/configure#configure-story-rendering
|
|
11
|
+
// https://storybook.js.org/docs/api/csf/csf-next#definepreview
|
|
12
|
+
function getStorybookPreviewSetup() {
|
|
13
|
+
return {
|
|
14
|
+
// https://storybook.js.org/docs/writing-stories/decorators
|
|
15
|
+
decorators: [function (Story, _ref) {
|
|
16
|
+
var parameters = _ref.parameters;
|
|
17
|
+
var pageLayout = parameters.pageLayout;
|
|
18
|
+
switch (pageLayout) {
|
|
19
|
+
case 'page':
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.MemoryRouter, {
|
|
21
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Story, {})
|
|
22
|
+
});
|
|
23
|
+
default:
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Story, {});
|
|
25
|
+
}
|
|
26
|
+
}],
|
|
27
|
+
parameters: {
|
|
28
|
+
// https://storybook.js.org/docs/writing-tests/accessibility-testing
|
|
29
|
+
a11y: {
|
|
30
|
+
/*
|
|
31
|
+
* Axe's context parameter
|
|
32
|
+
* See https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#context-parameter
|
|
33
|
+
* to learn more. Typically, this is the CSS selector for the part of the DOM you want to analyze.
|
|
34
|
+
*/
|
|
35
|
+
context: 'body',
|
|
36
|
+
/*
|
|
37
|
+
* Axe's configuration
|
|
38
|
+
* See https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axeconfigure
|
|
39
|
+
* to learn more about the available properties.
|
|
40
|
+
*/
|
|
26
41
|
config: {},
|
|
27
|
-
|
|
42
|
+
/*
|
|
43
|
+
* Axe's options parameter
|
|
44
|
+
* See https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter
|
|
45
|
+
* to learn more about the available options.
|
|
46
|
+
*/
|
|
28
47
|
options: {}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
parameters = _objectSpread(_objectSpread({}, parameters), {}, {
|
|
36
|
-
decorators: [function (Story) {
|
|
37
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.MemoryRouter, {
|
|
38
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Story, {})
|
|
39
|
-
});
|
|
40
|
-
}].concat()
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
if (docs) {
|
|
44
|
-
parameters = _objectSpread(_objectSpread({}, parameters), {}, {
|
|
45
|
-
docs: _objectSpread({}, {
|
|
48
|
+
},
|
|
49
|
+
// https://storybook.js.org/docs/writing-docs/doc-blocks
|
|
50
|
+
// https://storybook.js.org/docs/writing-docs/autodocs#customize-the-docs-container
|
|
51
|
+
// https://storybook.js.org/docs/writing-docs/autodocs#working-with-custom-mdx-components
|
|
52
|
+
// https://storybook.js.org/docs/writing-docs/autodocs#write-a-custom-template
|
|
53
|
+
docs: {
|
|
46
54
|
container: _blocks.DocsContainer,
|
|
55
|
+
// https://storybook.js.org/docs/writing-docs/doc-blocks#customizing-the-automatic-docs-page
|
|
56
|
+
// https://github.com/storybookjs/storybook/blob/next/code/addons/docs/docs/docspage.md#replacing-docspage
|
|
57
|
+
// https://github.com/storybookjs/storybook/blob/next/code/addons/docs/docs/docspage.md
|
|
47
58
|
page: _blocks.DocsPage
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
initialGlobals: {
|
|
62
|
+
a11y: {
|
|
63
|
+
// Optional flag to prevent the automatic check
|
|
64
|
+
manual: true
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
// https://storybook.js.org/docs/writing-docs/autodocs
|
|
68
|
+
tags: ['autodocs']
|
|
53
69
|
};
|
|
54
70
|
}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.targetBrowsers = exports.manifestFileName = exports.indexHTMLName = exports.extensions = exports.extensionAlias = exports.coreJSVersion = void 0;
|
|
7
|
-
var coreJSVersion = exports.coreJSVersion = '3.
|
|
7
|
+
var coreJSVersion = exports.coreJSVersion = '3.47.0';
|
|
8
8
|
var targetBrowsers = exports.targetBrowsers = {
|
|
9
9
|
production: ['> 1%', 'last 2 versions', 'Firefox ESR'],
|
|
10
10
|
legacyBrowsers: ['> 1%', 'last 2 versions', 'Firefox ESR'],
|
|
@@ -7,7 +7,6 @@ exports.getWebpackManifestPluginStandardSetup = getWebpackManifestPluginStandard
|
|
|
7
7
|
var _webpackManifestPlugin = require("webpack-manifest-plugin");
|
|
8
8
|
var _constant = require("../constant");
|
|
9
9
|
// https://github.com/shellscape/webpack-manifest-plugin
|
|
10
|
-
/* eslint-disable no-param-reassign */
|
|
11
10
|
|
|
12
11
|
function getWebpackManifestPluginStandardSetup() {
|
|
13
12
|
return new _webpackManifestPlugin.WebpackManifestPlugin({
|
|
@@ -3,7 +3,7 @@ export declare function getWebpackCommonSetup({ micrositeFolderPaths, packageJSO
|
|
|
3
3
|
packageJSON: any;
|
|
4
4
|
}): {
|
|
5
5
|
entry: string[];
|
|
6
|
-
plugins: (import("
|
|
6
|
+
plugins: (import("fork-ts-checker-webpack-plugin") | import("clean-webpack-plugin").CleanWebpackPlugin | import("copy-webpack-plugin") | import("html-webpack-plugin") | import("webpack-manifest-plugin", { with: { "resolution-mode": "import" } }).WebpackManifestPlugin)[];
|
|
7
7
|
module: {
|
|
8
8
|
rules: ({
|
|
9
9
|
test: RegExp;
|