@storybook/angular 11.0.0-beta.2 → 11.0.0-beta.4

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/build-schema.json CHANGED
@@ -32,7 +32,7 @@
32
32
  "loglevel": {
33
33
  "type": "string",
34
34
  "description": "Controls level of logging during build. Can be one of: [trace, debug, info (default), warn, error, silent].",
35
- "pattern": "(trace|debug|info|warn|error|silent)"
35
+ "enum": ["trace", "debug", "info", "warn", "error", "silent"]
36
36
  },
37
37
  "logfile": {
38
38
  "type": "string",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __export,
3
3
  computesTemplateSourceFromComponent
4
- } from "./chunk-J3KWA7RA.js";
4
+ } from "./chunk-X37A3J56.js";
5
5
 
6
6
  // src/client/docs/config.ts
7
7
  var config_exports = {};
@@ -3,7 +3,7 @@ import {
3
3
  computesTemplateFromComponent,
4
4
  render,
5
5
  renderToCanvas
6
- } from "./chunk-J3KWA7RA.js";
6
+ } from "./chunk-X37A3J56.js";
7
7
 
8
8
  // src/client/config.ts
9
9
  var config_exports = {};
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  config_exports
3
- } from "./chunk-MXCWHRQJ.js";
3
+ } from "./chunk-5E3THNDT.js";
4
4
  import {
5
5
  config_exports as config_exports2
6
- } from "./chunk-IG5LI7GN.js";
6
+ } from "./chunk-2HJNMSSH.js";
7
7
  import {
8
8
  computesTemplateFromComponent,
9
9
  formatPropInTemplate,
10
10
  isComponent,
11
11
  render_exports
12
- } from "./chunk-J3KWA7RA.js";
12
+ } from "./chunk-X37A3J56.js";
13
13
 
14
14
  // src/client/portable-stories.ts
