@storybook/angular-vite 11.0.0-beta.3 → 11.0.0-beta.5

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
@@ -5,10 +5,10 @@ import {
5
5
  componentWrapperDecorator,
6
6
  moduleMetadata,
7
7
  setProjectAnnotations
8
- } from "./_browser-chunks/chunk-OAG3JRJQ.js";
9
- import "./_browser-chunks/chunk-JSKZYOEY.js";
10
- import "./_browser-chunks/chunk-VA3FEKPB.js";
11
- import "./_browser-chunks/chunk-FDLKT4EQ.js";
8
+ } from "./_browser-chunks/chunk-56QYE53C.js";
9
+ import "./_browser-chunks/chunk-GVR3YWT3.js";
10
+ import "./_browser-chunks/chunk-2JE7SKTX.js";
11
+ import "./_browser-chunks/chunk-UU6I6OE3.js";
12
12
  export {
13
13
  __definePreview,
14
14
  applicationConfig,
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_4pl39hy6w4x from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_4pl39hy6w4x from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_4pl39hy6w4x from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_4pl39hy6w4x.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_4pl39hy6w4x.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_4pl39hy6w4x.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // src/node/index.ts
14
2
  function defineMain(config) {
15
3
  return config;
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_4pl39hy6w4x from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_4pl39hy6w4x from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_4pl39hy6w4x from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_4pl39hy6w4x.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_4pl39hy6w4x.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_4pl39hy6w4x.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // src/node/vitest.ts
14
2
  import { existsSync } from "node:fs";
15
3
  import { dirname, join, resolve } from "node:path";
package/dist/preset.js CHANGED
@@ -1,23 +1,12 @@
1
- import CJS_COMPAT_NODE_URL_4pl39hy6w4x from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_4pl39hy6w4x from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_4pl39hy6w4x from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_4pl39hy6w4x.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_4pl39hy6w4x.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_4pl39hy6w4x.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
1
  import {
13
2
  findTsconfigUp
14
- } from "./_node-chunks/chunk-NV6YXVLU.js";
3
+ } from "./_node-chunks/chunk-DSX4K57A.js";
15
4
  import {
16
5
  parseStoryFile
17
- } from "./_node-chunks/chunk-KF3ADECJ.js";
6
+ } from "./_node-chunks/chunk-MIQVDAHU.js";
18
7
  import {
19
8
  materializeLike
20
- } from "./_node-chunks/chunk-GWSNLRTA.js";
9
+ } from "./_node-chunks/chunk-V5HMO3W7.js";
21
10
 
22
11
  // src/preset.ts
23
12
  import { findConfigFile, isTypeScriptReadyForDocgen } from "storybook/internal/common";
@@ -800,7 +789,7 @@ var bindingAttributes = ({ inputs, outputs }, filter, representedArgs) => {
800
789
  if (!binding?.constant)
801
790
  return node;
802
791
  let declaration = binding.node;
803
- return declaration.type === "VariableDeclarator" ? declaration.init ?? node : declaration.type === "FunctionDeclaration" ? declaration : node;
792
+ return declaration.type === "VariableDeclarator" ? declaration.id.type === "Identifier" ? declaration.init ?? node : node : declaration.type === "FunctionDeclaration" ? declaration : node;
804
793
  };
805
794
 
806
795
  // src/docgen/story-docs-ng-modules.ts
@@ -1029,7 +1018,7 @@ var buildStoryDocsPayload = async (input, context) => {
1029
1018
  fields: fields2
1030
1019
  });
