@storybook/angular-vite 11.0.0-alpha.1 → 11.0.0-alpha.3

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-PSE2PYUH.js";
9
- import "./_browser-chunks/chunk-SD6SKAYF.js";
10
- import "./_browser-chunks/chunk-RPSYDPZX.js";
11
- import "./_browser-chunks/chunk-YQ53UO6D.js";
8
+ } from "./_browser-chunks/chunk-ONLO5U66.js";
9
+ import "./_browser-chunks/chunk-TN7UZNXT.js";
10
+ import "./_browser-chunks/chunk-K4OVBYYR.js";
11
+ import "./_browser-chunks/chunk-BFQMI74D.js";
12
12
  export {
13
13
  __definePreview,
14
14
  applicationConfig,
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_nfjvqzfgo2j from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_nfjvqzfgo2j from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_nfjvqzfgo2j from "node:module";
1
+ import CJS_COMPAT_NODE_URL_cipcs4hoxti from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_cipcs4hoxti from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_cipcs4hoxti from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_nfjvqzfgo2j.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_nfjvqzfgo2j.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_nfjvqzfgo2j.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_cipcs4hoxti.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_cipcs4hoxti.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_cipcs4hoxti.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_nfjvqzfgo2j from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_nfjvqzfgo2j from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_nfjvqzfgo2j from "node:module";
1
+ import CJS_COMPAT_NODE_URL_cipcs4hoxti from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_cipcs4hoxti from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_cipcs4hoxti from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_nfjvqzfgo2j.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_nfjvqzfgo2j.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_nfjvqzfgo2j.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_cipcs4hoxti.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_cipcs4hoxti.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_cipcs4hoxti.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_nfjvqzfgo2j from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_nfjvqzfgo2j from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_nfjvqzfgo2j from "node:module";
1
+ import CJS_COMPAT_NODE_URL_cipcs4hoxti from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_cipcs4hoxti from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_cipcs4hoxti from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_nfjvqzfgo2j.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_nfjvqzfgo2j.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_nfjvqzfgo2j.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_cipcs4hoxti.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_cipcs4hoxti.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_cipcs4hoxti.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-RUIEHCV7.js";
14
+ } from "./_node-chunks/chunk-ZBMRBZHK.js";
15
15
  import {
16
16
  parseStoryFile
17
- } from "./_node-chunks/chunk-GLAMVNEY.js";
17
+ } from "./_node-chunks/chunk-HHUGSUIO.js";
18
18
 
19
19
  // src/preset.ts
20
20
  import { findConfigFile } from "storybook/internal/common";
@@ -938,7 +938,7 @@ var buildStoryDocsPayload = async (input, context) => {
938
938
  fields: fields2
939
939
  });
