@storybook/angular-vite 11.0.0-alpha.4 → 11.0.0-alpha.6

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,9 +1,9 @@
1
1
  import {
2
2
  config_exports
3
- } from "./chunk-TN7UZNXT.js";
3
+ } from "./chunk-RX6XLQUB.js";
4
4
  import {
5
5
  config_exports as config_exports2
6
- } from "./chunk-K4OVBYYR.js";
6
+ } from "./chunk-WUACJKA6.js";
7
7
  import {
8
8
  computesTemplateFromComponent,
9
9
  formatPropInTemplate,
@@ -672,7 +672,7 @@ var parameters = {
672
672
  renderer: "angular",
673
673
  docs: {
674
674
  story: { inline: !0 },
675
- extractArgTypes: (component) => global3.FEATURES?.experimentalDocgenServer === !0 ? {} : extractArgTypes2(component),
675
+ extractArgTypes: (component) => global3.FEATURES?.docgenServer === !0 ? {} : extractArgTypes2(component),
676
676
  extractComponentDescription
677
677
  }
678
678
  }, argTypesEnhancers = [enhanceArgTypes];
@@ -31,7 +31,7 @@ var skipSourceRender = (context) => {
31
31
  };
32
32
 
33
33
  // src/client/docs/config.ts
34
- var useStaticServiceSnippets = globalThis.FEATURES?.experimentalDocgenServer === !0, parameters = {
34
+ var useStaticServiceSnippets = globalThis.FEATURES?.docgenServer === !0, parameters = {
35
35
  docs: {
36
36
  source: {
37
37
  type: SourceType2.DYNAMIC,
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_mhv49gwwcwe from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_mhv49gwwcwe from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_mhv49gwwcwe from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6qzh0wnbkki from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6qzh0wnbkki from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6qzh0wnbkki from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_mhv49gwwcwe.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_mhv49gwwcwe.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_mhv49gwwcwe.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6qzh0wnbkki.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6qzh0wnbkki.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6qzh0wnbkki.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_mhv49gwwcwe from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_mhv49gwwcwe from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_mhv49gwwcwe from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6qzh0wnbkki from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6qzh0wnbkki from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6qzh0wnbkki from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_mhv49gwwcwe.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_mhv49gwwcwe.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_mhv49gwwcwe.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6qzh0wnbkki.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6qzh0wnbkki.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6qzh0wnbkki.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_mhv49gwwcwe from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_mhv49gwwcwe from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_mhv49gwwcwe from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6qzh0wnbkki from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6qzh0wnbkki from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6qzh0wnbkki from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_mhv49gwwcwe.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_mhv49gwwcwe.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_mhv49gwwcwe.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6qzh0wnbkki.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6qzh0wnbkki.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6qzh0wnbkki.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  up
14
- } from "./chunk-DPUVYM6P.js";
14
+ } from "./chunk-FGSVBOEC.js";
15
15
 
16
16
  // ../../../node_modules/empathic/package.mjs
17
17
  function up2(options) {
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_mhv49gwwcwe from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_mhv49gwwcwe from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_mhv49gwwcwe from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6qzh0wnbkki from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6qzh0wnbkki from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6qzh0wnbkki from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_mhv49gwwcwe.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_mhv49gwwcwe.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_mhv49gwwcwe.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6qzh0wnbkki.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6qzh0wnbkki.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6qzh0wnbkki.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_mhv49gwwcwe from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_mhv49gwwcwe from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_mhv49gwwcwe from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6qzh0wnbkki from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6qzh0wnbkki from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6qzh0wnbkki from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_mhv49gwwcwe.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_mhv49gwwcwe.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_mhv49gwwcwe.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6qzh0wnbkki.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6qzh0wnbkki.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6qzh0wnbkki.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -15,10 +15,10 @@ import {
15
15
  printErrorDetails,
16
16
  requireBuilderTarget,
17
17
  up
18
- } from "../../_node-chunks/chunk-HQBCIZ5X.js";
18
+ } from "../../_node-chunks/chunk-YLAQIHVN.js";
19
19
  import {
20
20
  resolveTsconfig
21
- } from "../../_node-chunks/chunk-DPUVYM6P.js";
21
+ } from "../../_node-chunks/chunk-FGSVBOEC.js";
22
22
 
23
23
  // src/builders/build-storybook/index.ts
24
24
  import { readFileSync } from "node:fs";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_mhv49gwwcwe from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_mhv49gwwcwe from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_mhv49gwwcwe from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6qzh0wnbkki from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6qzh0wnbkki from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6qzh0wnbkki from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_mhv49gwwcwe.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_mhv49gwwcwe.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_mhv49gwwcwe.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6qzh0wnbkki.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6qzh0wnbkki.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6qzh0wnbkki.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -15,10 +15,10 @@ import {
15
15
  printErrorDetails,
16
16
  requireBuilderTarget,
17
17
  up
18
- } from "../../_node-chunks/chunk-HQBCIZ5X.js";
18
+ } from "../../_node-chunks/chunk-YLAQIHVN.js";
19
19
  import {
20
20
  resolveTsconfig
21
- } from "../../_node-chunks/chunk-DPUVYM6P.js";
21
+ } from "../../_node-chunks/chunk-FGSVBOEC.js";
22
22
 