1031
1020
  if (userMarkup?.kind === "literal") {
1032
- let { analyzeStoryTemplate } = await import("./_node-chunks/story-docs-template-analysis-U2JRJFSJ.js"), analysis = valuesAnalysis ?? analyzeStoryTemplate(userMarkup.markup, userMarkup.expansions), markup = valuesAnalysis ? materializeLike(valuesAnalysis, userMarkup.markup, userMarkup.expansions) : analysis.markup, referencedNames = new Set(analysis.kind === "resolved" ? analysis.referencedNames : []), boundOutputs = analysis.kind === "resolved" ? snippetMeta.outputs.filter((name) => analysis.boundOutputs.includes(name)) : [], hostArgs = referencedArgFields(
1021
+ let { analyzeStoryTemplate } = await import("./_node-chunks/story-docs-template-analysis-D4DNIJAK.js"), analysis = valuesAnalysis ?? analyzeStoryTemplate(userMarkup.markup, userMarkup.expansions), markup = valuesAnalysis ? materializeLike(valuesAnalysis, userMarkup.markup, userMarkup.expansions) : analysis.markup, referencedNames = new Set(analysis.kind === "resolved" ? analysis.referencedNames : []), boundOutputs = analysis.kind === "resolved" ? snippetMeta.outputs.filter((name) => analysis.boundOutputs.includes(name)) : [], hostArgs = referencedArgFields(
1033
1022
  referencedNames,
1034
1023
  userMarkup.representedArgs,
1035
1024
  shape,
@@ -1413,7 +1402,9 @@ function angularOptionsPlugin(options, { normalizePath, zoneless }) {
1413
1402
  return {
1414
1403
  name: "storybook-angular-vite-options-plugin",
1415
1404
  config(userConfig) {
1416
- resolvedPreviewPath = findConfigFile("preview", options.configDir) ?? void 0, workspaceRoot = options.angularBuilderContext?.workspaceRoot ?? userConfig?.root ?? process.cwd();
1405
+ resolvedPreviewPath = findConfigFile("preview", options.configDir) ?? void 0;
1406
+ let bridgedWorkspaceRoot = options.angularBuilderOptions?.workspaceRoot;
1407
+ workspaceRoot = options.angularBuilderContext?.workspaceRoot ?? (typeof bridgedWorkspaceRoot == "string" ? bridgedWorkspaceRoot : void 0) ?? userConfig?.root ?? process.cwd();
1417
1408
  let stylePreprocessorOptions = options?.angularBuilderOptions?.stylePreprocessorOptions ?? {}, loadPaths = stylePreprocessorOptions.includePaths ?? stylePreprocessorOptions.loadPaths, sassOptions = stylePreprocessorOptions.sass;
1418
1409
  if (!(!Array.isArray(loadPaths) && !sassOptions))
1419
1410
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/angular-vite",
3
- "version": "11.0.0-beta.3",
3
+ "version": "11.0.0-beta.5",
4
4
  "description": "Storybook for Angular: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -64,7 +64,7 @@
64
64
  "!src/**/*"
65
65
  ],
66
66
  "dependencies": {
67
- "@storybook/builder-vite": "11.0.0-beta.3",
67
+ "@storybook/builder-vite": "11.0.0-beta.5",
68
68
  "@storybook/global": "^5.0.0",
69
69
  "telejson": "8.0.0",
70
70
  "ts-dedent": "^2.2.0",
@@ -82,9 +82,9 @@
82
82
  "@angular/forms": "^21.2.14",
83
83
  "@angular/platform-browser": "^21.2.14",
84
84
  "@angular/platform-browser-dynamic": "^21.2.14",
85
- "@storybook/angular-cm": "11.0.0-beta.3",
86
- "@storybook/angular-compodoc": "11.0.0-beta.3",
87
- "@storybook/component-meta-typescript": "11.0.0-beta.3",
85
+ "@storybook/angular-cm": "11.0.0-beta.5",
86
+ "@storybook/angular-compodoc": "11.0.0-beta.5",
87
+ "@storybook/component-meta-typescript": "11.0.0-beta.5",
88
88
  "@types/node": "^22.19.1",
89
89
  "empathic": "^2.0.0",
90
90
  "memfs": "^4.11.1",
@@ -107,7 +107,7 @@
107
107
  "rxjs": "^7.4.0",
108
108
  "sass": "^1.0.0",
109
109
  "sass-embedded": "^1.0.0",
110
- "storybook": "^11.0.0-beta.3",
110
+ "storybook": "^11.0.0-beta.5",
111
111
  "typescript": "^5.9.0 || ^6.0.0 || ^7.0.0",
112
112
  "vite": ">=8.0.0",
113
113
  "zone.js": ">=0.14.0"
@@ -1,42 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_4pl39hy6w4x from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_4pl39hy6w4x from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_4pl39hy6w4x from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_4pl39hy6w4x.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_4pl39hy6w4x.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_4pl39hy6w4x.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
- // src/docgen/resolve-component.ts
14
- import {
15
- createMetaComponentResolver,
16
- createModuleResolver,
17
- jsTsSourceExtensions
18
- } from "storybook/internal/common";
19
- import { loadCsf } from "storybook/internal/csf-tools";
20
- import { readFileSync } from "node:fs";
21
- var resolveMetaComponent = createMetaComponentResolver(), storyImportResolver = createModuleResolver({
22
- extensions: [...jsTsSourceExtensions],
23
- mainFields: ["module", "main"],
24
- tsconfig: "auto"
25
- });
26
- function parseStoryFile(storyFilePath, title) {
27
- try {
28
- let source = readFileSync(storyFilePath, "utf8");
29
- return loadCsf(source, { makeTitle: () => title, fileName: storyFilePath }).parse();
30
- } catch {
31
- return;
32
- }
33
- }
34
- function resolveStoryComponent(storyFilePath, title = "Docgen") {
35
- let csf = parseStoryFile(storyFilePath, title);
36
- return csf ? resolveMetaComponent(csf, storyFilePath) : { reason: "no-meta-component" };
37
- }
38
-
39
- export {
40
- parseStoryFile,
41
- resolveStoryComponent
42
- };
@@ -1,19 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_4pl39hy6w4x from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_4pl39hy6w4x from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_4pl39hy6w4x from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_4pl39hy6w4x.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_4pl39hy6w4x.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_4pl39hy6w4x.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- import {
13
- analyzeStoryTemplate,
14
- materializeLike
15
- } from "./chunk-GWSNLRTA.js";
16
- export {
17
- analyzeStoryTemplate,
18
- materializeLike
19
- };