@itcase/storybook-config 1.3.9 → 1.3.13

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.
@@ -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('../isArray-DJguRq_2.js');
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,16 @@ const MAIN_CONFIG_REACT_NATIVE_WEB = {
24
24
  plugins,
25
25
  }, {
26
26
  optimizeDeps: {
27
- exclude: ['react-native'],
28
- include: ['react-native-web', 'react-native-svg'],
27
+ // SVG subpath exports (`/default/svg`) must not be prebundled; svgr handles them.
28
+ exclude: ['@itcase/icons-default', 'react-native'],
29
+ // CJS packages: prebundle so default import works in Vite 8.
30
+ include: [
31
+ 'prop-types',
32
+ 'matchmediaquery',
33
+ 'react-responsive',
34
+ 'react-native-web',
35
+ 'react-native-svg',
36
+ ],
29
37
  rolldownOptions: {
30
38
  resolve: {
31
39
  extensions: REACT_NATIVE_WEB_EXTENSIONS,
@@ -59,6 +59,13 @@ const MAIN_CONFIG_VITE = {
59
59
  },
60
60
  optimizeDeps: {
61
61
  ...config.optimizeDeps,
62
+ // CJS packages need prebundling for ESM default import in Vite 8.
63
+ include: [
64
+ 'prop-types',
65
+ 'matchmediaquery',
66
+ 'react-responsive',
67
+ ...(config.optimizeDeps?.include ?? []),
68
+ ],
62
69
  rolldownOptions: {
63
70
  ...config.optimizeDeps?.rolldownOptions,
64
71
  },
@@ -1,63 +1,7 @@
1
1
  import 'react';
2
- import { r as requireIsArray, g as getDefaultExportFromCjs } from '../components/isArray-CPoGkdXv.js';
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,