23
23
  // src/builders/start-storybook/index.ts
24
24
  import { readFileSync } from "node:fs";
@@ -40,7 +40,7 @@ type FrameworkOptions = {
40
40
  *
41
41
  * Tag a member `@ignore` to drop it whatever this says.
42
42
  *
43
- * `api` needs `features.experimentalDocgenServer`; without it only `all` and `inputs` apply.
43
+ * `api` needs `features.docgenServer`; without it only `all` and `inputs` apply.
44
44
  *
45
45
  * @default 'api'
46
46
  */
@@ -2,7 +2,7 @@ import {
2
2
  argTypesEnhancers,
3
3
  decorateStory,
4
4
  parameters
5
- } from "../_browser-chunks/chunk-TN7UZNXT.js";
5
+ } from "../_browser-chunks/chunk-RX6XLQUB.js";
6
6
  import {
7
7
  render,
8
8
  renderToCanvas
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  decorators,
3
3
  parameters
4
- } from "../../_browser-chunks/chunk-K4OVBYYR.js";
4
+ } from "../../_browser-chunks/chunk-WUACJKA6.js";
5
5
  import "../../_browser-chunks/chunk-BFQMI74D.js";
6
6
  export {
7
7
  decorators,
@@ -5,9 +5,9 @@ import {
5
5
  componentWrapperDecorator,
6
6
  moduleMetadata,
7
7
  setProjectAnnotations
8
- } from "../_browser-chunks/chunk-ONLO5U66.js";
9
- import "../_browser-chunks/chunk-TN7UZNXT.js";
10
- import "../_browser-chunks/chunk-K4OVBYYR.js";
8
+ } from "../_browser-chunks/chunk-7BGWKSXV.js";
9
+ import "../_browser-chunks/chunk-RX6XLQUB.js";
10
+ import "../_browser-chunks/chunk-WUACJKA6.js";
11
11
  import "../_browser-chunks/chunk-BFQMI74D.js";
12
12
  export {
13
13
  __definePreview,
@@ -1,26 +1,26 @@
1
- import CJS_COMPAT_NODE_URL_mhv49gwwcwe from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_mhv49gwwcwe from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_mhv49gwwcwe from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6qzh0wnbkki from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6qzh0wnbkki from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6qzh0wnbkki from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_mhv49gwwcwe.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_mhv49gwwcwe.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_mhv49gwwcwe.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6qzh0wnbkki.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6qzh0wnbkki.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6qzh0wnbkki.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  resolveStoryComponent
14
- } from "../_node-chunks/chunk-QYZAAGUK.js";
14
+ } from "../_node-chunks/chunk-L6PSCC7H.js";
15
15
 
16
16
  // src/docgen/docgen-worker.ts
17
17
  import { STORY_FILE_TEST_REGEXP, getStoryImportPathFromEntry as getStoryImportPathFromEntry2 } from "storybook/internal/common";
18
18
  import { logger as logger4 } from "storybook/internal/node-logger";
19
19
 
20
20
  // ../../lib/angular-cm/dist/index.js
21
- import CJS_COMPAT_NODE_URL_b09959ht90o from "node:url";
22
- import CJS_COMPAT_NODE_PATH_b09959ht90o from "node:path";
23
- import CJS_COMPAT_NODE_MODULE_b09959ht90o from "node:module";
21
+ import CJS_COMPAT_NODE_URL_a2ps5gmzwn4 from "node:url";
22
+ import CJS_COMPAT_NODE_PATH_a2ps5gmzwn4 from "node:path";
23
+ import CJS_COMPAT_NODE_MODULE_a2ps5gmzwn4 from "node:module";
24
24
  import { isInNodeModules } from "storybook/internal/common";
