@storybook/nextjs-vite 10.2.0-alpha.1 → 10.2.0-alpha.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.
- package/README.md +1 -1
- package/dist/_browser-chunks/{chunk-37RBXWOJ.js → chunk-4ZRKYE2G.js} +8 -8
- package/dist/_node-chunks/{chunk-F4TXLX26.js → chunk-D5BCPVZM.js} +6 -6
- package/dist/_node-chunks/{dist-ROPG4PVY.js → dist-MNO5ABZU.js} +151 -151
- package/dist/_node-chunks/{jiti-FFFI55JO.js → jiti-S4Y7B5VC.js} +11 -11
- package/dist/export-mocks/headers/index.d.ts +8 -8
- package/dist/export-mocks/headers/index.js +5 -5
- package/dist/export-mocks/navigation/index.d.ts +2 -2
- package/dist/export-mocks/navigation/index.js +4 -4
- package/dist/export-mocks/router/index.d.ts +4 -4
- package/dist/export-mocks/router/index.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +64 -64
- package/dist/node/index.js +7 -7
- package/dist/preset.js +111 -111
- package/dist/preview.js +1 -1
- package/dist/vite-plugin/index.js +7 -7
- package/package.json +9 -13
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Storybook for Next.js with Vite Builder
|
|
2
2
|
|
|
3
|
-
See [documentation](https://storybook.js.org/docs/get-started/frameworks/nextjs?renderer=react&ref=readme) for installation instructions, usage examples, APIs, and more.
|
|
3
|
+
See [documentation](https://storybook.js.org/docs/get-started/frameworks/nextjs-vite?renderer=react&ref=readme) for installation instructions, usage examples, APIs, and more.
|
|
4
4
|
|
|
5
5
|
## Acknowledgements
|
|
6
6
|
|
|
@@ -11,15 +11,15 @@ __export(preview_exports, {
|
|
|
11
11
|
});
|
|
12
12
|
import { createNavigation } from "@storybook/nextjs-vite/navigation.mock";
|
|
13
13
|
import { createRouter } from "@storybook/nextjs-vite/router.mock";
|
|
14
|
-
import { isNextRouterError } from "next/dist/client/components/is-next-router-error";
|
|
14
|
+
import { isNextRouterError } from "next/dist/client/components/is-next-router-error.js";
|
|
15
15
|
|
|
16
16
|
// src/head-manager/decorator.tsx
|
|
17
17
|
import * as React2 from "react";
|
|
18
18
|
|
|
19
19
|
// src/head-manager/head-manager-provider.tsx
|
|
20
20
|
import React, { useMemo } from "react";
|
|
21
|
-
import initHeadManager from "next/dist/client/head-manager";
|
|
22
|
-
import { HeadManagerContext } from "next/dist/shared/lib/head-manager-context.shared-runtime";
|
|
21
|
+
import initHeadManager from "next/dist/client/head-manager.js";
|
|
22
|
+
import { HeadManagerContext } from "next/dist/shared/lib/head-manager-context.shared-runtime.js";
|
|
23
23
|
var HeadManagerProvider = ({ children }) => {
|
|
24
24
|
let headManager = useMemo(initHeadManager, []);
|
|
25
25
|
return headManager.getIsSsr = () => !1, React.createElement(HeadManagerContext.Provider, { value: headManager }, children);
|
|
@@ -35,7 +35,7 @@ var ImageDecorator = (Story, { parameters: parameters2 }) => parameters2.nextjs?
|
|
|
35
35
|
|
|
36
36
|
// src/routing/decorator.tsx
|
|
37
37
|
import * as React6 from "react";
|
|
38
|
-
import { RedirectBoundary } from "next/dist/client/components/redirect-boundary";
|
|
38
|
+
import { RedirectBoundary } from "next/dist/client/components/redirect-boundary.js";
|
|
39
39
|
|
|
40
40
|
// src/routing/app-router-provider.tsx
|
|
41
41
|
import React4, { useMemo as useMemo2 } from "react";
|
|
@@ -44,13 +44,13 @@ import {
|
|
|
44
44
|
AppRouterContext,
|
|
45
45
|
GlobalLayoutRouterContext,
|
|
46
46
|
LayoutRouterContext
|
|
47
|
-
} from "next/dist/shared/lib/app-router-context.shared-runtime";
|
|
47
|
+
} from "next/dist/shared/lib/app-router-context.shared-runtime.js";
|
|
48
48
|
import {
|
|
49
49
|
PathParamsContext,
|
|
50
50
|
PathnameContext,
|
|
51
51
|
SearchParamsContext
|
|
52
|
-
} from "next/dist/shared/lib/hooks-client-context.shared-runtime";
|
|
53
|
-
import { PAGE_SEGMENT_KEY } from "next/dist/shared/lib/segment";
|
|
52
|
+
} from "next/dist/shared/lib/hooks-client-context.shared-runtime.js";
|
|
53
|
+
import { PAGE_SEGMENT_KEY } from "next/dist/shared/lib/segment.js";
|
|
54
54
|
var getParallelRoutes = (segmentsList) => {
|
|
55
55
|
let segment = segmentsList.shift();
|
|
56
56
|
return segment ? [segment, { children: getParallelRoutes(segmentsList) }] : [];
|
|
@@ -130,7 +130,7 @@ var getParallelRoutes = (segmentsList) => {
|
|
|
130
130
|
// src/routing/page-router-provider.tsx
|
|
131
131
|
import React5 from "react";
|
|
132
132
|
import { getRouter as getRouter2 } from "@storybook/nextjs-vite/router.mock";
|
|
133
|
-
import { RouterContext } from "next/dist/shared/lib/router-context.shared-runtime";
|
|
133
|
+
import { RouterContext } from "next/dist/shared/lib/router-context.shared-runtime.js";
|
|
134
134
|
var PageRouterProvider = ({ children }) => React5.createElement(RouterContext.Provider, { value: getRouter2() }, children);
|
|
135
135
|
|
|
136
136
|
// src/routing/decorator.tsx
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_i7rmmzjpbq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_i7rmmzjpbq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_i7rmmzjpbq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_i7rmmzjpbq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_i7rmmzjpbq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_i7rmmzjpbq.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|