vite-plugin-storybook-nextjs 0.0.6 → 0.0.8

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/index.js CHANGED
@@ -872,7 +872,7 @@ var vitePluginNextMocks = () => ({
872
872
  "@storybook/nextjs/router.mock": joinDir("router", "index.js"),
873
873
  "next/cache": joinDir("cache", "index.js"),
874
874
  "@storybook/nextjs/cache.mock": joinDir("cache", "index.js"),
875
- "server-only$": joinDir("rsc", "server-only.js")
875
+ "server-only": joinDir("rsc", "server-only.js")
876
876
  }
877
877
  }
878
878
  })
@@ -2,7 +2,7 @@ import * as next_dist_shared_lib_get_img_props from 'next/dist/shared/lib/get-im
2
2
  import * as _NextImage from 'next/image';
3
3
  import React__default from 'react';
4
4
 
5
- declare const MockedNextImage: React__default.ForwardRefExoticComponent<Omit<React__default.DetailedHTMLProps<React__default.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "height" | "width" | "loading" | "ref" | "alt" | "src" | "srcSet"> & {
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;
7
7
  alt: string;
8
8
  width?: number | `${number}` | undefined;
@@ -1,8 +1,8 @@
1
1
  import * as vitest from 'vitest';
2
- import { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache';
3
- export { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache';
4
- import { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store';
5
- export { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store';
2
+ import { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache.js';
3
+ export { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache.js';
4
+ import { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store.js';
5
+ export { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store.js';
6
6
 
7
7
  declare const revalidatePath: vitest.Mock<any, any>;
8
8
  declare const revalidateTag: vitest.Mock<any, any>;
@@ -1,8 +1,8 @@
1
1
  import { fn } from '@storybook/test';
2
- import { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache';
3
- export { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache';
4
- import { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store';
5
- export { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store';
2
+ import { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache.js';
3
+ export { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache.js';
4
+ import { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store.js';
5
+ export { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store.js';
6
6
 
7
7
  // src/plugins/next-mocks/alias/cache/index.ts
8
8
  var revalidatePath = fn().mockName("next/cache::revalidatePath");
@@ -1,6 +1,6 @@
1
1
  import * as vitest from 'vitest';
2
2
  import * as next_dist_compiled__edge_runtime_cookies from 'next/dist/compiled/@edge-runtime/cookies';
3
- import { RequestCookies } from 'next/dist/compiled/@edge-runtime/cookies';
3
+ import { RequestCookies } from 'next/dist/compiled/@edge-runtime/cookies/index.js';
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>;
@@ -1,6 +1,6 @@
1
1
  import { headers } from '@storybook/nextjs/headers.mock';
2
2
  import { fn } from '@storybook/test';
3
- import { RequestCookies } from 'next/dist/compiled/@edge-runtime/cookies';
3
+ import { RequestCookies } from 'next/dist/compiled/@edge-runtime/cookies/index.js';
4
4
 
5
5
  // src/plugins/next-mocks/alias/headers/cookies.ts
6
6
  var RequestCookiesMock = class extends RequestCookies {
@@ -1,5 +1,5 @@
1
1
  import * as vitest from 'vitest';
2
- import { HeadersAdapter } from 'next/dist/server/web/spec-extension/adapters/headers';
2
+ import { HeadersAdapter } from 'next/dist/server/web/spec-extension/adapters/headers.js';
3
3
 
4
4
  declare class HeadersAdapterMock extends HeadersAdapter {
5
5
  constructor();
@@ -1,5 +1,5 @@
1
1
  import { fn } from '@storybook/test';
2
- import { HeadersAdapter } from 'next/dist/server/web/spec-extension/adapters/headers';
2
+ import { HeadersAdapter } from 'next/dist/server/web/spec-extension/adapters/headers.js';
3
3
 
4
4
  // src/plugins/next-mocks/alias/headers/headers.ts
5
5
  var HeadersAdapterMock = class extends HeadersAdapter {
@@ -2,8 +2,9 @@ import * as vitest from 'vitest';
2
2
  import * as next_dist_client_components_draft_mode from 'next/dist/client/components/draft-mode';
3
3
  export { headers } from './headers.js';
4
4
  export { cookies } from './cookies.js';
5
- import 'next/dist/server/web/spec-extension/adapters/headers';
5
+ import 'next/dist/server/web/spec-extension/adapters/headers.js';
6
6
  import 'next/dist/compiled/@edge-runtime/cookies';
7
+ import 'next/dist/compiled/@edge-runtime/cookies/index.js';
7
8
 
8
9
  declare const draftMode: vitest.Mock<[], next_dist_client_components_draft_mode.DraftMode>;
9
10
 
@@ -1,8 +1,8 @@
1
1
  import { fn } from '@storybook/test';
2
- import * as originalHeaders from 'next/dist/client/components/headers';
3
- import { HeadersAdapter } from 'next/dist/server/web/spec-extension/adapters/headers';
2
+ import * as originalHeaders from 'next/dist/client/components/headers.js';
3
+ import { HeadersAdapter } from 'next/dist/server/web/spec-extension/adapters/headers.js';
4
4
  import { headers as headers$1 } from '@storybook/nextjs/headers.mock';
5
- import { RequestCookies } from 'next/dist/compiled/@edge-runtime/cookies';
5
+ import { RequestCookies } from 'next/dist/compiled/@edge-runtime/cookies/index.js';
6
6
 
7
7
  // src/plugins/next-mocks/alias/headers/index.ts
8
8
  var HeadersAdapterMock = class extends HeadersAdapter {
@@ -1,7 +1,7 @@
1
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
- import * as actual from 'next/dist/client/components/navigation';
4
+ import * as actual from 'next/dist/client/components/navigation.js';
5
5
  export * from 'next/dist/client/components/navigation';
6
6
 
7
7
  declare const createNavigation: (overrides?: Record<string, (...params: unknown[]) => unknown>) => {
@@ -1,9 +1,9 @@
1
1
  import { fn } from '@storybook/test';
2
- import * as actual from 'next/dist/client/components/navigation';
3
- export * from 'next/dist/client/components/navigation';
4
- import { getRedirectError } from 'next/dist/client/components/redirect';
5
- import { RedirectStatusCode } from 'next/dist/client/components/redirect-status-code';
2
+ import * as actual from 'next/dist/client/components/navigation.js';
3
+ import { RedirectStatusCode } from 'next/dist/client/components/redirect-status-code.js';
4
+ import { getRedirectError } from 'next/dist/client/components/redirect.js';
6
5
  import { NextjsRouterMocksNotAvailable } from 'storybook/internal/preview-errors';
6
+ export * from 'next/dist/client/components/navigation';
7
7
 
8
8
  // src/plugins/next-mocks/alias/navigation/index.ts
9
9
  var navigationAPI;
@@ -2,11 +2,11 @@ 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';
5
- import * as originalRouter from 'next/dist/client/router';
6
- import originalRouter__default from 'next/dist/client/router';
5
+ import * as originalRouter from 'next/dist/client/router.js';
6
+ import originalRouter__default from 'next/dist/client/router.js';
7
+ export { default } from 'next/dist/client/router.js';
8
+ import { NextRouter } from 'next/router.js';
7
9
  export * from 'next/dist/client/router';
8
- export { default } from 'next/dist/client/router';
9
- import { NextRouter } from 'next/router';
10
10
 
11
11
  /**
12
12
  * Creates a next/router router API mock. Used internally.
@@ -1,8 +1,8 @@
1
1
  import { fn } from '@storybook/test';
2
- import * as singletonRouter from 'next/dist/client/router';
3
- import singletonRouter__default from 'next/dist/client/router';
4
- export * from 'next/dist/client/router';
2
+ import * as singletonRouter from 'next/dist/client/router.js';
3
+ import singletonRouter__default from 'next/dist/client/router.js';
5
4
  import { NextjsRouterMocksNotAvailable } from 'storybook/internal/preview-errors';
5
+ export * from 'next/dist/client/router';
6
6
 
7
7
  // src/plugins/next-mocks/alias/router/index.ts
8
8
  var defaultRouterState = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-storybook-nextjs",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vite-plugin",