15
15
  import {
@@ -531,7 +531,7 @@ var applicationRefs = /* @__PURE__ */ new Map(), STORY_UID_ATTRIBUTE = "data-sb-
531
531
  /** Wait and destroy the platform */
532
532
  static resetApplications(domNode) {
533
533
  applicationRefs.forEach((appRef, appDOMNode) => {
534
- if (!appRef.destroyed && (!domNode || appDOMNode === domNode))
534
+ if (!(domNode && appDOMNode !== domNode) && (applicationRefs.delete(appDOMNode), !appRef.destroyed))
535
535
  try {
536
536
  appRef.components.slice().forEach((componentRef) => componentRef.destroy());
537
537
  } finally {
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_dc5vymsqpcj from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_dc5vymsqpcj from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_dc5vymsqpcj from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_dc5vymsqpcj.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_dc5vymsqpcj.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_dc5vymsqpcj.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // src/server/angular-cli-webpack.js
14
2
  import { createRequire } from "node:module";
15
3
  import { getTsconfigPathsBaseDir } from "storybook/internal/common";
@@ -1,17 +1,6 @@
1
- import CJS_COMPAT_NODE_URL_dc5vymsqpcj from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_dc5vymsqpcj from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_dc5vymsqpcj from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_dc5vymsqpcj.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_dc5vymsqpcj.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_dc5vymsqpcj.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
1
  import {
13
2
  up
14
- } from "./chunk-H5UZHPEP.js";
3
+ } from "./chunk-QABNFL66.js";
15
4
 
16
5
  // ../../../node_modules/empathic/package.mjs
17
6
  function up2(options) {
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_dc5vymsqpcj from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_dc5vymsqpcj from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_dc5vymsqpcj from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_dc5vymsqpcj.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_dc5vymsqpcj.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_dc5vymsqpcj.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // ../../../node_modules/empathic/find.mjs
14
2
  import { join as join2 } from "node:path";
15
3
  import { existsSync, statSync } from "node:fs";
@@ -1,23 +1,12 @@
1
- import CJS_COMPAT_NODE_URL_dc5vymsqpcj from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_dc5vymsqpcj from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_dc5vymsqpcj from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_dc5vymsqpcj.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_dc5vymsqpcj.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_dc5vymsqpcj.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
1
  import {
13
2
  errorSummary,
14
3
  printErrorDetails,
15
4
  runCompodoc,
16
5
  up as up2
17
- } from "../../_node-chunks/chunk-7XVO2L2W.js";
6
+ } from "../../_node-chunks/chunk-H2A2J6BJ.js";
18
7
  import {
19
8
  up
20
- } from "../../_node-chunks/chunk-H5UZHPEP.js";
9
+ } from "../../_node-chunks/chunk-QABNFL66.js";
21
10
 
22
11
  // src/builders/build-storybook/index.ts
23
12
  import { readFileSync } from "node:fs";
@@ -62,7 +51,7 @@ var commandBuilder = async (options, context) => {
62
51
  preserveSymlinks = !1,
63
52
  // Angular 21+ always supports zoneless; users still opt out via `experimentalZoneless: false`
64
53
  experimentalZoneless = !0
65
- } = options, packageJsonPath = up2({ cwd: __dirname }), standaloneOptions = {
54
+ } = options, packageJsonPath = up2({ cwd: import.meta.dirname }), standaloneOptions = {
66
55
  packageJson: packageJsonPath != null ? JSON.parse(readFileSync(packageJsonPath, "utf8")) : null,
67
56
  configDir,
68
57
  ...docs ? { docs } : {},
@@ -1,23 +1,12 @@
1
- import CJS_COMPAT_NODE_URL_dc5vymsqpcj from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_dc5vymsqpcj from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_dc5vymsqpcj from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_dc5vymsqpcj.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_dc5vymsqpcj.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_dc5vymsqpcj.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
1
  import {
13
2
  errorSummary,
14
3
  printErrorDetails,
15
4
  runCompodoc,
16
5
  up as up2
17
- } from "../../_node-chunks/chunk-7XVO2L2W.js";
6
+ } from "../../_node-chunks/chunk-H2A2J6BJ.js";
18
7
  import {
19
8
  up
20
- } from "../../_node-chunks/chunk-H5UZHPEP.js";
9
+ } from "../../_node-chunks/chunk-QABNFL66.js";
21
10
 
22
11
  // src/builders/start-storybook/index.ts
23
12
  import { readFileSync } from "node:fs";
@@ -78,7 +67,7 @@ var commandBuilder = (options, context) => new Observable((observer) => {
78
67
  preserveSymlinks = !1,
79
68
  // Angular 21+ always supports zoneless; users still opt out via `experimentalZoneless: false`
80
69
  experimentalZoneless = !0
81
- } = options, packageJsonPath = up2({ cwd: __dirname }), standaloneOptions = {
70
+ } = options, packageJsonPath = up2({ cwd: import.meta.dirname }), standaloneOptions = {
82
71
  packageJson: packageJsonPath != null ? JSON.parse(readFileSync(packageJsonPath, "utf8")) : null,
83
72
  ci,
84
73
  configDir,
@@ -2,11 +2,11 @@ import {
2
2
  argTypesEnhancers,
3
3
  decorateStory,
4
4
  parameters
5
- } from "../_browser-chunks/chunk-MXCWHRQJ.js";
5
+ } from "../_browser-chunks/chunk-5E3THNDT.js";
6
6
  import {
7
7
  render,
8
8
  renderToCanvas
9
- } from "../_browser-chunks/chunk-J3KWA7RA.js";
9
+ } from "../_browser-chunks/chunk-X37A3J56.js";
10
10
  export {
11
11
  decorateStory as applyDecorators,
12
12
  argTypesEnhancers,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  decorators,
3
3
  parameters
4
- } from "../../_browser-chunks/chunk-IG5LI7GN.js";
5
- import "../../_browser-chunks/chunk-J3KWA7RA.js";
4
+ } from "../../_browser-chunks/chunk-2HJNMSSH.js";
5
+ import "../../_browser-chunks/chunk-X37A3J56.js";
6
6
  export {
7
7
  decorators,
8
8
  parameters
@@ -5,10 +5,10 @@ import {
5
5
  componentWrapperDecorator,
6
6
  moduleMetadata,
7
7
  setProjectAnnotations
8
- } from "../_browser-chunks/chunk-GHAVXUL3.js";
9
- import "../_browser-chunks/chunk-MXCWHRQJ.js";
10
- import "../_browser-chunks/chunk-IG5LI7GN.js";
11
- import "../_browser-chunks/chunk-J3KWA7RA.js";
8
+ } from "../_browser-chunks/chunk-5LDX3DGU.js";
9
+ import "../_browser-chunks/chunk-5E3THNDT.js";
10
+ import "../_browser-chunks/chunk-2HJNMSSH.js";
11
+ import "../_browser-chunks/chunk-X37A3J56.js";
12
12
  export {
13
13
  __definePreview,
14
14
  applicationConfig,
package/dist/index.js CHANGED
@@ -5,10 +5,10 @@ import {
5
5
  componentWrapperDecorator,
6
6
  moduleMetadata,
7
7
  setProjectAnnotations
8
- } from "./_browser-chunks/chunk-GHAVXUL3.js";
9
- import "./_browser-chunks/chunk-MXCWHRQJ.js";
10
- import "./_browser-chunks/chunk-IG5LI7GN.js";
11
- import "./_browser-chunks/chunk-J3KWA7RA.js";
8
+ } from "./_browser-chunks/chunk-5LDX3DGU.js";
9
+ import "./_browser-chunks/chunk-5E3THNDT.js";
10
+ import "./_browser-chunks/chunk-2HJNMSSH.js";
11
+ import "./_browser-chunks/chunk-X37A3J56.js";
12
12
  export {
13
13
  __definePreview,
14
14
  applicationConfig,
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_dc5vymsqpcj from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_dc5vymsqpcj from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_dc5vymsqpcj from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_dc5vymsqpcj.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_dc5vymsqpcj.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_dc5vymsqpcj.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;
package/dist/preset.js CHANGED
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_dc5vymsqpcj from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_dc5vymsqpcj from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_dc5vymsqpcj from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_dc5vymsqpcj.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_dc5vymsqpcj.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_dc5vymsqpcj.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // src/preset.ts
14
2
  import { fileURLToPath } from "node:url";
15
3
  var addons = [
@@ -1,17 +1,6 @@
1
- import CJS_COMPAT_NODE_URL_dc5vymsqpcj from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_dc5vymsqpcj from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_dc5vymsqpcj from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_dc5vymsqpcj.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_dc5vymsqpcj.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_dc5vymsqpcj.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
1
  import {
13
2
  up
14
- } from "../_node-chunks/chunk-H5UZHPEP.js";
3
+ } from "../_node-chunks/chunk-QABNFL66.js";
15
4
 
16
5
  // src/server/framework-preset-angular-cli.ts
17
6
  import { logger } from "storybook/internal/node-logger";
@@ -21,180 +10,12 @@ import { logging } from "@angular-devkit/core";
21
10
  import { getProjectRoot, resolvePackageDir } from "storybook/internal/common";
22
11
 
23
12
  // ../../../node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
24
- var _lazyMatch = () => {
25
- var __lib__ = (() => {
26
- var m = Object.defineProperty, V = Object.getOwnPropertyDescriptor, G = Object.getOwnPropertyNames, T = Object.prototype.hasOwnProperty, q = (r, e) => {
27
- for (var n in e) m(r, n, { get: e[n], enumerable: !0 });
28
- }, H = (r, e, n, a) => {
29
- if (e && typeof e == "object" || typeof e == "function") for (let t of G(e)) !T.call(r, t) && t !== n && m(r, t, { get: () => e[t], enumerable: !(a = V(e, t)) || a.enumerable });
30
- return r;
31
- }, J = (r) => H(m({}, "__esModule", { value: !0 }), r), w = {};
32
- q(w, { default: () => re });
33
- var A = (r) => Array.isArray(r), d = (r) => typeof r == "function", Q = (r) => r.length === 0, W = (r) => typeof r == "number", K = (r) => typeof r == "object" && r !== null, X = (r) => r instanceof RegExp, b = (r) => typeof r == "string", h = (r) => r === void 0, Y = (r) => {
34
- let e = /* @__PURE__ */ new Map();
35
- return (n) => {
36
- let a = e.get(n);
37
- if (a) return a;
38
- let t = r(n);
39
- return e.set(n, t), t;
40
- };
41
- }, rr = (r, e, n = {}) => {
42
- let a = { cache: {}, input: r, index: 0, indexMax: 0, options: n, output: [] };
43
- if (v(e)(a) && a.index === r.length) return a.output;
44
- throw new Error(`Failed to parse at index ${a.indexMax}`);
45
- }, i = (r, e) => A(r) ? er(r, e) : b(r) ? ar(r, e) : nr(r, e), er = (r, e) => {
46
- let n = {};
47
- for (let a of r) {
48
- if (a.length !== 1) throw new Error(`Invalid character: "${a}"`);
49
- let t = a.charCodeAt(0);
50
- n[t] = !0;
51
- }
52
- return (a) => {
53
- let t = a.index, o = a.input;
54
- for (; a.index < o.length && o.charCodeAt(a.index) in n; ) a.index += 1;
55
- let u = a.index;
56
- if (u > t) {
57
- if (!h(e) && !a.options.silent) {
58
- let s = a.input.slice(t, u), c = d(e) ? e(s, o, String(t)) : e;
59
- h(c) || a.output.push(c);
60
- }
61
- a.indexMax = Math.max(a.indexMax, a.index);
62
- }
63
- return !0;
64
- };
65
- }, nr = (r, e) => {
66
- let n = r.source, a = r.flags.replace(/y|$/, "y"), t = new RegExp(n, a);
67
- return g((o) => {
68
- t.lastIndex = o.index;
69
- let u = t.exec(o.input);
70
- if (u) {
71
- if (!h(e) && !o.options.silent) {
72
- let s = d(e) ? e(...u, o.input, String(o.index)) : e;
73
- h(s) || o.output.push(s);
74
- }
75
- return o.index += u[0].length, o.indexMax = Math.max(o.indexMax, o.index), !0;
76
- } else return !1;
77
- });
78
- }, ar = (r, e) => (n) => {
79
- if (n.input.startsWith(r, n.index)) {
80
- if (!h(e) && !n.options.silent) {
81
- let t = d(e) ? e(r, n.input, String(n.index)) : e;
82
- h(t) || n.output.push(t);
83
- }
84
- return n.index += r.length, n.indexMax = Math.max(n.indexMax, n.index), !0;
85
- } else return !1;
86
- }, C = (r, e, n, a) => {
87
- let t = v(r);
88
- return g(_(M((o) => {
89
- let u = 0;
90
- for (; u < n; ) {
91
- let s = o.index;
92
- if (!t(o) || (u += 1, o.index === s)) break;
93
- }
94
- return u >= e;
95
- })));
96
- }, tr = (r, e) => C(r, 0, 1), f = (r, e) => C(r, 0, 1 / 0), x = (r, e) => {
97
- let n = r.map(v);
98
- return g(_(M((a) => {
99
- for (let t = 0, o = n.length; t < o; t++) if (!n[t](a)) return !1;
100
- return !0;
101
- })));
102
- }, l = (r, e) => {
103
- let n = r.map(v);
104
- return g(_((a) => {
105
- for (let t = 0, o = n.length; t < o; t++) if (n[t](a)) return !0;
106
- return !1;
107
- }));
108
- }, M = (r, e = !1) => {
109
- let n = v(r);
110
- return (a) => {
111
- let t = a.index, o = a.output.length, u = n(a);
112
- return (!u || e) && (a.index = t, a.output.length !== o && (a.output.length = o)), u;
113
- };
114
- }, _ = (r, e) => v(r), g = /* @__PURE__ */ (() => {
115
- let r = 0;
116
- return (e) => {
117
- let n = v(e), a = r += 1;
118
- return (t) => {
119
- var o;
120
- if (t.options.memoization === !1) return n(t);
121
- let u = t.index, s = (o = t.cache)[a] || (o[a] = /* @__PURE__ */ new Map()), c = s.get(u);
122
- if (c === !1) return !1;
123
- if (W(c)) return t.index = c, !0;
124
- if (c) return t.index = c.index, c.output?.length && t.output.push(...c.output), !0;
125
- {
126
- let Z = t.output.length;
127
- if (n(t)) {
128
- let D = t.index, U = t.output.length;
129
- if (U > Z) {
130
- let ee = t.output.slice(Z, U);
131
- s.set(u, { index: D, output: ee });
132
- } else s.set(u, D);
133
- return !0;
134
- } else return s.set(u, !1), !1;
135
- }
136
- };
137
- };
138
- })(), E = (r) => {
139
- let e;
140
- return (n) => (e || (e = v(r())), e(n));
141
- }, v = Y((r) => {
142
- if (d(r)) return Q(r) ? E(r) : r;
143
- if (b(r) || X(r)) return i(r);
144
- if (A(r)) return x(r);
145
- if (K(r)) return l(Object.values(r));
146
- throw new Error("Invalid rule");
147
- }), P = "abcdefghijklmnopqrstuvwxyz", ir = (r) => {
148
- let e = "";
149
- for (; r > 0; ) {
150
- let n = (r - 1) % 26;
151
- e = P[n] + e, r = Math.floor((r - 1) / 26);
152
- }
153
- return e;
154
- }, O = (r) => {
155
- let e = 0;
156
- for (let n = 0, a = r.length; n < a; n++) e = e * 26 + P.indexOf(r[n]) + 1;
157
- return e;
158
- }, S = (r, e) => {
159
- if (e < r) return S(e, r);
160
- let n = [];
161
- for (; r <= e; ) n.push(r++);
162
- return n;
163
- }, or = (r, e, n) => S(r, e).map((a) => String(a).padStart(n, "0")), R = (r, e) => S(O(r), O(e)).map(ir), p = (r) => r, z = (r) => ur((e) => rr(e, r, { memoization: !1 }).join("")), ur = (r) => {
164
- let e = {};
165
- return (n) => e[n] ?? (e[n] = r(n));
166
- }, sr = i(/^\*\*\/\*$/, ".*"), cr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/, (r, e, n) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}`), lr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/, (r, e, n, a) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}(?:${a.replaceAll(",", "|").replaceAll(".", "\\.")})`), y = i(/\\./, p), pr = i(/[$.*+?^(){}[\]\|]/, (r) => `\\${r}`), vr = i(/./, p), hr = i(/^(?:!!)*!(.*)$/, (r, e) => `(?!^${L(e)}$).*?`), dr = i(/^(!!)+/, ""), fr = l([hr, dr]), xr = i(/\/(\*\*\/)+/, "(?:/.+/|/)"), gr = i(/^(\*\*\/)+/, "(?:^|.*/)"), mr = i(/\/(\*\*)$/, "(?:/.*|$)"), _r = i(/\*\*/, ".*"), j = l([xr, gr, mr, _r]), Sr = i(/\*\/(?!\*\*\/)/, "[^/]*/"), yr = i(/\*/, "[^/]*"), N = l([Sr, yr]), k = i("?", "[^/]"), $r = i("[", p), wr = i("]", p), Ar = i(/[!^]/, "^/"), br = i(/[a-z]-[a-z]|[0-9]-[0-9]/i, p), Cr = i(/[$.*+?^(){}[\|]/, (r) => `\\${r}`), Mr = i(/[^\]]/, p), Er = l([y, Cr, br, Mr]), B = x([$r, tr(Ar), f(Er), wr]), Pr = i("{", "(?:"), Or = i("}", ")"), Rr = i(/(\d+)\.\.(\d+)/, (r, e, n) => or(+e, +n, Math.min(e.length, n.length)).join("|")), zr = i(/([a-z]+)\.\.([a-z]+)/, (r, e, n) => R(e, n).join("|")), jr = i(/([A-Z]+)\.\.([A-Z]+)/, (r, e, n) => R(e.toLowerCase(), n.toLowerCase()).join("|").toUpperCase()), Nr = l([Rr, zr, jr]), I = x([Pr, Nr, Or]), kr = i("{", "(?:"), Br = i("}", ")"), Ir = i(",", "|"), Fr = i(/[$.*+?^(){[\]\|]/, (r) => `\\${r}`), Lr = i(/[^}]/, p), Zr = E(() => F), Dr = l([j, N, k, B, I, Zr, y, Fr, Ir, Lr]), F = x([kr, f(Dr), Br]), Ur = f(l([sr, cr, lr, fr, j, N, k, B, I, F, y, pr, vr])), Vr = Ur, Gr = z(Vr), L = Gr, Tr = i(/\\./, p), qr = i(/./, p), Hr = i(/\*\*\*+/, "*"), Jr = i(/([^/{[(!])\*\*/, (r, e) => `${e}*`), Qr = i(/(^|.)\*\*(?=[^*/)\]}])/, (r, e) => `${e}*`), Wr = f(l([Tr, Hr, Jr, Qr, qr])), Kr = Wr, Xr = z(Kr), Yr = Xr, $ = (r, e) => {
167
- let n = Array.isArray(r) ? r : [r];
168
- if (!n.length) return !1;
169
- let a = n.map($.compile), t = n.every((s) => /(\/(?:\*\*)?|\[\/\])$/.test(s)), o = e.replace(/[\\\/]+/g, "/").replace(/\/$/, t ? "/" : "");
170
- return a.some((s) => s.test(o));
171
- };
172
- $.compile = (r) => new RegExp(`^${L(Yr(r))}$`, "s");
173
- var re = $;
174
- return J(w);
175
- })();
176
- return __lib__.default || __lib__;
177
- }, _match, zeptomatch = (path, pattern) => (_match || (_match = _lazyMatch(), _lazyMatch = null), _match(path, pattern)), _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
13
+ var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
178
14
  function normalizeWindowsPath(input = "") {
179
15
  return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
180
16
  }
