vite-plugin-storybook-nextjs 0.0.8 → 0.0.10

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.
@@ -1,4 +1,4 @@
1
- import * as next_dist_compiled_react from 'next/dist/compiled/react';
1
+ import * as React from 'next/dist/compiled/react';
2
2
  import { ImageProps, StaticImageData } from 'next/image';
3
3
  import { ImageProps as ImageProps$1 } from 'next/legacy/image';
4
4
 
@@ -6,7 +6,7 @@ interface StaticRequire {
6
6
  default: StaticImageData;
7
7
  }
8
8
  declare type StaticImport = StaticRequire | StaticImageData;
9
- declare const ImageContext: next_dist_compiled_react.Context<Partial<Omit<ImageProps, "src"> & {
9
+ declare const ImageContext: React.Context<Partial<Omit<ImageProps, "src"> & {
10
10
  src: string | StaticImport;
11
11
  }> & Omit<ImageProps$1, "src">>;
12
12
 
@@ -1,6 +1,6 @@
1
1
  import * as next_dist_shared_lib_get_img_props from 'next/dist/shared/lib/get-img-props';
2
2
  import * as _NextImage from 'next/image';
3
- import React__default from 'react';
3
+ import React__default from 'next/dist/compiled/react';
4
4
 
5
5
  declare const MockedNextImage: React__default.ForwardRefExoticComponent<Omit<React__default.DetailedHTMLProps<React__default.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "src" | "srcSet" | "ref" | "width" | "height" | "loading" | "alt"> & {
6
6
  src: string | next_dist_shared_lib_get_img_props.StaticImport;
@@ -1,7 +1,7 @@
1
1
  import * as NextImageNamespace from 'next/image';
2
2
  import { defaultLoader } from 'sb-original/default-loader';
3
3
  import { ImageContext } from 'sb-original/image-context';
4
- import React from 'react';
4
+ import React from 'next/dist/compiled/react';
5
5
 
6
6
  // src/plugins/next-image/alias/next-image.tsx
7
7
  var OriginalNextImage = NextImageNamespace.default;
@@ -1,5 +1,5 @@
1
+ import React__default from 'next/dist/compiled/react';
1
2
  import * as _NextLegacyImage from 'next/legacy/image';
2
- import React__default from 'react';
3
3
 
4
4
  declare function NextLegacyImage({ loader, ...props }: _NextLegacyImage.ImageProps): React__default.JSX.Element;
5
5
 
@@ -1,7 +1,7 @@
1
1
  import OriginalNextLegacyImage from 'next/legacy/image';
2
2
  import { defaultLoader } from 'sb-original/default-loader';
3
3
  import { ImageContext } from 'sb-original/image-context';
4
- import React from 'react';
4
+ import React from 'next/dist/compiled/react';
5
5
 
6
6
  // src/plugins/next-image/alias/next-legacy-image.tsx
7
7
  function NextLegacyImage({ loader, ...props }) {
@@ -4,7 +4,7 @@ import { RequestCookies } from 'next/dist/compiled/@edge-runtime/cookies/index.j
4
4
 
5
5
  declare class RequestCookiesMock extends RequestCookies {
6
6
  get: vitest.Mock<[name: string] | [next_dist_compiled__edge_runtime_cookies.RequestCookie], next_dist_compiled__edge_runtime_cookies.RequestCookie | undefined>;
7
- getAll: vitest.Mock<[next_dist_compiled__edge_runtime_cookies.RequestCookie] | [name: string] | [], next_dist_compiled__edge_runtime_cookies.RequestCookie[]>;
7
+ getAll: vitest.Mock<[] | [next_dist_compiled__edge_runtime_cookies.RequestCookie] | [name: string], next_dist_compiled__edge_runtime_cookies.RequestCookie[]>;
8
8
  has: vitest.Mock<[name: string], boolean>;
9
9
  set: vitest.Mock<[key: string, value: string] | [options: next_dist_compiled__edge_runtime_cookies.RequestCookie], this>;
10
10
  delete: vitest.Mock<[names: string | string[]], boolean | boolean[]>;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import * as react from 'react';
2
2
  import * as next_dist_shared_lib_app_router_context_shared_runtime from 'next/dist/shared/lib/app-router-context.shared-runtime';
3
3
  import { Mock } from '@storybook/test';
4
4
  import * as actual from 'next/dist/client/components/navigation.js';
@@ -28,7 +28,7 @@ declare const usePathname: Mock<[], string>;
28
28
  declare const useSelectedLayoutSegment: Mock<[parallelRouteKey?: string | undefined], string | null>;
29
29
  declare const useSelectedLayoutSegments: Mock<[parallelRouteKey?: string | undefined], string[]>;
30
30
  declare const useRouter: Mock<[], next_dist_shared_lib_app_router_context_shared_runtime.AppRouterInstance>;
31
- declare const useServerInsertedHTML: Mock<[callback: () => React.ReactNode], void>;
31
+ declare const useServerInsertedHTML: Mock<[callback: () => react.ReactNode], void>;
32
32
  declare const notFound: Mock<[], never>;
33
33
  interface Params {
34
34
  [key: string]: string | string[];
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import * as react from 'react';
2
2
  import * as next_dist_client_with_router from 'next/dist/client/with-router';
3
3
  import * as next_types from 'next/types';
4
4
  import { Mock } from '@storybook/test';
@@ -40,6 +40,6 @@ declare const getRouter: () => {
40
40
  };
41
41
 
42
42
  declare const useRouter: Mock<[], originalRouter.NextRouter>;
43
- declare const withRouter: Mock<[ComposedComponent: next_types.NextComponentType<next_types.NextPageContext, any, next_dist_client_with_router.WithRouterProps>], React.ComponentType<next_dist_client_with_router.ExcludeRouterProps<next_dist_client_with_router.WithRouterProps>>>;
43
+ declare const withRouter: Mock<[ComposedComponent: next_types.NextComponentType<next_types.NextPageContext, any, next_dist_client_with_router.WithRouterProps>], react.ComponentType<next_dist_client_with_router.ExcludeRouterProps<next_dist_client_with_router.WithRouterProps>>>;
44
44
 
45
45
  export { createRouter, getRouter, useRouter, withRouter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-storybook-nextjs",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vite-plugin",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@storybook/test": "^8.3.0-alpha.3",
36
- "next": "^14.0.0",
36
+ "next": "^14.2.5",
37
37
  "storybook": "^8.3.0-alpha.3",
38
38
  "vite": "^5.0.0"
39
39
  },
@@ -44,7 +44,7 @@
44
44
  "@types/react": "^18",
45
45
  "auto": "^11.2.0",
46
46
  "lefthook": "^1.6.16",
47
- "next": "^14.0.0",
47
+ "next": "^14.2.5",
48
48
  "react": "^18",
49
49
  "rollup": "^4.18.0",
50
50
  "sharp": "^0.33.4",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "packageManager": "pnpm@9.4.0",
58
58
  "dependencies": {
59
- "@next/env": "^14.2.4",
59
+ "@next/env": "^14.2.5",
60
60
  "image-size": "^1.1.1",
61
61
  "module-alias": "^2.2.3",
62
62
  "ts-dedent": "^2.2.0"