@storybook/angular 10.0.0-beta.2 → 10.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.
@@ -0,0 +1,17 @@
1
+ import CJS_COMPAT_NODE_URL_suw05nz7bfl from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_suw05nz7bfl from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_suw05nz7bfl from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_suw05nz7bfl.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_suw05nz7bfl.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_suw05nz7bfl.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+ var __defProp = Object.defineProperty;
13
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
14
+
15
+ export {
16
+ __name
17
+ };
@@ -0,0 +1,58 @@
1
+ import CJS_COMPAT_NODE_URL_suw05nz7bfl from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_suw05nz7bfl from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_suw05nz7bfl from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_suw05nz7bfl.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_suw05nz7bfl.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_suw05nz7bfl.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+ import {
13
+ __name
14
+ } from "./chunk-KSD7HOMH.js";
15
+
16
+ // ../../node_modules/empathic/find.mjs
17
+ import { join as join2 } from "node:path";
18
+ import { existsSync, statSync } from "node:fs";
19
+
20
+ // ../../node_modules/empathic/walk.mjs
21
+ import { dirname } from "node:path";
22
+
23
+ // ../../node_modules/empathic/resolve.mjs
24
+ import { isAbsolute, join, resolve } from "node:path";
25
+ function absolute(input, root) {
26
+ return isAbsolute(input) ? input : resolve(root || ".", input);
27
+ }
28
+ __name(absolute, "absolute");
29
+
30
+ // ../../node_modules/empathic/walk.mjs
31
+ function up(base, options) {
32
+ let { last, cwd } = options || {};
33
+ let tmp = absolute(base, cwd);
34
+ let root = absolute(last || "/", cwd);
35
+ let prev, arr = [];
36
+ while (prev !== root) {
37
+ arr.push(tmp);
38
+ tmp = dirname(prev = tmp);
39
+ if (tmp === prev) break;
40
+ }
41
+ return arr;
42
+ }
43
+ __name(up, "up");
44
+
45
+ // ../../node_modules/empathic/find.mjs
46
+ function up2(name, options) {
47
+ let dir, tmp;
48
+ let start = options && options.cwd || "";
49
+ for (dir of up(start, options)) {
50
+ tmp = join2(dir, name);
51
+ if (existsSync(tmp)) return tmp;
52
+ }
53
+ }
54
+ __name(up2, "up");
55
+
56
+ export {
57
+ up2 as up
58
+ };
@@ -1,68 +1,26 @@
1
- import CJS_COMPAT_NODE_URL_vy4slnrgmr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_vy4slnrgmr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_vy4slnrgmr from "node:module";
1
+ import CJS_COMPAT_NODE_URL_suw05nz7bfl from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_suw05nz7bfl from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_suw05nz7bfl from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_vy4slnrgmr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_vy4slnrgmr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_vy4slnrgmr.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_suw05nz7bfl.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_suw05nz7bfl.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_suw05nz7bfl.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
+ import {
13
+ up
14
+ } from "./chunk-XO2ROZHF.js";
12
15
  import {
13
16
  __name
14
- } from "./chunk-ASGCKMB5.js";
15
-
16
- // ../../node_modules/walk-up-path/dist/mjs/index.js
17
- import { dirname, resolve } from "path";
18
- var walkUp = /* @__PURE__ */ __name(function* (path) {
19
- for (path = resolve(path); path; ) {
20
- yield path;
21
- const pp = dirname(path);
22
- if (pp === path) {
23
- break;
24
- } else {
25
- path = pp;
26
- }
27
- }
28
- }, "walkUp");
17
+ } from "./chunk-KSD7HOMH.js";
29
18
 
