@storybook/nextjs-vite 9.2.0-alpha.2 → 10.0.0-beta.0

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 (46) hide show
  1. package/README.md +3 -1
  2. package/dist/_browser-chunks/chunk-2RWWBM6A.js +261 -0
  3. package/dist/_browser-chunks/chunk-L5NVL7MD.js +37 -0
  4. package/dist/_browser-chunks/react-18-G7Q4PNHD.js +71 -0
  5. package/dist/_node-chunks/chunk-IHKOVONR.js +54 -0
  6. package/dist/_node-chunks/dist-YEP22NZU.js +7476 -0
  7. package/dist/_node-chunks/jiti-4UV67MCQ.js +32362 -0
  8. package/dist/export-mocks/cache/index.d.ts +308 -1
  9. package/dist/export-mocks/cache/index.js +22 -1
  10. package/dist/export-mocks/headers/index.d.ts +309 -1
  11. package/dist/export-mocks/headers/index.js +77 -1
  12. package/dist/export-mocks/navigation/index.js +81 -1
  13. package/dist/export-mocks/router/index.d.ts +2 -2
  14. package/dist/export-mocks/router/index.js +97 -1
  15. package/dist/index.d.ts +51 -7
  16. package/dist/index.js +22153 -45
  17. package/dist/node/index.d.ts +25 -5
  18. package/dist/node/index.js +23 -1
  19. package/dist/preset.js +714 -580
  20. package/dist/preview.d.ts +3 -19
  21. package/dist/preview.d.tsx +19 -0
  22. package/dist/preview.js +11 -1
  23. package/dist/vite-plugin/index.d.ts +1 -3
  24. package/dist/vite-plugin/index.js +21 -1
  25. package/package.json +35 -83
  26. package/preset.js +1 -1
  27. package/template/cli/js/Configure.mdx +11 -11
  28. package/template/cli/ts/Configure.mdx +11 -11
  29. package/dist/chunk-GKRSUUNG.mjs +0 -6
  30. package/dist/chunk-J3BB7LEU.mjs +0 -20
  31. package/dist/chunk-XP5HYGXS.mjs +0 -3
  32. package/dist/export-mocks/cache/index.mjs +0 -6
  33. package/dist/export-mocks/headers/index.mjs +0 -12
  34. package/dist/export-mocks/navigation/index.mjs +0 -11
  35. package/dist/export-mocks/router/index.mjs +0 -10
  36. package/dist/images/decorator.d.ts +0 -6
  37. package/dist/images/decorator.js +0 -1
  38. package/dist/images/decorator.mjs +0 -2
  39. package/dist/index.d-ff220430.d.ts +0 -310
  40. package/dist/index.mjs +0 -57
  41. package/dist/node/index.mjs +0 -5
  42. package/dist/preset.d.ts +0 -9
  43. package/dist/preview.mjs +0 -3
  44. package/dist/react-18-IGIL3GJQ.mjs +0 -7
  45. package/dist/types-d044381e.d.ts +0 -52
  46. package/dist/vite-plugin/index.mjs +0 -6
@@ -1,8 +1,28 @@
1
- import { S as StorybookConfig } from '../types-d044381e.js';
2
- import 'storybook/internal/types';
3
- import '@storybook/builder-vite';
4
- import '@storybook/react-vite';
5
- import 'next/router';
1
+ import { CompatibleString } from 'storybook/internal/types';
2
+ import { BuilderOptions } from '@storybook/builder-vite';
3
+ import { StorybookConfig as StorybookConfig$1 } from '@storybook/react-vite';
4
+
5
+ type FrameworkName = CompatibleString<'@storybook/nextjs-vite'>;
6
+ type BuilderName = CompatibleString<'@storybook/builder-vite'>;
7
+ type FrameworkOptions = {
8
+ /** The path to the Next.js configuration file. */
9
+ nextConfigPath?: string;
10
+ builder?: BuilderOptions;
11
+ };
12
+ type StorybookConfigFramework = {
13
+ framework: FrameworkName | {
14
+ name: FrameworkName;
15
+ options: FrameworkOptions;
16
+ };
17
+ core?: StorybookConfig$1['core'] & {
18
+ builder?: BuilderName | {
19
+ name: BuilderName;
20
+ options: BuilderOptions;
21
+ };
22
+ };
23
+ };
24
+ /** The interface for Storybook configuration in `main.ts` files. */
25
+ type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigFramework> & StorybookConfigFramework;
6
26
 
7
27
  declare function defineMain(config: StorybookConfig): StorybookConfig;
8
28
 
@@ -1 +1,23 @@
1
- "use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var node_exports={};__export(node_exports,{defineMain:()=>defineMain});module.exports=__toCommonJS(node_exports);function defineMain(config){return config}0&&(module.exports={defineMain});
1
+ import CJS_COMPAT_NODE_URL_2461sgdhwki from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2461sgdhwki from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2461sgdhwki from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_2461sgdhwki.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2461sgdhwki.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2461sgdhwki.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+ import {
13
+ __name
14
+ } from "../_node-chunks/chunk-IHKOVONR.js";
15
+
16
+ // src/node/index.ts
17
+ function defineMain(config) {
18
+ return config;
19
+ }
20
+ __name(defineMain, "defineMain");
21
+ export {
22
+ defineMain
23
+ };