25
25
  import {
26
26
  ComponentMetaManager,
@@ -36,7 +36,7 @@ import { logger as logger3 } from "storybook/internal/node-logger";
36
36
  import * as path from "node:path";
37
37
  import { logger as logger2 } from "storybook/internal/node-logger";
38
38
  import { logger } from "storybook/internal/node-logger";
39
- var __filename = CJS_COMPAT_NODE_URL_b09959ht90o.fileURLToPath(import.meta.url), __dirname = CJS_COMPAT_NODE_PATH_b09959ht90o.dirname(__filename), require2 = CJS_COMPAT_NODE_MODULE_b09959ht90o.createRequire(import.meta.url), resolvedSymbol = (ctx, node) => {
39
+ var __filename = CJS_COMPAT_NODE_URL_a2ps5gmzwn4.fileURLToPath(import.meta.url), __dirname = CJS_COMPAT_NODE_PATH_a2ps5gmzwn4.dirname(__filename), require2 = CJS_COMPAT_NODE_MODULE_a2ps5gmzwn4.createRequire(import.meta.url), resolvedSymbol = (ctx, node) => {
40
40
  let symbol = ctx.checker.getSymbolAtLocation(node);
41
41
  return symbol && symbol.flags & ctx.ts.SymbolFlags.Alias ? ctx.checker.getAliasedSymbol(symbol) : symbol;
42
42
  }, resolvedNameSymbol = (ctx, name) => {
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { n as StorybookConfig, t as FrameworkOptions } from "./chunk-Bv2XDHY-.js";
1
+ import { n as StorybookConfig, t as FrameworkOptions } from "./chunk-DAsMMupp.js";
2
2
  import { AnnotatedStoryFn, ArgTypes, Args, Args as Args$1, ArgsStoryFn, ComponentAnnotations, DecoratorFunction, LoaderFunction, NamedOrDefaultProjectAnnotations, NormalizedProjectAnnotations, Parameters as Parameters$1, Parameters as Parameters$2, ProjectAnnotations, StoryAnnotations, StoryContext as StoryContext$1, StrictArgs, StrictArgs as StrictArgs$1, WebRenderer } from "storybook/internal/types";
3
3
  import * as AngularCore from "@angular/core";
4
4
  import { ApplicationConfig, Provider, Type } from "@angular/core";
5
- import { AddonTypes, InferTypes, Meta as Meta$1, MetaInput, MetaTypes, Preview as Preview$1, PreviewAddon, Story, StoryArgs, TypedMetaArgKeys, WithRenderArgs } from "storybook/internal/csf";
5
+ import { AddonTypes, InferTypes, Meta as Meta$1, MetaInput, MetaTypes, Preview as Preview$1, PreviewAddonEntry, Story, StoryArgs, TypedMetaArgKeys, WithRenderArgs } from "storybook/internal/csf";
6
6
 
7
7
  //#region code/frameworks/angular-vite/.dts-emit/code/frameworks/angular-vite/src/client/types.d.ts
8
8
  interface NgModuleMetadata {
@@ -201,7 +201,7 @@ type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
201
201
  * });
202
202
  * ```
203
203
  */
204
- declare function __definePreview<Addons extends PreviewAddon<never>[]>(input: {
204
+ declare function __definePreview<Addons extends PreviewAddonEntry[]>(input: {
205
205
  addons: Addons;
206
206
  } & ProjectAnnotations<AngularRenderer & InferTypes<Addons>>): AngularPreview<AngularRenderer & InferTypes<Addons>>;
207
207
  type InferComponentArgs<C extends abstract new (...args: any) => any> = Partial<TransformComponentType<InstanceType<C>>>;
package/dist/index.js CHANGED
@@ -5,9 +5,9 @@ import {
5
5
  componentWrapperDecorator,
6
6
  moduleMetadata,
7
7
  setProjectAnnotations
8
- } from "./_browser-chunks/chunk-ONLO5U66.js";
9
- import "./_browser-chunks/chunk-TN7UZNXT.js";
10
- import "./_browser-chunks/chunk-K4OVBYYR.js";
8
+ } from "./_browser-chunks/chunk-7BGWKSXV.js";
9
+ import "./_browser-chunks/chunk-RX6XLQUB.js";
10
+ import "./_browser-chunks/chunk-WUACJKA6.js";
11
11
  import "./_browser-chunks/chunk-BFQMI74D.js";
12
12
  export {
13
13
  __definePreview,
@@ -1,4 +1,4 @@
1
- import { n as StorybookConfig } from "../chunk-Bv2XDHY-.js";
1
+ import { n as StorybookConfig } from "../chunk-DAsMMupp.js";
2
2
 
3
3
  //#region code/frameworks/angular-vite/.dts-emit/code/frameworks/angular-vite/src/node/index.d.ts
4
4
  declare function defineMain(config: StorybookConfig): StorybookConfig;
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_mhv49gwwcwe from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_mhv49gwwcwe from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_mhv49gwwcwe from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6qzh0wnbkki from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6qzh0wnbkki from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6qzh0wnbkki from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_mhv49gwwcwe.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_mhv49gwwcwe.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_mhv49gwwcwe.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6qzh0wnbkki.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6qzh0wnbkki.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6qzh0wnbkki.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_mhv49gwwcwe from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_mhv49gwwcwe from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_mhv49gwwcwe from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6qzh0wnbkki from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6qzh0wnbkki from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6qzh0wnbkki from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_mhv49gwwcwe.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_mhv49gwwcwe.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_mhv49gwwcwe.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6qzh0wnbkki.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6qzh0wnbkki.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6qzh0wnbkki.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
package/dist/preset.js CHANGED
@@ -1,20 +1,20 @@
1
- import CJS_COMPAT_NODE_URL_mhv49gwwcwe from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_mhv49gwwcwe from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_mhv49gwwcwe from "node:module";
1
+ import CJS_COMPAT_NODE_URL_6qzh0wnbkki from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_6qzh0wnbkki from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_6qzh0wnbkki from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_mhv49gwwcwe.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_mhv49gwwcwe.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_mhv49gwwcwe.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_6qzh0wnbkki.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_6qzh0wnbkki.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_6qzh0wnbkki.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  findTsconfigUp
14
- } from "./_node-chunks/chunk-DPUVYM6P.js";
14
+ } from "./_node-chunks/chunk-FGSVBOEC.js";
15
15
  import {
16
16
  parseStoryFile
17
- } from "./_node-chunks/chunk-QYZAAGUK.js";
17
+ } from "./_node-chunks/chunk-L6PSCC7H.js";
18
18
 
19
19
  // src/preset.ts
20
20
  import { findConfigFile } from "storybook/internal/common";
@@ -33,7 +33,7 @@ import {
33
33
  import { existsSync as existsSync2, readFileSync as readFileSync3, statSync as statSync2 } from "node:fs";
34
34
  import { createRequire as createRequire2 } from "node:module";
35
35
  import { basename, dirname as dirname2, isAbsolute as isAbsolute2, join as join3, relative as relative2, resolve as resolve4 } from "node:path";
36
- import { fileURLToPath as fileURLToPath2 } from "node:url";
36
+ import { fileURLToPath as fileURLToPath3 } from "node:url";
37
37
 
38
38
  // src/compodoc-config.ts
39
39
  import { resolve } from "node:path";
@@ -84,8 +84,8 @@ var MODES = ["all", "api", "inputs"], configuredMode = (frameworkOptions) => {
84
84
  "The `angularFilterNonInputControls` feature is deprecated and will be removed in Storybook 11. " + (configured !== void 0 ? `The \`propsTable: '${mode}'\` framework option takes precedence over it, so the feature has no effect and can be removed.` : `Replace it with the \`propsTable: '${mode}'\` option on your \`@storybook/angular-vite\` framework.`)
85
85
  );