940
940
  if (userMarkup?.kind === "literal") {
941
- let { analyzeStoryTemplate } = await import("./_node-chunks/story-docs-template-analysis-GS3U7KVZ.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(
941
+ let { analyzeStoryTemplate } = await import("./_node-chunks/story-docs-template-analysis-PQ3TSQNO.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(
942
942
  referencedNames,
943
943
  userMarkup.representedArgs,
944
944
  shape,
@@ -1049,6 +1049,7 @@ var warnedMissingDocgenService = !1, getDocgenPayload = async (componentId) => {
1049
1049
  // src/preset.ts
1050
1050
  var addons = [], features = async (existing) => ({
1051
1051
  ...existing,
1052
+ componentsManifest: !0,
1052
1053
  experimentalDocgenServer: !0
1053
1054
  }), previewAnnotations = async (entries = [], options) => {
1054
1055
  let config = fileURLToPath2(import.meta.resolve("@storybook/angular-vite/client/config")), annotations = [...entries, config];
@@ -1080,7 +1081,7 @@ function resolveZoneless(angularBuilderOptions) {
1080
1081
  return angularBuilderOptions?.zoneless ?? !0;
1081
1082
  }
1082
1083
  var viteFinal = async (config, options) => {
1083
- if (options && !options.angularBuilderOptions && process.env.STORYBOOK_ANGULAR_BUILDER_OPTIONS_JSON)
1084
+ if (!options.angularBuilderOptions && process.env.STORYBOOK_ANGULAR_BUILDER_OPTIONS_JSON)
1084
1085
  try {
1085
1086
  options.angularBuilderOptions = JSON.parse(
1086
1087
  process.env.STORYBOOK_ANGULAR_BUILDER_OPTIONS_JSON
@@ -1088,7 +1089,7 @@ var viteFinal = async (config, options) => {
1088
1089
  } catch {
1089
1090
  }
1090
1091
  config.plugins = (config.plugins ?? []).flat().filter((plugin) => !plugin?.name?.includes("analogjs"));
1091
- let { mergeConfig, normalizePath } = await import("vite"), { default: angular } = await import("@analogjs/vite-plugin-angular"), framework = await options.presets.apply("framework"), resolvedFeatures = await options.presets.apply(
1092
+ 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(
1092
1093
  "features",
1093
1094
  {}
1094
1095
  ), docgenServer = !!resolvedFeatures?.experimentalDocgenServer, compodocConfig = await resolveCompodocConfig(options, { viteRoot: config?.root });
@@ -1098,15 +1099,15 @@ var viteFinal = async (config, options) => {
1098
1099
  workspaceRoot: compodocConfig.workspaceRoot,
1099
1100
  outputDir: compodocConfig.outputDir
1100
1101
  });
1101
- let propsTable = resolvePropsTable(framework.options, resolvedFeatures);
1102
- warnAboutPropsTable(framework.options, resolvedFeatures), resolvedFeatures?.componentsManifest && !docgenServer && logger5.warn(
1102
+ let propsTable = resolvePropsTable(frameworkOptions, resolvedFeatures);
1103
+ warnAboutPropsTable(frameworkOptions, resolvedFeatures), resolvedFeatures?.componentsManifest && !docgenServer && logger5.warn(
1103
1104
  "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`."
1104
1105
  );
1105
- let zoneless = resolveZoneless(options?.angularBuilderOptions), angularPlugins = angular({
1106
- jit: typeof framework.options?.jit < "u" ? framework.options?.jit : !0,
1107
- liveReload: typeof framework.options?.liveReload < "u" ? framework.options?.liveReload : !1,
1108
- tsconfig: typeof framework.options?.tsconfig < "u" ? framework.options?.tsconfig : options?.tsConfig ?? "./.storybook/tsconfig.json",
1109
- inlineStylesExtension: typeof framework.options?.inlineStylesExtension < "u" ? framework.options?.inlineStylesExtension : "css"
1106
+ let zoneless = resolveZoneless(options.angularBuilderOptions), angularPlugins = angular({
1107
+ jit: typeof frameworkOptions?.jit < "u" ? frameworkOptions?.jit : !0,
1108
+ liveReload: typeof frameworkOptions?.liveReload < "u" ? frameworkOptions?.liveReload : !1,
1109
+ tsconfig: typeof frameworkOptions?.tsconfig < "u" ? frameworkOptions?.tsconfig : options.tsConfig ?? "./.storybook/tsconfig.json",
1110
+ inlineStylesExtension: typeof frameworkOptions?.inlineStylesExtension < "u" ? frameworkOptions?.inlineStylesExtension : "css"
1110
1111
  }), pluginsToInject = (Array.isArray(angularPlugins) ? angularPlugins : [angularPlugins]).filter(Boolean).map((plugin) => plugin?.name === "@analogjs/vite-plugin-angular" && !plugin.enforce ? { ...plugin, enforce: "pre" } : plugin);
1111
1112
  return mergeConfig(config, {
1112
1113
  // `build` already falls back to `compilerOptions.paths` once normal resolution fails, so an
@@ -1164,7 +1165,7 @@ var viteFinal = async (config, options) => {
1164
1165
  angularOptionsPlugin(options, { normalizePath, zoneless }),
1165
1166
  stylePreprocessorCheckPlugin(),
1166
1167
  storybookOxcPlugin(),
1167
- ...docgenServer && options?.configDir ? [compodocJsonStubPlugin(options.configDir)] : []
1168
+ ...docgenServer && options.configDir ? [compodocJsonStubPlugin(options.configDir)] : []
1168
1169
  ],
1169
1170
  define: {
1170
1171
  STORYBOOK_ANGULAR_OPTIONS: JSON.stringify({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/angular-vite",
3
- "version": "11.0.0-alpha.1",
3
+ "version": "11.0.0-alpha.3",
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.1",
66
+ "@storybook/builder-vite": "11.0.0-alpha.3",
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.1",
86
- "@storybook/angular-compodoc": "11.0.0-alpha.1",
85
+ "@storybook/angular-cm": "11.0.0-alpha.3",
86
+ "@storybook/angular-compodoc": "11.0.0-alpha.3",
87
87
  "@types/node": "^22.19.1",
88
88
  "empathic": "^2.0.0",
89
89
  "memfs": "^4.11.1",
@@ -92,7 +92,7 @@
92
92
  "zone.js": "^0.16.2"
93
93
  },
94
94
  "peerDependencies": {
95
- "@analogjs/vite-plugin-angular": ">=2.0.0",
95
+ "@analogjs/vite-plugin-angular": ">=2.7.3",
96
96
  "@angular-devkit/architect": ">=0.2100.0 < 0.2300.0",
97
97
  "@angular-devkit/core": ">=21.0.0 < 23.0.0",
98
98
  "@angular/build": ">=21.0.0 < 23.0.0",
@@ -106,8 +106,8 @@
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.1",
110
- "typescript": ">= 5.9.x",
109
+ "storybook": "^11.0.0-alpha.3",
110
+ "typescript": "^5.9.0 || ^6.0.0",
111
111
  "vite": ">=8.0.0",
112
112
  "zone.js": ">=0.14.0"
113
113
  },
package/start-schema.json CHANGED
@@ -166,10 +166,6 @@
166
166
  "description": "Write stats JSON to disk",
167
167
  "default": false
168
168
  },
169
- "previewUrl": {
170
- "type": "string",
171
- "description": "Disables the default storybook preview and lets you use your own"
172
- },
173
169
  "loglevel": {
174
170
  "type": "string",
175
171
  "description": "Controls level of logging during build. Can be one of: [trace, debug, info (default), warn, error, silent].",
@@ -22,7 +22,10 @@ import type { User } from './user';
22
22
  d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
23
23
  fill="#555AB9"
24
24
  />
25
- <path d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z" fill="#91BAF8" />
25
+ <path
26
+ d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z"
27
+ fill="#91BAF8"
28
+ />
26
29
  </g>
27
30
  </svg>
28
31
  <h1>Acme</h1>
@@ -27,8 +27,8 @@ import type { User } from './user';
27
27
  </p>
28
28
  <p>
29
29
  Render pages with mock data. This makes it easy to build and review page states without
30
- needing to navigate to them in your app. Here are some handy patterns for managing page data
31
- in Storybook:
30
+ needing to navigate to them in your app. Here are some handy patterns for managing page
31
+ data in Storybook:
32
32
  </p>
33
33
  <ul>
34
34
  <li>
@@ -46,7 +46,9 @@ import type { User } from './user';
46
46
  Storybook tutorials
47
47
  </a>
48
48
  . Read more in the
49
- <a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer"> docs </a>
49
+ <a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer">
50
+ docs
51
+ </a>
50
52
  .
51
53
  </p>
52
54
  <div class="tip-wrapper">