181
- var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/, _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/, _EXTNAME_RE = /.(\.[^./]+|\.)$/, _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/, sep = "/", normalize = function(path) {
182
- if (path.length === 0)
183
- return ".";
184
- path = normalizeWindowsPath(path);
185
- let isUNCPath = path.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path), trailingSeparator = path[path.length - 1] === "/";
186
- return path = normalizeString(path, !isPathAbsolute), path.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path += "/"), _DRIVE_LETTER_RE.test(path) && (path += "/"), isUNCPath ? isPathAbsolute ? `//${path}` : `//./${path}` : isPathAbsolute && !isAbsolute(path) ? `/${path}` : path);
187
- }, join = function(...segments) {
188
- let path = "";
189
- for (let seg of segments)
190
- if (seg)
191
- if (path.length > 0) {
192
- let pathTrailing = path[path.length - 1] === "/", segLeading = seg[0] === "/";
193
- pathTrailing && segLeading ? path += seg.slice(1) : path += pathTrailing || segLeading ? seg : `/${seg}`;
194
- } else
195
- path += seg;
196
- return normalize(path);
197
- };
17
+ var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
18
+ var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
198
19
  function cwd() {
199
20
  return typeof process < "u" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
200
21
  }
@@ -239,13 +60,8 @@ function normalizeString(path, allowAboveRoot) {
239
60
  }
