@itcase/storybook-config 1.3.9 → 1.3.12
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/dist/cjs/decorators/withFigmaSourceLink.js +1 -57
- package/dist/cjs/decorators/withFormSubmitDecorator.js +1 -1108
- package/dist/cjs/decorators.js +2 -1
- package/dist/config/config/mainConfigNextJsVite.js +2 -0
- package/dist/config/config/mainConfigReactNativeWeb.js +4 -2
- package/dist/config/config/mainConfigVite.js +2 -0
- package/dist/decorators/withFigmaSourceLink.js +1 -57
- package/dist/decorators/withFormSubmitDecorator.js +1 -1108
- package/dist/decorators.js +2 -1
- package/dist/utils/getStoryInfoBlocks.js +1 -1
- package/package.json +26 -24
- package/dist/components/isArray-CPoGkdXv.js +0 -43
- package/dist/isArray-DJguRq_2.js +0 -47
package/dist/cjs/decorators.js
CHANGED
|
@@ -9,8 +9,9 @@ var withNextDecorator = require('./decorators/withNextDecorator.js');
|
|
|
9
9
|
var withUiDecorator = require('./decorators/withUiDecorator.js');
|
|
10
10
|
require('react');
|
|
11
11
|
require('react/jsx-runtime');
|
|
12
|
-
require('
|
|
12
|
+
require('lodash-es/castArray');
|
|
13
13
|
require('../FormSubmitWrapper-Bv5qs18h.js');
|
|
14
|
+
require('lodash-es/camelCase');
|
|
14
15
|
require('@itcase/common');
|
|
15
16
|
require('msw');
|
|
16
17
|
require('@itcase/ui-core/context');
|
|
@@ -15,6 +15,8 @@ const MAIN_CONFIG_NEXTJS_VITE = {
|
|
|
15
15
|
optimizeDeps: {
|
|
16
16
|
...config.optimizeDeps,
|
|
17
17
|
exclude: ['react-native', ...(config.optimizeDeps?.exclude ?? [])],
|
|
18
|
+
// CJS packages (e.g. prop-types) need prebundling for ESM default import.
|
|
19
|
+
include: ['prop-types', ...(config.optimizeDeps?.include ?? [])],
|
|
18
20
|
rolldownOptions: {
|
|
19
21
|
...config.optimizeDeps?.rolldownOptions,
|
|
20
22
|
},
|
|
@@ -24,8 +24,10 @@ const MAIN_CONFIG_REACT_NATIVE_WEB = {
|
|
|
24
24
|
plugins,
|
|
25
25
|
}, {
|
|
26
26
|
optimizeDeps: {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
// SVG subpath exports (`/default/svg`) must not be prebundled; svgr handles them.
|
|
28
|
+
exclude: ['@itcase/icons-default', 'react-native'],
|
|
29
|
+
// prop-types is CJS; prebundle so `import x from 'prop-types'` works in Vite 8.
|
|
30
|
+
include: ['prop-types', 'react-native-web', 'react-native-svg'],
|
|
29
31
|
rolldownOptions: {
|
|
30
32
|
resolve: {
|
|
31
33
|
extensions: REACT_NATIVE_WEB_EXTENSIONS,
|
|
@@ -59,6 +59,8 @@ const MAIN_CONFIG_VITE = {
|
|
|
59
59
|
},
|
|
60
60
|
optimizeDeps: {
|
|
61
61
|
...config.optimizeDeps,
|
|
62
|
+
// CJS packages (e.g. prop-types) need prebundling for ESM default import.
|
|
63
|
+
include: ['prop-types', ...(config.optimizeDeps?.include ?? [])],
|
|
62
64
|
rolldownOptions: {
|
|
63
65
|
...config.optimizeDeps?.rolldownOptions,
|
|
64
66
|
},
|
|
@@ -1,63 +1,7 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import
|
|
2
|
+
import castArray from 'lodash-es/castArray';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
var castArray_1;
|
|
6
|
-
var hasRequiredCastArray;
|
|
7
|
-
|
|
8
|
-
function requireCastArray () {
|
|
9
|
-
if (hasRequiredCastArray) return castArray_1;
|
|
10
|
-
hasRequiredCastArray = 1;
|
|
11
|
-
var isArray = requireIsArray();
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Casts `value` as an array if it's not one.
|
|
15
|
-
*
|
|
16
|
-
* @static
|
|
17
|
-
* @memberOf _
|
|
18
|
-
* @since 4.4.0
|
|
19
|
-
* @category Lang
|
|
20
|
-
* @param {*} value The value to inspect.
|
|
21
|
-
* @returns {Array} Returns the cast array.
|
|
22
|
-
* @example
|
|
23
|
-
*
|
|
24
|
-
* _.castArray(1);
|
|
25
|
-
* // => [1]
|
|
26
|
-
*
|
|
27
|
-
* _.castArray({ 'a': 1 });
|
|
28
|
-
* // => [{ 'a': 1 }]
|
|
29
|
-
*
|
|
30
|
-
* _.castArray('abc');
|
|
31
|
-
* // => ['abc']
|
|
32
|
-
*
|
|
33
|
-
* _.castArray(null);
|
|
34
|
-
* // => [null]
|
|
35
|
-
*
|
|
36
|
-
* _.castArray(undefined);
|
|
37
|
-
* // => [undefined]
|
|
38
|
-
*
|
|
39
|
-
* _.castArray();
|
|
40
|
-
* // => []
|
|
41
|
-
*
|
|
42
|
-
* var array = [1, 2, 3];
|
|
43
|
-
* console.log(_.castArray(array) === array);
|
|
44
|
-
* // => true
|
|
45
|
-
*/
|
|
46
|
-
function castArray() {
|
|
47
|
-
if (!arguments.length) {
|
|
48
|
-
return [];
|
|
49
|
-
}
|
|
50
|
-
var value = arguments[0];
|
|
51
|
-
return isArray(value) ? value : [value];
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
castArray_1 = castArray;
|
|
55
|
-
return castArray_1;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
var castArrayExports = requireCastArray();
|
|
59
|
-
var castArray = /*@__PURE__*/getDefaultExportFromCjs(castArrayExports);
|
|
60
|
-
|
|
61
5
|
function withFigmaSourceLink() {
|
|
62
6
|
const decorator = (Story, {
|
|
63
7
|
parameters,
|