@storybook/react-webpack5 0.0.0-pr-25244-sha-bd2cf8e0 → 0.0.0-pr-25254-sha-a6f30dbc

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/preset.d.ts CHANGED
@@ -2624,6 +2624,11 @@ interface Options$1 {
2624
2624
 
2625
2625
  type ExportName = string;
2626
2626
  type MetaId = string;
2627
+ /**
2628
+ * StaticParameters are a subset of the parameters
2629
+ * that have been statically analyzed.
2630
+ */
2631
+ type StaticParameters = Parameters;
2627
2632
  interface StoriesSpecifier {
2628
2633
  /**
2629
2634
  * When auto-titling, what to prefix all generated titles with (default: '')
@@ -2643,12 +2648,14 @@ interface StoriesSpecifier {
2643
2648
  type StoriesEntry = string | StoriesSpecifier;
2644
2649
  interface IndexerOptions {
2645
2650
  makeTitle: (userTitle?: string) => string;
2651
+ staticParameters?: string[];
2646
2652
  }
2647
2653
  interface IndexedStory {
2648
2654
  id: string;
2649
2655
  name: string;
2650
2656
  tags?: Tag[];
2651
2657
  parameters?: Parameters;
2658
+ staticParameters?: StaticParameters;
2652
2659
  }
2653
2660
  interface IndexedCSFFile {
2654
2661
  meta: {
@@ -2712,6 +2719,10 @@ type BaseIndexInput = {
2712
2719
  metaId?: MetaId;
2713
2720
  /** Tags for filtering entries in Storybook and its tools. */
2714
2721
  tags?: Tag[];
2722
+ /**
2723
+ * Experimental statically extracted parameters for the entry.
2724
+ */
2725
+ staticParameters?: Parameters;
2715
2726
  /**
2716
2727
  * The id of the entry, auto-generated from {@link title}/{@link metaId} and {@link exportName} if unspecified.
2717
2728
  * If specified, the story in the CSF file _must_ have a matching id set at `parameters.__id`, to be correctly matched.
@@ -2847,6 +2858,7 @@ interface CLIOptions {
2847
2858
  debugWebpack?: boolean;
2848
2859
  webpackStatsJson?: string | boolean;
2849
2860
  outputDir?: string;
2861
+ experimentalStaticParameters?: string[];
2850
2862
  }
2851
2863
  interface BuilderOptions {
2852
2864
  configType?: 'DEVELOPMENT' | 'PRODUCTION';
package/dist/preset.js CHANGED
@@ -1 +1 @@
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 preset_exports={};__export(preset_exports,{addons:()=>addons,core:()=>core,frameworkOptions:()=>frameworkOptions,webpack:()=>webpack});module.exports=__toCommonJS(preset_exports);var import_path=require("path"),getAbsolutePath=input=>(0,import_path.dirname)(require.resolve((0,import_path.join)(input,"package.json"))),addons=[getAbsolutePath("@storybook/preset-react-webpack")],defaultFrameworkOptions={legacyRootApi:!0},frameworkOptions=async(_,options)=>{let config=await options.presets.apply("framework");return typeof config=="string"?{name:config,options:defaultFrameworkOptions}:typeof config>"u"?{name:getAbsolutePath("@storybook/react-webpack5"),options:defaultFrameworkOptions}:{name:config.name,options:{...defaultFrameworkOptions,...config.options}}},core=async(config,options)=>{let framework=await options.presets.apply("framework");return{...config,builder:{name:getAbsolutePath("@storybook/builder-webpack5"),options:typeof framework=="string"?{}:framework.options.builder||{}},renderer:getAbsolutePath("@storybook/react")}},webpack=async config=>(config.resolve=config.resolve||{},config.resolve.alias={...config.resolve?.alias,"@storybook/react":getAbsolutePath("@storybook/react")},config);0&&(module.exports={addons,core,frameworkOptions,webpack});
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 preset_exports={};__export(preset_exports,{addons:()=>addons,core:()=>core,frameworkOptions:()=>frameworkOptions,webpack:()=>webpack});module.exports=__toCommonJS(preset_exports);var import_path=require("path"),getAbsolutePath=input=>(0,import_path.dirname)(require.resolve((0,import_path.join)(input,"package.json"))),addons=[getAbsolutePath("@storybook/preset-react-webpack")],defaultFrameworkOptions={legacyRootApi:!0},frameworkOptions=async(_,options)=>{let config=await options.presets.apply("framework");return typeof config=="string"?{name:config,options:defaultFrameworkOptions}:typeof config>"u"?{name:getAbsolutePath("@storybook/react-webpack5"),options:defaultFrameworkOptions}:{name:config.name,options:{...defaultFrameworkOptions,...config.options}}},core=async(config,options)=>{let framework=await options.presets.apply("framework");return{...config,builder:{name:getAbsolutePath("@storybook/builder-webpack5"),options:typeof framework=="string"?{}:framework.options.builder||{}},renderer:getAbsolutePath("@storybook/react")}},webpack=async config=>{var _a;return config.resolve=config.resolve||{},config.resolve.alias={...(_a=config.resolve)==null?void 0:_a.alias,"@storybook/react":getAbsolutePath("@storybook/react")},config};0&&(module.exports={addons,core,frameworkOptions,webpack});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-webpack5",
3
- "version": "0.0.0-pr-25244-sha-bd2cf8e0",
3
+ "version": "0.0.0-pr-25254-sha-a6f30dbc",
4
4
  "description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
5
5
  "keywords": [
6
6
  "storybook"
@@ -47,9 +47,9 @@
47
47
  "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
48
48
  },
49
49
  "dependencies": {
50
- "@storybook/builder-webpack5": "0.0.0-pr-25244-sha-bd2cf8e0",
51
- "@storybook/preset-react-webpack": "0.0.0-pr-25244-sha-bd2cf8e0",
52
- "@storybook/react": "0.0.0-pr-25244-sha-bd2cf8e0",
50
+ "@storybook/builder-webpack5": "0.0.0-pr-25254-sha-a6f30dbc",
51
+ "@storybook/preset-react-webpack": "0.0.0-pr-25254-sha-a6f30dbc",
52
+ "@storybook/react": "0.0.0-pr-25254-sha-a6f30dbc",
53
53
  "@types/node": "^18.0.0"
54
54
  },
55
55
  "devDependencies": {