240
61
  var isAbsolute = function(p) {
241
62
  return _IS_ABSOLUTE_RE.test(p);
242
- }, toNamespacedPath = function(p) {
243
- return normalizeWindowsPath(p);
244
- }, extname = function(p) {
245
- if (p === "..") return "";
246
- let match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
247
- return match && match[1] || "";
248
- }, relative = function(from, to) {
63
+ };
64
+ var relative = function(from, to) {
249
65
  let _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/"), _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
250
66
  if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0])
251
67
  return _to.join("/");
@@ -256,65 +72,13 @@ var isAbsolute = function(p) {
256
72
  _from.shift(), _to.shift();
257
73
  }
258
74
  return [..._from.map(() => ".."), ..._to].join("/");
259
- }, dirname = function(p) {
260
- let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
261
- return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
262
- }, format = function(p) {
263
- let ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "", segments = [p.root, p.dir, p.base ?? (p.name ?? "") + ext].filter(
264
- Boolean
265
- );
266
- return normalizeWindowsPath(
267
- p.root ? resolve(...segments) : segments.join("/")
268
- );
269
- }, basename = function(p, extension) {
270
- let segments = normalizeWindowsPath(p).split("/"), lastSegment = "";
271
- for (let i = segments.length - 1; i >= 0; i--) {
272
- let val = segments[i];
273
- if (val) {
274
- lastSegment = val;
275
- break;
276
- }
277
- }
278
- return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
279
- }, parse = function(p) {
280
- let root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "", base = basename(p), extension = extname(base);
281
- return {
282
- root,
283
- dir: dirname(p),
284
- base,
285
- ext: extension,
286
- name: base.slice(0, base.length - extension.length)
287
- };
288
- }, matchesGlob = (path, pattern) => zeptomatch(pattern, normalize(path)), _path = {
289
- __proto__: null,
290
- basename,
291
- dirname,
292
- extname,
293
- format,
294
- isAbsolute,
295
- join,
296
- matchesGlob,
297
- normalize,
298
- normalizeString,
299
- parse,
300
- relative,
301
- resolve,
302
- sep,
303
- toNamespacedPath
304
75
  };