86
86
  }
87
- configured === "api" && features2?.experimentalDocgenServer !== !0 && logger.warn(
88
- "`propsTable: 'api'` needs the `experimentalDocgenServer` feature, which is off, so the props table keeps showing every member. Enable it with `features: { experimentalDocgenServer: true }`, or set `propsTable: 'all'` to say you want every member."
87
+ configured === "api" && features2?.docgenServer !== !0 && logger.warn(
88
+ "`propsTable: 'api'` needs the `docgenServer` feature, which is off, so the props table keeps showing every member. Enable it with `features: { docgenServer: true }`, or set `propsTable: 'all'` to say you want every member."
89
89
  );
90
90
  };
91
91
 
@@ -235,14 +235,14 @@ var COMPODOC_LOCK = ".compodoc.lock", COMPODOC_RUN_MARKER = ".compodoc.run", RUN
235
235
 
236
236
  // src/docgen/preset.ts
237
237
  import { fileURLToPath } from "node:url";
238
+
239
+ // src/docgen/worker-specifier.ts
240
+ var DOCGEN_WORKER_SPECIFIER = "@storybook/angular-vite/internal/docgen-worker";
241
+
242
+ // src/docgen/preset.ts
238
243
  var experimental_docgenProvider = async (existing = [], options) => {
239
- let features2 = await options?.presets?.apply("features", {});
240
- if (!features2?.experimentalDocgenServer)
241
- return existing;
242
- let descriptor = {
243
- moduleSpecifier: fileURLToPath(
244
- import.meta.resolve("@storybook/angular-vite/internal/docgen-worker")
245
- ),
244
+ let features2 = await options?.presets?.apply("features", {}), descriptor = {
245
+ moduleSpecifier: fileURLToPath(import.meta.resolve(DOCGEN_WORKER_SPECIFIER)),
246
246
  options: {
247
247
  propsTable: resolvePropsTable(await options?.presets?.apply("frameworkOptions"), features2)
248
248
  }
@@ -250,7 +250,7 @@ var experimental_docgenProvider = async (existing = [], options) => {
250
250
  return [...existing, descriptor];
251
251
  }, experimental_manifests = async (existingManifests = {}, options) => {
252
252
  let features2 = await options?.presets?.apply("features", {});
253
- if (!features2?.experimentalDocgenServer || !features2?.componentsManifest)
253
+ if (!features2?.docgenServer || !features2?.componentsManifest)
254
254
  return existingManifests;
255
255
  let existingComponents = existingManifests.components;
256
256
  return {
@@ -264,16 +264,17 @@ var experimental_docgenProvider = async (existing = [], options) => {
264
264
  };
265
265
 
266
266
  // src/docgen/story-docs-preset.ts
267
- import { STORY_FILE_TEST_REGEXP, getStoryImportPathFromEntry as getStoryImportPathFromEntry2 } from "storybook/internal/common";
268
- import { getService } from "storybook/internal/core-server";
267
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
268
+ import { createWorkerGatedStoryDocsProvider, getService } from "storybook/internal/core-server";
269
269
  import { logger as logger4 } from "storybook/internal/node-logger";
270
270
 
271
271
  // src/docgen/story-docs-build.ts
272
- import { types as t5 } from "storybook/internal/babel";
272
+ import { types as t4 } from "storybook/internal/babel";
273
273
  import { getComponentIdFromEntry, getStoryImportPathFromEntry } from "storybook/internal/common";
274
- import { storyNameFromExport } from "storybook/internal/csf";
274
+ import { storyNameFromExport } from "storybook/internal/csf/csf-utils";
275
275
  import {
276
276
  buildImportStatements as buildImportStatements2,
277
+ authoredSource,
277
278
  collectImportBindings,
278
279
  createStoryArgsResolver,
279
280
  createStoryReferenceResolver,
@@ -282,7 +283,7 @@ import {
282
283
  parseReferenceModule,
283
284
  resolveComponentImport as resolveComponentImport2,
284
285
  unresolvedWarning,
285
- unwrapExpression as unwrapExpression5
286
+ unwrapExpression as unwrapExpression4
286
287
  } from "storybook/internal/csf-tools";
287
288
  import { resolve as resolve3 } from "node:path";
288
289
 
@@ -458,6 +459,7 @@ import {
458
459
  isCanonicalCsf2BindCall,
459
460
  isCsfFactoryCall,
460
461
  sourceOf,
462
+ templateParts,
461
463
  unwrapExpression as unwrapExpression2
462
464
  } from "storybook/internal/csf-tools";
463
465
  var bindingAttributes = ({ inputs, outputs }, filter, representedArgs) => {
@@ -533,18 +535,7 @@ var bindingAttributes = ({ inputs, outputs }, filter, representedArgs) => {
533
535
  markup,
534
536
  representedArgs: [...representedArgs],
535
537
  expansions
536
- }), templateParts = (node) => {
537
- if (t2.isTemplateLiteral(node))
538
- return {
539
- quasis: node.quasis.map((quasi) => quasi.value.cooked ?? ""),
540
- expressions: node.expressions
541
- };
542
- if (!(!t2.isTaggedTemplateExpression(node) || !isStringRawTag(node.tag)))
543
- return {
544
- quasis: node.quasi.quasis.map((quasi) => quasi.value.raw),
545
- expressions: node.quasi.expressions
546
- };
547
- }, isStringRawTag = (tag) => t2.isMemberExpression(tag) && !tag.computed && t2.isIdentifier(tag.object, { name: "String" }) && t2.isIdentifier(tag.property, { name: "raw" }), interpolate = ({ quasis, expressions }, shape, bindings, scope, representedArgs, expansions) => {
538
+ }), interpolate = ({ quasis, expressions }, shape, bindings, scope, representedArgs, expansions) => {
548
539
  let markup = quasis[0] ?? "";
549
540
  for (let [index, expression] of expressions.entries()) {
550
541
  let marker = `data-storybook-args-to-template-${index}`;
@@ -820,50 +811,6 @@ ${members.join(`
820
811
  return warning === void 0 ? { snippet } : { snippet, warning };
821
812
  };
822
813
 
823
- // src/docgen/story-docs-source.ts
824
- import { types as t4 } from "storybook/internal/babel";
825
- import {
826
- resolveArgValue,
827
- resolveObjectMembers,
828
- sourceOf as sourceOf2,
829
- unwrapExpression as unwrapExpression4
830
- } from "storybook/internal/csf-tools";
831
- var authoredSource = (shape, ctx) => {
832
- for (let members of [shape.members, shape.metaMembers]) {
833
- let code = memberAt(members, ["parameters", "docs", "source", "code"], ctx);
834
- if (code.kind === "missing")
835
- continue;
836
- if (code.kind === "masked")
837
- return { kind: "missing" };
838
- if (code.kind === "unresolvable")
839
- return code;
840
- let resolved = resolveArgValue(code.node, ctx), value = unwrapExpression4(resolved.node);
841
- if (t4.isIdentifier(value, { name: "undefined" }) || t4.isUnaryExpression(value, { operator: "void" }))
842
- continue;
843
- if (t4.isNullLiteral(value))
844
- return { kind: "disabled" };
845
- if (t4.isStringLiteral(value))
846
- return { kind: "code", code: value.value };
847
- let parts = templateParts(value);
848
- return parts && parts.expressions.length === 0 ? { kind: "code", code: parts.quasis[0] ?? "" } : { kind: "unresolvable", source: sourceOf2(code.node) };
849
- }
850
- return { kind: "missing" };
851
- }, memberAt = (members, path, ctx) => {
852
- let result = memberOf(members, path[0]);
853
- for (let [depth, key] of path.slice(1).entries()) {
854
- if (result.kind !== "value")
855
- return result;
856
- let original = result.node, object = unwrapExpression4(resolveArgValue(original, ctx).node);
857
- if (!t4.isObjectExpression(object))
858
- return t4.isIdentifier(object, { name: "undefined" }) || t4.isUnaryExpression(object, { operator: "void" }) ? { kind: "missing" } : isOpaqueValue(object) ? { kind: "unresolvable", source: sourceOf2(original) } : depth === 0 ? { kind: "missing" } : { kind: "masked" };
859
- result = memberOf(resolveObjectMembers(object, ctx), key);
860
- }
861
- return result;
862
- }, memberOf = (members, key) => {
863
- let node = members.properties[key];
864
- return node !== void 0 && !members.shadowed.includes(key) ? { kind: "value", node } : members.unresolved.length > 0 ? { kind: "unresolvable", source: members.unresolved.at(-1) } : { kind: "missing" };
865
- }, isOpaqueValue = (node) => !t4.isLiteral(node) && !t4.isArrayExpression(node) && !t4.isFunction(node);
866
-
867
814
  // src/docgen/story-docs-build.ts
868
815
  var buildStoryDocsPayload = async (input, context) => {
869
816
  let storyImportPath = getStoryImportPathFromEntry(input.entry);
@@ -906,8 +853,8 @@ var buildStoryDocsPayload = async (input, context) => {
906
853
  return buildImportStatements2({ refs: [{ ...ref, importOverride }] }).join(`
907
854
  `) || void 0;
908
855
  }, componentNameOf = (node) => {
909
- let identifier = node && t5.isTSInstantiationExpression(node) ? node.expression : node;
910
- return identifier && t5.isIdentifier(identifier) ? identifier.name : void 0;
856
+ let identifier = node && t4.isTSInstantiationExpression(node) ? node.expression : node;
857
+ return identifier && t4.isIdentifier(identifier) ? identifier.name : void 0;
911
858
  }, openStoryReferences = createStoryReferenceResolver(), buildStoryDoc = async (exportName, story, deps) => {
912
859
  let { csf } = deps, name = story.name ?? storyNameFromExport(exportName);
913
860
  try {
@@ -929,7 +876,11 @@ var buildStoryDocsPayload = async (input, context) => {
929
876
  };
930
877
  }
931
878
  }, renderedSnippet = async (shape, deps) => {
932
- let authored = authoredSource(shape, deps.resolveStoryArgs.ctx);
879
+ let authoredShape = {
880
+ storyMembers: shape.members,
881
+ members: shape.members,
882
+ metaMembers: shape.metaMembers
883
+ }, authored = authoredSource(authoredShape, deps.resolveStoryArgs.ctx);
933
884
  if (authored.kind === "code")
934
885
  return { snippet: authored.code };
935
886
  if (authored.kind === "disabled")
@@ -960,7 +911,7 @@ var buildStoryDocsPayload = async (input, context) => {
960
911
  fields: fields2
961
912
  });
962
913
  if (userMarkup?.kind === "literal") {
963
- let { analyzeStoryTemplate } = await import("./_node-chunks/story-docs-template-analysis-QZKDXYIV.js"), analysis = analyzeStoryTemplate(userMarkup.markup, userMarkup.expansions), referencedNames = new Set(analysis.kind === "resolved" ? analysis.referencedNames : []), boundOutputs = analysis.kind === "resolved" ? snippetMeta.outputs.filter((name) => analysis.boundOutputs.includes(name)) : [], hostArgs = referencedArgFields(
914
+ let { analyzeStoryTemplate } = await import("./_node-chunks/story-docs-template-analysis-HQJMKWRY.js"), analysis = analyzeStoryTemplate(userMarkup.markup, userMarkup.expansions), referencedNames = new Set(analysis.kind === "resolved" ? analysis.referencedNames : []), boundOutputs = analysis.kind === "resolved" ? snippetMeta.outputs.filter((name) => analysis.boundOutputs.includes(name)) : [], hostArgs = referencedArgFields(
964
915
  referencedNames,
965
916
  userMarkup.representedArgs,
966
917
  shape,
@@ -1043,11 +994,11 @@ var buildStoryDocsPayload = async (input, context) => {
1043
994
  isUndefinedValue(node) || (isFunctionValue(node) ? outputNames.has(name) && outputs.push(name) : inputNames.has(name) && inputs.push({ name, expression: evaluateArgExpression(node, snippetMeta.enums) }));
1044
995
  return { inputs, outputs };
1045
996
  }, isFunctionValue = (node) => {
1046
- let unwrapped = unwrapExpression5(node);
1047
- return t5.isFunction(unwrapped);
997
+ let unwrapped = unwrapExpression4(node);
998
+ return t4.isFunction(unwrapped);
1048
999
  }, isUndefinedValue = (node) => {
1049
- let unwrapped = unwrapExpression5(node);
1050
- return t5.isIdentifier(unwrapped) && unwrapped.name === "undefined" || t5.isUnaryExpression(unwrapped, { operator: "void" });
1000
+ let unwrapped = unwrapExpression4(node);
1001
+ return t4.isIdentifier(unwrapped) && unwrapped.name === "undefined" || t4.isUnaryExpression(unwrapped, { operator: "void" });
1051
1002
  };
1052
1003
 
1053
1004
  // src/docgen/story-docs-preset.ts
@@ -1060,30 +1011,27 @@ var warnedMissingDocgenService = !1, getDocgenPayload = async (componentId) => {
1060
1011
  ));
1061
1012
  return;
1062
1013
  }
1063
- }, experimental_storyDocsProvider = async (nextStoryDocs) => async (input) => {
1064
- let storyImportPath = getStoryImportPathFromEntry2(input.entry);
1065
- if (!storyImportPath || !STORY_FILE_TEST_REGEXP.test(storyImportPath))
1066
- return nextStoryDocs(input);
1067
- let ours = await buildStoryDocsPayload(input, { getDocgenPayload });
1068
- return ours ? { ...await nextStoryDocs(input), ...ours } : nextStoryDocs(input);
1069
- };
1014
+ }, experimental_storyDocsProvider = createWorkerGatedStoryDocsProvider({
1015
+ label: "Angular",
1016
+ docgenWorker: fileURLToPath2(import.meta.resolve(DOCGEN_WORKER_SPECIFIER)),
1017
+ build: (input) => buildStoryDocsPayload(input, { getDocgenPayload })
1018
+ });
1070
1019
 
1071
1020
  // src/preset.ts
1072
- var addons = [], features = async (existing) => ({
1021
+ var isDocgenProviderEnabled = !0, addons = [], features = async (existing) => ({
1073
1022
  ...existing,
1074
- componentsManifest: !0,
1075
- experimentalDocgenServer: !0
1023
+ componentsManifest: !0
1076
1024
  }), previewAnnotations = async (entries = [], options) => {
1077
- let config = fileURLToPath2(import.meta.resolve("@storybook/angular-vite/client/config")), annotations = [...entries, config];
1025
+ let config = fileURLToPath3(import.meta.resolve("@storybook/angular-vite/client/config")), annotations = [...entries, config];
1078
1026
  if (options.enableProdMode) {
1079
- let previewProdPath = fileURLToPath2(
1027
+ let previewProdPath = fileURLToPath3(
1080
1028
  import.meta.resolve("@storybook/angular-vite/client/preview-prod")
1081
1029
  );
1082
1030
  annotations.unshift(previewProdPath);
1083
1031
  }
1084
1032
  let docsConfig = await options.presets.apply("docs", {}, options);
1085
1033
  if (Object.keys(docsConfig).length > 0) {
1086
- let docsConfigPath = fileURLToPath2(
1034
+ let docsConfigPath = fileURLToPath3(
1087
1035
  import.meta.resolve("@storybook/angular-vite/client/docs/config")
1088
1036
  );
1089
1037
  annotations.push(docsConfigPath);
@@ -1114,16 +1062,16 @@ var viteFinal = async (config, options) => {
1114
1062
  let { mergeConfig, normalizePath } = await import("vite"), { default: angular } = await import("@analogjs/vite-plugin-angular"), framework = await options.presets.apply("framework"), frameworkOptions = typeof framework == "string" ? void 0 : framework.options, resolvedFeatures = await options.presets.apply(
1115
1063
  "features",
1116
1064
  {}
1117
- ), docgenServer = !!resolvedFeatures?.experimentalDocgenServer, compodocConfig = await resolveCompodocConfig(options, { viteRoot: config?.root });
1118
- compodocConfig.enabled && !docgenServer && await ensureCompodocDocumentation({
1065
+ ), docgenServer = !!resolvedFeatures?.docgenServer, skipDocgen = !!options.build?.test?.disableDocgen, compodocConfig = await resolveCompodocConfig(options, { viteRoot: config?.root });
1066
+ compodocConfig.enabled && !docgenServer && !skipDocgen && await ensureCompodocDocumentation({
1119
1067
  compodocArgs: compodocConfig.compodocArgs,
1120
1068
  tsconfig: compodocConfig.tsconfig,
1121
1069
  workspaceRoot: compodocConfig.workspaceRoot,
1122
1070
  outputDir: compodocConfig.outputDir
1123
1071
  });
1124
1072
  let propsTable = resolvePropsTable(frameworkOptions, resolvedFeatures);
1125
- warnAboutPropsTable(frameworkOptions, resolvedFeatures), resolvedFeatures?.componentsManifest && !docgenServer && logger5.warn(
1126
- "The `componentsManifest` feature needs the `experimentalDocgenServer` feature, which is off, so this Storybook publishes no components manifest and MCP clients get no component API from it. Turn the docgen server on with `features: { experimentalDocgenServer: true }` in your `main.ts`."
1073
+ skipDocgen || warnAboutPropsTable(frameworkOptions, resolvedFeatures), resolvedFeatures?.componentsManifest && !docgenServer && !skipDocgen && logger5.warn(
1074
+ "The `componentsManifest` feature needs the `docgenServer` feature, which is off, so this Storybook publishes no components manifest and MCP clients get no component API from it. Turn the docgen server on with `features: { docgenServer: true }` in your `main.ts`."
1127
1075
  );
1128
1076
  let zoneless = resolveZoneless(options.angularBuilderOptions), angularPlugins = angular({
1129
1077
  jit: typeof frameworkOptions?.jit < "u" ? frameworkOptions?.jit : !0,
@@ -1187,7 +1135,7 @@ var viteFinal = async (config, options) => {
1187
1135
  angularOptionsPlugin(options, { normalizePath, zoneless }),
1188
1136
  stylePreprocessorCheckPlugin(),
1189
1137
  storybookOxcPlugin(),
1190
- ...docgenServer && options.configDir ? [compodocJsonStubPlugin(options.configDir)] : []
1138
+ ...(docgenServer || skipDocgen) && options.configDir ? [compodocJsonStubPlugin(options.configDir)] : []
1191
1139
  ],
1192
1140
  define: {
1193
1141
  STORYBOOK_ANGULAR_OPTIONS: JSON.stringify({
@@ -1273,7 +1221,7 @@ var STYLE_PREPROCESSORS = {
1273
1221
  }
1274
1222
  }, viteInstallDir = () => {
1275
1223
  try {
1276
- return dirname2(fileURLToPath2(import.meta.resolve("vite")));
1224
+ return dirname2(fileURLToPath3(import.meta.resolve("vite")));
1277
1225
  } catch {
1278
1226
  return;
1279
1227
  }
@@ -1431,6 +1379,7 @@ export {
1431
1379
  experimental_manifests,
1432
1380
  experimental_storyDocsProvider,
1433
1381
  features,
1382
+ isDocgenProviderEnabled,
1434
1383
  previewAnnotations,
1435
1384
  resolveZoneless,
1436
1385
  stylePreprocessorCheckPlugin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/angular-vite",
3
- "version": "11.0.0-alpha.4",
3
+ "version": "11.0.0-alpha.6",
4
4
  "description": "Storybook for Angular: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -63,7 +63,7 @@
63
63
  "!src/**/*"
64
64
  ],
65
65
  "dependencies": {
66
- "@storybook/builder-vite": "11.0.0-alpha.4",
66
+ "@storybook/builder-vite": "11.0.0-alpha.6",
67
67
  "@storybook/global": "^5.0.0",
68
68
  "telejson": "8.0.0",
69
69
  "ts-dedent": "^2.0.0",
@@ -82,8 +82,8 @@
82
82
  "@angular/platform-browser": "^21.2.14",
83
83
  "@angular/platform-browser-dynamic": "^21.2.14",
84
84
  "@babel/types": "^7.28.5",
85
- "@storybook/angular-cm": "11.0.0-alpha.4",
86
- "@storybook/angular-compodoc": "11.0.0-alpha.4",
85
+ "@storybook/angular-cm": "11.0.0-alpha.6",
86
+ "@storybook/angular-compodoc": "11.0.0-alpha.6",
87
87
  "@types/node": "^22.19.1",
88
88
  "empathic": "^2.0.0",
89
89
  "memfs": "^4.11.1",
@@ -106,7 +106,7 @@
106
106
  "rxjs": "^7.4.0",
107
107
  "sass": "^1.0.0",
108
108
  "sass-embedded": "^1.0.0",
109
- "storybook": "^11.0.0-alpha.4",
109
+ "storybook": "^11.0.0-alpha.6",
110
110
  "typescript": "^5.9.0 || ^6.0.0",
111
111
  "vite": ">=8.0.0",
112
112
  "zone.js": ">=0.14.0"