30
- // ../../node_modules/fd-package-json/dist/esm/main.js
31
- import { resolve as resolve2 } from "node:path";
32
- import { statSync, readFileSync } from "node:fs";
33
- function fileExistsSync(path) {
34
- try {
35
- const stats = statSync(path);
36
- return stats.isFile();
37
- } catch (_err) {
38
- return false;
39
- }
40
- }
41
- __name(fileExistsSync, "fileExistsSync");
42
- function findPackagePathSync(cwd) {
43
- for (const path of walkUp(cwd)) {
44
- const packagePath = resolve2(path, "package.json");
45
- const hasPackageJson = fileExistsSync(packagePath);
46
- if (hasPackageJson) {
47
- return packagePath;
48
- }
49
- }
50
- return null;
51
- }
52
- __name(findPackagePathSync, "findPackagePathSync");
53
- function findPackageSync(cwd) {
54
- const packagePath = findPackagePathSync(cwd);
55
- if (!packagePath) {
56
- return null;
57
- }
58
- try {
59
- const source = readFileSync(packagePath, { encoding: "utf8" });
60
- return JSON.parse(source);
61
- } catch (_err) {
62
- return null;
63
- }
19
+ // ../../node_modules/empathic/package.mjs
20
+ function up2(options) {
21
+ return up("package.json", options);
64
22
  }
65
- __name(findPackageSync, "findPackageSync");
23
+ __name(up2, "up");
66
24
 
67
25
  // src/builders/utils/error-handler.ts
68
26
  import { logger, instance as npmLog } from "storybook/internal/node-logger";
@@ -128,7 +86,7 @@ var runCompodoc = /* @__PURE__ */ __name(({ compodocArgs, tsconfig }, context) =
128
86
  }, "runCompodoc");
129
87
 
130
88
  export {
131
- findPackageSync,
89
+ up2 as up,
132
90
  printErrorDetails,
133
91
  errorSummary,
134
92
  runCompodoc
@@ -1,28 +1,29 @@
1
- import CJS_COMPAT_NODE_URL_vy4slnrgmr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_vy4slnrgmr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_vy4slnrgmr from "node:module";
1
+ import CJS_COMPAT_NODE_URL_suw05nz7bfl from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_suw05nz7bfl from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_suw05nz7bfl from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_vy4slnrgmr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_vy4slnrgmr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_vy4slnrgmr.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_suw05nz7bfl.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_suw05nz7bfl.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_suw05nz7bfl.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
  errorSummary,
14
- findPackageSync,
15
14
  printErrorDetails,
16
- runCompodoc
17
- } from "../../_node-chunks/chunk-TQGBAMEY.js";
15
+ runCompodoc,
16
+ up as up2
17
+ } from "../../_node-chunks/chunk-YHP2BECR.js";
18
18
  import {
19
- findUpSync
20
- } from "../../_node-chunks/chunk-ANZQTXEX.js";
19
+ up
20
+ } from "../../_node-chunks/chunk-XO2ROZHF.js";
21
21
  import {
22
22
  __name
23
- } from "../../_node-chunks/chunk-ASGCKMB5.js";
23
+ } from "../../_node-chunks/chunk-KSD7HOMH.js";
24
24
 
25
25
  // src/builders/build-storybook/index.ts
26
+ import { readFileSync } from "node:fs";
26
27
  import { getEnvConfig, getProjectRoot, versions } from "storybook/internal/common";
27
28
  import { buildStaticStandalone, withTelemetry } from "storybook/internal/core-server";
28
29
  import { addToGlobalContext } from "storybook/internal/telemetry";
