@storybook/nextjs 9.1.9 → 9.1.11

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 (56) hide show
  1. package/dist/chunk-XP5HYGXS.mjs +3 -0
  2. package/dist/compatibility/draft-mode.compat.js +10 -1
  3. package/dist/compatibility/draft-mode.compat.mjs +1 -1
  4. package/dist/config/preview.d.ts +2 -0
  5. package/dist/config/preview.js +5 -0
  6. package/dist/config/preview.mjs +3 -0
  7. package/dist/export-mocks/cache/index.js +21 -1
  8. package/dist/export-mocks/headers/index.js +40 -1
  9. package/dist/export-mocks/index.js +16 -1
  10. package/dist/export-mocks/navigation/index.js +48 -1
  11. package/dist/export-mocks/router/index.js +41 -1
  12. package/dist/font/webpack/loader/storybook-nextjs-font-loader.js +24 -6
  13. package/dist/image-context.js +7 -1
  14. package/dist/image-context.mjs +1 -1
  15. package/dist/images/decorator.js +28 -1
  16. package/dist/images/decorator.mjs +1 -1
  17. package/dist/images/next-image.js +35 -1
  18. package/dist/images/next-image.mjs +1 -1
  19. package/dist/images/next-legacy-image.js +14 -1
  20. package/dist/images/next-legacy-image.mjs +1 -1
  21. package/dist/index.d.ts +53 -8
  22. package/dist/index.js +84 -26
  23. package/dist/index.mjs +19 -8
  24. package/dist/next-image-loader-stub.js +8 -1
  25. package/dist/next-image-loader-stub.mjs +1 -1
  26. package/dist/node/index.js +5 -1
  27. package/dist/preset.js +38 -1
  28. package/dist/preview.js +44 -1
  29. package/dist/preview.mjs +18 -3
  30. package/dist/{react-18-WSPZ3BUV.mjs → react-18-IGIL3GJQ.mjs} +1 -1
  31. package/dist/rsc/server-only.js +5 -1
  32. package/dist/swc/next-swc-loader-patch.js +13 -1
  33. package/package.json +22 -15
  34. package/dist/chunk-2TZKD6A5.mjs +0 -20
  35. package/dist/chunk-L66KIASX.mjs +0 -3
  36. package/dist/export-mocks/cache/index.d.ts +0 -16
  37. package/dist/export-mocks/cache/index.mjs +0 -10
  38. package/dist/export-mocks/headers/index.d.ts +0 -36
  39. package/dist/export-mocks/headers/index.mjs +0 -12
  40. package/dist/export-mocks/index.d.ts +0 -7
  41. package/dist/export-mocks/index.mjs +0 -11
  42. package/dist/export-mocks/navigation/index.d.ts +0 -49
  43. package/dist/export-mocks/navigation/index.mjs +0 -11
  44. package/dist/export-mocks/router/index.d.ts +0 -46
  45. package/dist/export-mocks/router/index.mjs +0 -10
  46. package/dist/font/webpack/loader/storybook-nextjs-font-loader.d.ts +0 -3
  47. package/dist/font/webpack/loader/storybook-nextjs-font-loader.mjs +0 -56
  48. package/dist/index.d-ff220430.d.ts +0 -310
  49. package/dist/node/index.d.ts +0 -10
  50. package/dist/node/index.mjs +0 -5
  51. package/dist/preset.d.ts +0 -14
  52. package/dist/rsc/server-only.d.ts +0 -3
  53. package/dist/rsc/server-only.mjs +0 -5
  54. package/dist/swc/next-swc-loader-patch.d.ts +0 -21
  55. package/dist/swc/next-swc-loader-patch.mjs +0 -8
  56. package/dist/types-f6ea2c09.d.ts +0 -54
@@ -1,54 +0,0 @@
1
- import { CompatibleString } from 'storybook/internal/types';
2
- import { BuilderOptions, StorybookConfigWebpack, TypescriptOptions } from '@storybook/builder-webpack5';
3
- import { ReactOptions, StorybookConfig as StorybookConfig$1, TypescriptOptions as TypescriptOptions$1 } from '@storybook/preset-react-webpack';
4
- import * as _NextImage from 'next/image';
5
- import { NextRouter } from 'next/router';
6
-
7
- type FrameworkName = CompatibleString<'@storybook/nextjs'>;
8
- type BuilderName = CompatibleString<'@storybook/builder-webpack5'>;
9
- type FrameworkOptions = ReactOptions & {
10
- nextConfigPath?: string;
11
- image?: Partial<_NextImage.ImageProps>;
12
- builder?: BuilderOptions;
13
- };
14
- type StorybookConfigFramework = {
15
- framework: FrameworkName | {
16
- name: FrameworkName;
17
- options: FrameworkOptions;
18
- };
19
- core?: StorybookConfig$1['core'] & {
20
- builder?: BuilderName | {
21
- name: BuilderName;
22
- options: BuilderOptions;
23
- };
24
- };
25
- typescript?: Partial<TypescriptOptions & TypescriptOptions$1> & StorybookConfig$1['typescript'];
26
- };
27
- /** The interface for Storybook configuration in `main.ts` files. */
28
- type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigWebpack | keyof StorybookConfigFramework> & StorybookConfigWebpack & StorybookConfigFramework;
29
- interface NextJsParameters {
30
- /**
31
- * Next.js framework configuration
32
- *
33
- * @see https://storybook.js.org/docs/get-started/frameworks/nextjs
34
- */
35
- nextjs?: {
36
- /**
37
- * Enable App Directory features If your story imports components that use next/navigation, you
38
- * need to set this parameter to true
39
- */
40
- appDirectory?: boolean;
41
- /**
42
- * Next.js navigation configuration when using `next/navigation`. Please note that it can only
43
- * be used in components/pages in the app directory.
44
- */
45
- navigation?: Partial<NextRouter>;
46
- /** Next.js router configuration */
47
- router?: Partial<NextRouter>;
48
- };
49
- }
50
- interface NextJsTypes {
51
- parameters: NextJsParameters;
52
- }
53
-
54
- export { FrameworkOptions as F, NextJsTypes as N, StorybookConfig as S, NextJsParameters as a };