305
76
 
306
- // ../../../node_modules/pathe/dist/index.mjs
307
- var delimiter = globalThis.process?.platform === "win32" ? ";" : ":", _platforms = { posix: void 0, win32: void 0 }, mix = (del = delimiter) => new Proxy(_path, {
308
- get(_, prop) {
309
- return prop === "delimiter" ? del : prop === "posix" ? posix : prop === "win32" ? win32 : _platforms[prop] || _path[prop];
310
- }
311
- }), posix = mix(":"), win32 = mix(";");
312
-
313
77
  // src/server/framework-preset-angular-cli.ts
314
78
  async function webpackFinal(baseConfig, options) {
315
79
  if (!resolvePackageDir("@angular-devkit/build-angular"))
316
80
  return logger.info('Using base config because "@angular-devkit/build-angular" is not installed'), baseConfig;
317
- let { WebpackDefinePlugin, WebpackIgnorePlugin } = await import("@storybook/builder-webpack5"), { getWebpackConfig: getCustomWebpackConfig } = await import("../_node-chunks/angular-cli-webpack-LKSQAEX2.js");
81
+ let { WebpackDefinePlugin, WebpackIgnorePlugin } = await import("@storybook/builder-webpack5"), { getWebpackConfig: getCustomWebpackConfig } = await import("../_node-chunks/angular-cli-webpack-ICM2CQD3.js");
318
82
  checkForLegacyBuildOptions(options);
319
83
  let builderContext = getBuilderContext(options), builderOptions = await getBuilderOptions(options, builderContext), webpackConfig = await getCustomWebpackConfig(baseConfig, {
320
84
  builderOptions: {
@@ -329,6 +93,8 @@ async function webpackFinal(baseConfig, options) {
329
93
  );
330
94
  miniCssPlugin && "options" in miniCssPlugin && (miniCssPlugin.options.filename = "[name].[contenthash].css", miniCssPlugin.options.chunkFilename = "[name].iframe.[contenthash].css"), webpackConfig.plugins.push(
331
95
  new WebpackDefinePlugin({
96
+ // The Angular CLI defines this global for browser builds; @angular/core reads it unguarded.
97
+ ngServerMode: "false",
332
98
  STORYBOOK_ANGULAR_OPTIONS: JSON.stringify({
333
99
  experimentalZoneless: builderOptions.experimentalZoneless
334
100
  })
@@ -1,15 +1,3 @@
1
- import CJS_COMPAT_NODE_URL_dc5vymsqpcj from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_dc5vymsqpcj from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_dc5vymsqpcj from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_dc5vymsqpcj.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_dc5vymsqpcj.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_dc5vymsqpcj.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
1
  // src/server/framework-preset-angular-ivy.ts
14
2
  import { join } from "node:path";
15
3
  import { createRequire } from "node:module";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/angular",
3
- "version": "11.0.0-beta.2",
3
+ "version": "11.0.0-beta.4",
4
4
  "description": "Storybook for Angular: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -59,7 +59,7 @@
59
59
  "!src/**/*"
60
60
  ],
61
61
  "dependencies": {
62
- "@storybook/builder-webpack5": "11.0.0-beta.2",
62
+ "@storybook/builder-webpack5": "11.0.0-beta.4",
63
63
  "@storybook/global": "^5.0.0",
64
64
  "telejson": "8.0.0",
65
65
  "ts-dedent": "^2.2.0",
@@ -79,8 +79,8 @@
79
79
  "@angular/forms": "^21.0.0",
80
80
  "@angular/platform-browser": "^21.0.0",
81
81
  "@angular/platform-browser-dynamic": "^21.0.0",
82
- "@storybook/angular-compodoc": "11.0.0-beta.2",
83
- "@storybook/core-webpack": "11.0.0-beta.2",
82
+ "@storybook/angular-compodoc": "11.0.0-beta.4",
83
+ "@storybook/core-webpack": "11.0.0-beta.4",
84
84
  "@types/node": "^22.19.1",
85
85
  "empathic": "^2.0.0",
86
86
  "rimraf": "^6.0.1",
@@ -101,7 +101,7 @@
101
101
  "@angular/platform-browser": ">=21.0.0 < 23.0.0",
102
102
  "@angular/platform-browser-dynamic": ">=21.0.0 < 23.0.0",
103
103
  "rxjs": "^6.5.3 || ^7.4.0",
104
- "storybook": "^11.0.0-beta.2",
104
+ "storybook": "^11.0.0-beta.4",
105
105
  "typescript": "^5.9.0 || ^6.0.0 || ^7.0.0",
106
106
  "zone.js": ">=0.14.0"
107
107
  },
package/start-schema.json CHANGED
@@ -144,7 +144,7 @@
144
144
  "loglevel": {
145
145
  "type": "string",
146
146
  "description": "Controls level of logging during build. Can be one of: [trace, debug, info (default), warn, error, silent].",
147
- "pattern": "(trace|debug|info|warn|error|silent)"
147
+ "enum": ["trace", "debug", "info", "warn", "error", "silent"]
148
148
  },
149
149
  "logfile": {
150
150
  "type": "string",