@@ -33,9 +34,9 @@ addToGlobalContext("cliVersion", versions.storybook);
33
34
  var commandBuilder = /* @__PURE__ */ __name((options, context) => {
34
35
  const builder = from(setup(options, context)).pipe(
35
36
  switchMap(({ tsConfig }) => {
36
- const docTSConfig = findUpSync("tsconfig.doc.json", {
37
+ const docTSConfig = up("tsconfig.doc.json", {
37
38
  cwd: options.configDir,
38
- stopAt: getProjectRoot()
39
+ last: getProjectRoot()
39
40
  });
40
41
  const runCompodoc$ = options.compodoc ? runCompodoc(
41
42
  { compodocArgs: options.compodocArgs, tsconfig: docTSConfig ?? tsConfig },
@@ -70,8 +71,10 @@ var commandBuilder = /* @__PURE__ */ __name((options, context) => {
70
71
  preserveSymlinks = false,
71
72
  experimentalZoneless = false
72
73
  } = options;
74
+ const packageJsonPath = up2({ cwd: __dirname });
75
+ const packageJson = packageJsonPath != null ? JSON.parse(readFileSync(packageJsonPath, "utf8")) : null;
73
76
  const standaloneOptions = {
74
- packageJson: findPackageSync(__dirname),
77
+ packageJson,
75
78
  configDir,
76
79
  ...docs ? { docs } : {},
77
80
  loglevel,
@@ -117,7 +120,7 @@ async function setup(options, context) {
117
120
  );
118
121
  }
119
122
  return {
120
- tsConfig: options.tsConfig ?? findUpSync("tsconfig.json", { cwd: options.configDir, stopAt: getProjectRoot() }) ?? browserOptions.tsConfig
123
+ tsConfig: options.tsConfig ?? up("tsconfig.json", { cwd: options.configDir, last: getProjectRoot() }) ?? browserOptions.tsConfig
121
124
  };
122
125
  }
123
126
  __name(setup, "setup");
@@ -1,28 +1,29 @@
1
- import CJS_COMPAT_NODE_URL_vy4slnrgmr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_vy4slnrgmr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_vy4slnrgmr from "node:module";
1
+ import CJS_COMPAT_NODE_URL_suw05nz7bfl from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_suw05nz7bfl from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_suw05nz7bfl from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_vy4slnrgmr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_vy4slnrgmr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_vy4slnrgmr.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_suw05nz7bfl.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_suw05nz7bfl.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_suw05nz7bfl.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
  errorSummary,
14
- findPackageSync,
15
14
  printErrorDetails,
16
- runCompodoc
17
- } from "../../_node-chunks/chunk-TQGBAMEY.js";
15
+ runCompodoc,
16
+ up as up2
17
+ } from "../../_node-chunks/chunk-YHP2BECR.js";
18
18
  import {
19
- findUpSync
20
- } from "../../_node-chunks/chunk-ANZQTXEX.js";
19
+ up
20
+ } from "../../_node-chunks/chunk-XO2ROZHF.js";
21
21
  import {
22
22
  __name
23
- } from "../../_node-chunks/chunk-ASGCKMB5.js";
23
+ } from "../../_node-chunks/chunk-KSD7HOMH.js";
24
24
 
25
25
  // src/builders/start-storybook/index.ts
26
+ import { readFileSync } from "node:fs";
26
27
  import { getEnvConfig, getProjectRoot, versions } from "storybook/internal/common";
27
28
  import { buildDevStandalone, withTelemetry } from "storybook/internal/core-server";
28
29
  import { addToGlobalContext } from "storybook/internal/telemetry";
@@ -33,9 +34,9 @@ addToGlobalContext("cliVersion", versions.storybook);
33
34
  var commandBuilder = /* @__PURE__ */ __name((options, context) => {
34
35
  const builder = from(setup(options, context)).pipe(
35
36
  switchMap(({ tsConfig }) => {
36
- const docTSConfig = findUpSync("tsconfig.doc.json", {
37
+ const docTSConfig = up("tsconfig.doc.json", {
37
38
  cwd: options.configDir,
38
- stopAt: getProjectRoot()
39
+ last: getProjectRoot()
39
40
  });
40
41
  const runCompodoc$ = options.compodoc ? runCompodoc(
41
42
  {
@@ -84,8 +85,10 @@ var commandBuilder = /* @__PURE__ */ __name((options, context) => {
84
85
  preserveSymlinks = false,
85
86
  experimentalZoneless = false
86
87
  } = options;
88
+ const packageJsonPath = up2({ cwd: __dirname });
89
+ const packageJson = packageJsonPath != null ? JSON.parse(readFileSync(packageJsonPath, "utf8")) : null;
87
90
  const standaloneOptions = {
88
- packageJson: findPackageSync(__dirname),
91
+ packageJson,
89
92
  ci,
90
93
  configDir,
91
94
  ...docs ? { docs } : {},
@@ -139,7 +142,7 @@ async function setup(options, context) {
139
142
  );
140
143
  }
141
144
  return {
142
- tsConfig: options.tsConfig ?? findUpSync("tsconfig.json", { cwd: options.configDir }) ?? browserOptions.tsConfig
145
+ tsConfig: options.tsConfig ?? up("tsconfig.json", { cwd: options.configDir }) ?? browserOptions.tsConfig
143
146
  };
144
147
  }
145
148
  __name(setup, "setup");
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_vy4slnrgmr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_vy4slnrgmr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_vy4slnrgmr from "node:module";
1
+ import CJS_COMPAT_NODE_URL_suw05nz7bfl from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_suw05nz7bfl from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_suw05nz7bfl from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_vy4slnrgmr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_vy4slnrgmr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_vy4slnrgmr.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_suw05nz7bfl.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_suw05nz7bfl.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_suw05nz7bfl.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
  __name
14
- } from "../_node-chunks/chunk-ASGCKMB5.js";
14
+ } from "../_node-chunks/chunk-KSD7HOMH.js";
15
15
 
16
16
  // src/node/index.ts
17
17
  function defineMain(config) {
package/dist/preset.js CHANGED
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_vy4slnrgmr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_vy4slnrgmr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_vy4slnrgmr from "node:module";
1
+ import CJS_COMPAT_NODE_URL_suw05nz7bfl from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_suw05nz7bfl from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_suw05nz7bfl from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_vy4slnrgmr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_vy4slnrgmr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_vy4slnrgmr.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_suw05nz7bfl.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_suw05nz7bfl.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_suw05nz7bfl.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
  __name
14
- } from "./_node-chunks/chunk-ASGCKMB5.js";
14
+ } from "./_node-chunks/chunk-KSD7HOMH.js";
15
15
 
16
16
  // src/preset.ts
17
17
  var addons = [
@@ -1,20 +1,20 @@
1
- import CJS_COMPAT_NODE_URL_vy4slnrgmr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_vy4slnrgmr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_vy4slnrgmr from "node:module";
1
+ import CJS_COMPAT_NODE_URL_suw05nz7bfl from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_suw05nz7bfl from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_suw05nz7bfl from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_vy4slnrgmr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_vy4slnrgmr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_vy4slnrgmr.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_suw05nz7bfl.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_suw05nz7bfl.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_suw05nz7bfl.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
- findUp
14
- } from "../_node-chunks/chunk-ANZQTXEX.js";
13
+ up
14
+ } from "../_node-chunks/chunk-XO2ROZHF.js";
15
15
  import {
16
16
  __name
17
- } from "../_node-chunks/chunk-ASGCKMB5.js";
17
+ } from "../_node-chunks/chunk-KSD7HOMH.js";
18
18
 
19
19
  // src/server/framework-preset-angular-cli.ts
20
20
  import { logger } from "storybook/internal/node-logger";
@@ -298,7 +298,7 @@ async function getBuilderOptions(options, builderContext) {
298
298
  builderContext.target
299
299
  );
300
300
  const builderOptions = deepMerge(browserTargetOptions, explicitAngularBuilderOptions || {});
301
- builderOptions.tsConfig = options.tsConfig ?? await findUp("tsconfig.json", { cwd: options.configDir, stopAt: getProjectRoot() }) ?? browserTargetOptions.tsConfig;
301
+ builderOptions.tsConfig = options.tsConfig ?? up("tsconfig.json", { cwd: options.configDir, last: getProjectRoot() }) ?? browserTargetOptions.tsConfig;
302
302
  logger.info(`=> Using angular project with "tsConfig:${builderOptions.tsConfig}"`);
303
303
  return builderOptions;
304
304
  }
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_vy4slnrgmr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_vy4slnrgmr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_vy4slnrgmr from "node:module";
1
+ import CJS_COMPAT_NODE_URL_suw05nz7bfl from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_suw05nz7bfl from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_suw05nz7bfl from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_vy4slnrgmr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_vy4slnrgmr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_vy4slnrgmr.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_suw05nz7bfl.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_suw05nz7bfl.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_suw05nz7bfl.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
  __name
14
- } from "../_node-chunks/chunk-ASGCKMB5.js";
14
+ } from "../_node-chunks/chunk-KSD7HOMH.js";
15
15
 
16
16
  // src/server/framework-preset-angular-ivy.ts
17
17
  import { join } from "node:path";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/angular",
3
- "version": "10.0.0-beta.2",
3
+ "version": "10.0.0-beta.4",
4
4
  "description": "Storybook for Angular: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -61,7 +61,7 @@
61
61
  "prep": "jiti ../../../scripts/build/build-package.ts"
62
62
  },
63
63
  "dependencies": {
64
- "@storybook/builder-webpack5": "10.0.0-beta.2",
64
+ "@storybook/builder-webpack5": "10.0.0-beta.4",
65
65
  "@storybook/global": "^5.0.0",
66
66
  "telejson": "8.0.0",
67
67
  "ts-dedent": "^2.0.0",
@@ -81,10 +81,9 @@
81
81
  "@angular/forms": "^19.1.1",
82
82
  "@angular/platform-browser": "^19.1.1",
83
83
  "@angular/platform-browser-dynamic": "^19.1.1",
84
- "@storybook/core-webpack": "10.0.0-beta.2",
84
+ "@storybook/core-webpack": "10.0.0-beta.4",
85
85
  "@types/node": "^22.0.0",
86
- "fd-package-json": "^1.2.0",
87
- "find-up": "^7.0.0",
86
+ "empathic": "^2.0.0",
88
87
  "rimraf": "^6.0.1",
89
88
  "typescript": "^5.8.3",
90
89
  "webpack": "5",
@@ -104,7 +103,7 @@
104
103
  "@angular/platform-browser": ">=18.0.0 < 21.0.0",
105
104
  "@angular/platform-browser-dynamic": ">=18.0.0 < 21.0.0",
106
105
  "rxjs": "^6.5.3 || ^7.4.0",
107
- "storybook": "^10.0.0-beta.2",
106
+ "storybook": "^10.0.0-beta.4",
108
107
  "typescript": "^4.9.0 || ^5.0.0",
109
108
  "zone.js": ">=0.14.0"
110
109
  },
@@ -13,7 +13,7 @@ const meta: Meta<ButtonComponent> = {
13
13
  control: 'color',
14
14
  },
15
15
  },
16
- // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
16
+ // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#story-args
17
17
  args: { onClick: fn() },
18
18
  };
19
19
 
@@ -1,330 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_vy4slnrgmr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_vy4slnrgmr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_vy4slnrgmr from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_vy4slnrgmr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_vy4slnrgmr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_vy4slnrgmr.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- import {
13
- __name
14
- } from "./chunk-ASGCKMB5.js";
15
-
16
- // ../../node_modules/find-up/index.js
17
- import path2 from "node:path";
18
-
19
- // ../../node_modules/locate-path/index.js
20
- import process from "node:process";
21
- import path from "node:path";
22
- import fs, { promises as fsPromises } from "node:fs";
23
- import { fileURLToPath } from "node:url";
24
-
25
- // ../../node_modules/yocto-queue/index.js
26
- var Node = class {
27
- static {
28
- __name(this, "Node");
29
- }
30
- value;
31
- next;
32
- constructor(value) {
33
- this.value = value;
34
- }
35
- };
36
- var Queue = class {
37
- static {
38
- __name(this, "Queue");
39
- }
40
- #head;
41
- #tail;
42
- #size;
43
- constructor() {
44
- this.clear();
45
- }
46
- enqueue(value) {
47
- const node = new Node(value);
48
- if (this.#head) {
49
- this.#tail.next = node;
50
- this.#tail = node;
51
- } else {
52
- this.#head = node;
53
- this.#tail = node;
54
- }
55
- this.#size++;
56
- }
57
- dequeue() {
58
- const current = this.#head;
59
- if (!current) {
60
- return;
61
- }
62
- this.#head = this.#head.next;
63
- this.#size--;
64
- return current.value;
65
- }
66
- peek() {
67
- if (!this.#head) {
68
- return;
69
- }
70
- return this.#head.value;
71
- }
72
- clear() {
73
- this.#head = void 0;
74
- this.#tail = void 0;
75
- this.#size = 0;
76
- }
77
- get size() {
78
- return this.#size;
79
- }
80
- *[Symbol.iterator]() {
81
- let current = this.#head;
82
- while (current) {
83
- yield current.value;
84
- current = current.next;
85
- }
86
- }
87
- *drain() {
88
- while (this.#head) {
89
- yield this.dequeue();
90
- }
91
- }
92
- };
93
-
94
- // ../../node_modules/locate-path/node_modules/p-limit/index.js
95
- function pLimit(concurrency) {
96
- if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
97
- throw new TypeError("Expected `concurrency` to be a number from 1 and up");
98
- }
99
- const queue = new Queue();
100
- let activeCount = 0;
101
- const next = /* @__PURE__ */ __name(() => {
102
- activeCount--;
103
- if (queue.size > 0) {
104
- queue.dequeue()();
105
- }
106
- }, "next");
107
- const run = /* @__PURE__ */ __name(async (fn, resolve, args) => {
108
- activeCount++;
109
- const result = (async () => fn(...args))();
110
- resolve(result);
111
- try {
112
- await result;
113
- } catch {
114
- }
115
- next();
116
- }, "run");
117
- const enqueue = /* @__PURE__ */ __name((fn, resolve, args) => {
118
- queue.enqueue(run.bind(void 0, fn, resolve, args));
119
- (async () => {
120
- await Promise.resolve();
121
- if (activeCount < concurrency && queue.size > 0) {
122
- queue.dequeue()();
123
- }
124
- })();
125
- }, "enqueue");
126
- const generator = /* @__PURE__ */ __name((fn, ...args) => new Promise((resolve) => {
127
- enqueue(fn, resolve, args);
128
- }), "generator");
129
- Object.defineProperties(generator, {
130
- activeCount: {
131
- get: /* @__PURE__ */ __name(() => activeCount, "get")
132
- },
133
- pendingCount: {
134
- get: /* @__PURE__ */ __name(() => queue.size, "get")
135
- },
136
- clearQueue: {
137
- value: /* @__PURE__ */ __name(() => {
138
- queue.clear();
139
- }, "value")
140
- }
141
- });
142
- return generator;
143
- }
144
- __name(pLimit, "pLimit");
145
-
146
- // ../../node_modules/locate-path/node_modules/p-locate/index.js
147
- var EndError = class extends Error {
148
- static {
149
- __name(this, "EndError");
150
- }
151
- constructor(value) {
152
- super();
153
- this.value = value;
154
- }
155
- };
156
- var testElement = /* @__PURE__ */ __name(async (element, tester) => tester(await element), "testElement");
157
- var finder = /* @__PURE__ */ __name(async (element) => {
158
- const values = await Promise.all(element);
159
- if (values[1] === true) {
160
- throw new EndError(values[0]);
161
- }
162
- return false;
163
- }, "finder");
164
- async function pLocate(iterable, tester, {
165
- concurrency = Number.POSITIVE_INFINITY,
166
- preserveOrder = true
167
- } = {}) {
168
- const limit = pLimit(concurrency);
169
- const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]);
170
- const checkLimit = pLimit(preserveOrder ? 1 : Number.POSITIVE_INFINITY);
171
- try {
172
- await Promise.all(items.map((element) => checkLimit(finder, element)));
173
- } catch (error) {
174
- if (error instanceof EndError) {
175
- return error.value;
176
- }
177
- throw error;
178
- }
179
- }
180
- __name(pLocate, "pLocate");
181
-
182
- // ../../node_modules/locate-path/index.js
183
- var typeMappings = {
184
- directory: "isDirectory",
185
- file: "isFile"
186
- };
187
- function checkType(type) {
188
- if (Object.hasOwnProperty.call(typeMappings, type)) {
189
- return;
190
- }
191
- throw new Error(`Invalid type specified: ${type}`);
192
- }
193
- __name(checkType, "checkType");
194
- var matchType = /* @__PURE__ */ __name((type, stat) => stat[typeMappings[type]](), "matchType");
195
- var toPath = /* @__PURE__ */ __name((urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath, "toPath");
196
- async function locatePath(paths, {
197
- cwd = process.cwd(),
198
- type = "file",
199
- allowSymlinks = true,
200
- concurrency,
201
- preserveOrder
202
- } = {}) {
203
- checkType(type);
204
- cwd = toPath(cwd);
205
- const statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;
206
- return pLocate(paths, async (path_) => {
207
- try {
208
- const stat = await statFunction(path.resolve(cwd, path_));
209
- return matchType(type, stat);
210
- } catch {
211
- return false;
212
- }
213
- }, { concurrency, preserveOrder });
214
- }
215
- __name(locatePath, "locatePath");
216
- function locatePathSync(paths, {
217
- cwd = process.cwd(),
218
- type = "file",
219
- allowSymlinks = true
220
- } = {}) {
221
- checkType(type);
222
- cwd = toPath(cwd);
223
- const statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;
224
- for (const path_ of paths) {
225
- try {
226
- const stat = statFunction(path.resolve(cwd, path_), {
227
- throwIfNoEntry: false
228
- });
229
- if (!stat) {
230
- continue;
231
- }
232
- if (matchType(type, stat)) {
233
- return path_;
234
- }
235
- } catch {
236
- }
237
- }
238
- }
239
- __name(locatePathSync, "locatePathSync");
240
-
241
- // ../../node_modules/find-up/node_modules/unicorn-magic/node.js
242
- import { fileURLToPath as fileURLToPath2 } from "node:url";
243
- function toPath2(urlOrPath) {
244
- return urlOrPath instanceof URL ? fileURLToPath2(urlOrPath) : urlOrPath;
245
- }
246
- __name(toPath2, "toPath");
247
-
248
- // ../../node_modules/find-up/index.js
249
- var findUpStop = Symbol("findUpStop");
250
- async function findUpMultiple(name, options = {}) {
251
- let directory = path2.resolve(toPath2(options.cwd) ?? "");
252
- const { root } = path2.parse(directory);
253
- const stopAt = path2.resolve(directory, toPath2(options.stopAt ?? root));
254
- const limit = options.limit ?? Number.POSITIVE_INFINITY;
255
- const paths = [name].flat();
256
- const runMatcher = /* @__PURE__ */ __name(async (locateOptions) => {
257
- if (typeof name !== "function") {
258
- return locatePath(paths, locateOptions);
259
- }
260
- const foundPath = await name(locateOptions.cwd);
261
- if (typeof foundPath === "string") {
262
- return locatePath([foundPath], locateOptions);
263
- }
264
- return foundPath;
265
- }, "runMatcher");
266
- const matches = [];
267
- while (true) {
268
- const foundPath = await runMatcher({ ...options, cwd: directory });
269
- if (foundPath === findUpStop) {
270
- break;
271
- }
272
- if (foundPath) {
273
- matches.push(path2.resolve(directory, foundPath));
274
- }
275
- if (directory === stopAt || matches.length >= limit) {
276
- break;
277
- }
278
- directory = path2.dirname(directory);
279
- }
280
- return matches;
281
- }
282
- __name(findUpMultiple, "findUpMultiple");
283
- function findUpMultipleSync(name, options = {}) {
284
- let directory = path2.resolve(toPath2(options.cwd) ?? "");
285
- const { root } = path2.parse(directory);
286
- const stopAt = path2.resolve(directory, toPath2(options.stopAt) ?? root);
287
- const limit = options.limit ?? Number.POSITIVE_INFINITY;
288
- const paths = [name].flat();
289
- const runMatcher = /* @__PURE__ */ __name((locateOptions) => {
290
- if (typeof name !== "function") {
291
- return locatePathSync(paths, locateOptions);
292
- }
293
- const foundPath = name(locateOptions.cwd);
294
- if (typeof foundPath === "string") {
295
- return locatePathSync([foundPath], locateOptions);
296
- }
297
- return foundPath;
298
- }, "runMatcher");
299
- const matches = [];
300
- while (true) {
301
- const foundPath = runMatcher({ ...options, cwd: directory });
302
- if (foundPath === findUpStop) {
303
- break;
304
- }
305
- if (foundPath) {
306
- matches.push(path2.resolve(directory, foundPath));
307
- }
308
- if (directory === stopAt || matches.length >= limit) {
309
- break;
310
- }
311
- directory = path2.dirname(directory);
312
- }
313
- return matches;
314
- }
315
- __name(findUpMultipleSync, "findUpMultipleSync");
316
- async function findUp(name, options = {}) {
317
- const matches = await findUpMultiple(name, { ...options, limit: 1 });
318
- return matches[0];
319
- }
320
- __name(findUp, "findUp");
321
- function findUpSync(name, options = {}) {
322
- const matches = findUpMultipleSync(name, { ...options, limit: 1 });
323
- return matches[0];
324
- }
325
- __name(findUpSync, "findUpSync");
326
-
327
- export {
328
- findUp,
329
- findUpSync
330
- };
@@ -1,17 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_vy4slnrgmr from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_vy4slnrgmr from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_vy4slnrgmr from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_vy4slnrgmr.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_vy4slnrgmr.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_vy4slnrgmr.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- var __defProp = Object.defineProperty;
13
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
14
-
15
- export {
16
- __name
17
- };