@storybook/angular-vite 10.6.0-alpha.4 → 10.6.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.
@@ -25,6 +25,67 @@ import { bootstrapApplication } from "@angular/platform-browser";
25
25
  import { BehaviorSubject } from "rxjs";
26
26
  import { stringify } from "telejson";
27
27
 
28
+ // src/template-grammar.ts
29
+ var isValidIdentifier = (name) => /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(name), formatPropInTemplate = (propertyName) => isValidIdentifier(propertyName) ? propertyName : `this['${propertyName}']`, stringifyCircular = (obj) => {
30
+ let seen = /* @__PURE__ */ new Set();
31
+ return JSON.stringify(obj, (key, value) => {
32
+ if (typeof value == "object" && value !== null) {
33
+ if (seen.has(value))
34
+ return "[Circular]";
35
+ seen.add(value);
36
+ }
37
+ return value;
38
+ });
39
+ }, singleQuoted = (text) => `'${JSON.stringify(text).slice(1, -1).replace(/\\"/g, '"').replace(/'/g, "\\'").replace(/"/g, """)}'`, formatJsonValue = (value) => typeof value == "string" ? singleQuoted(value) : Array.isArray(value) ? `[${value.map(formatJsonValue).join(", ")}]` : value !== null && typeof value == "object" ? `{${Object.entries(value).map(
40
+ ([key, item]) => `${isValidIdentifier(key) ? key : singleQuoted(key)}: ${formatJsonValue(item)}`
41
+ ).join(", ")}}` : String(value), formatInputValue = (value) => {
42
+ switch (typeof value) {
43
+ case "string":
44
+ return singleQuoted(value);
45
+ case "object":
46
+ return formatJsonValue(JSON.parse(stringifyCircular(value)));
47
+ default:
48
+ return `${value}`;
49
+ }
50
+ }, VOID_ELEMENTS = /* @__PURE__ */ new Set([
51
+ "area",
52
+ "base",
53
+ "br",
54
+ "col",
55
+ "command",
56
+ "embed",
57
+ "hr",
58
+ "img",
59
+ "input",
60
+ "keygen",
61
+ "link",
62
+ "meta",
63
+ "param",
64
+ "source",
65
+ "track",
66
+ "wbr"
67
+ ]), LEADING_CLASS = /^\..+/, LEADING_ATTRIBUTE = /^\[.+?]/, ID = /#([\w-]+)/, CLASS_RUN = /(\.[\w-]+)+/, ATTRIBUTE = /\[(.+?)]/g, ELEMENT_AND_ATTRIBUTES = /(\S+)(.*)/, MAX_SINGLE_LINE = 80, buildTemplate = (selector, { inputs, outputs, innerTemplate = "" }) => {
68
+ let bindings = [
69
+ ...inputs.map(({ name, expression }) => `[${name}]="${expression}"`),
70
+ ...outputs.map((name) => `(${name})="${formatPropInTemplate(name)}($event)"`)
71
+ ], firstSelector = selector.split(",")[0];
72
+ return (LEADING_CLASS.test(firstSelector) || LEADING_ATTRIBUTE.test(firstSelector) ? `div${firstSelector}` : firstSelector).replace(ID, ' id="$1"').replace(CLASS_RUN, (classes) => ` class="${classes.split(".").join(" ").trim()}"`).replace(ATTRIBUTE, " $1").replace(ELEMENT_AND_ATTRIBUTES, (_, element, attributes) => {
73
+ let inlineTag = `<${element}${attributes}${bindings.map((binding) => ` ${binding}`).join("")}`, inline = VOID_ELEMENTS.has(element) ? `${inlineTag} />` : `${inlineTag}>${innerTemplate}</${element}>`;
74
+ if (inline.length <= MAX_SINGLE_LINE || bindings.length === 0)
75
+ return inline;
76
+ let brokenTag = `<${element}${attributes}
77
+ ${bindings.map((binding) => ` ${binding}`).join(`
78
+ `)}`;
79
+ if (VOID_ELEMENTS.has(element))
80
+ return `${brokenTag} />`;
81
+ let content = innerTemplate === "" ? `
82
+ ` : `
83
+ ${innerTemplate}
84
+ `;
85
+ return `${brokenTag}>${content}</${element}>`;
86
+ });
87
+ }, buildComponentOutletTemplate = (componentName) => `<ng-container *ngComponentOutlet="${componentName}"></ng-container>`;
88
+
28
89
  // src/client/renderer/utils/NgComponentAnalyzer.ts
29
90
  import {
30
91
  Component,
@@ -103,108 +164,36 @@ var isComponent = (component) => component ? (reflectionCapabilities.annotations
103
164
  var getComponentPropsDecoratorMetadata = (component) => reflectionCapabilities.propMetadata(component), getComponentDecoratorMetadata = (component) => reflectionCapabilities.annotations(component).reverse().find((d) => d instanceof Component);
104
165
 
105
166
  // src/client/renderer/ComputesTemplateFromComponent.ts
106
- var isValidIdentifier = (name) => /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(name), formatPropInTemplate = (propertyName) => isValidIdentifier(propertyName) ? propertyName : `this['${propertyName}']`, separateInputsOutputsAttributes = (ngComponentInputsOutputs, props = {}) => {
107
- let inputs = ngComponentInputsOutputs.inputs.filter((i) => i.templateName in props).map((i) => i.templateName), outputs = ngComponentInputsOutputs.outputs.filter((o) => o.templateName in props).map((o) => o.templateName);
108
- return {
109
- inputs,
110
- outputs,
111
- otherProps: Object.keys(props).filter((k) => ![...inputs, ...outputs].includes(k))
112
- };
113
- }, computesTemplateFromComponent = (component, initialProps, innerTemplate = "") => {
167
+ var separateInputsOutputsAttributes = (ngComponentInputsOutputs, props = {}) => ({
168
+ inputs: ngComponentInputsOutputs.inputs.filter((i) => i.templateName in props).map((i) => i.templateName),
169
+ outputs: ngComponentInputsOutputs.outputs.filter((o) => o.templateName in props).map((o) => o.templateName)
170
+ }), computesTemplateFromComponent = (component, initialProps, innerTemplate = "") => {
114
171
  let ngComponentMetadata = getComponentDecoratorMetadata(component), ngComponentInputsOutputs = getComponentInputsOutputs(component);
115
172
  if (!ngComponentMetadata.selector)
116
173
  return '<ng-container *ngComponentOutlet="storyComponent"></ng-container>';
117
- let { inputs: initialInputs, outputs: initialOutputs } = separateInputsOutputsAttributes(
174
+ let { inputs, outputs } = separateInputsOutputsAttributes(
118
175
  ngComponentInputsOutputs,
119
176
  initialProps
120
- ), templateInputs = initialInputs.length > 0 ? ` ${initialInputs.map((i) => `[${i}]="${formatPropInTemplate(i)}"`).join(" ")}` : "", templateOutputs = initialOutputs.length > 0 ? ` ${initialOutputs.map((i) => `(${i})="${formatPropInTemplate(i)}($event)"`).join(" ")}` : "";
121
- return buildTemplate(
122
- ngComponentMetadata.selector,
123
- innerTemplate,
124
- templateInputs,
125
- templateOutputs
126
177
  );
127
- };
128
- function stringifyCircular(obj) {
129
- let seen = /* @__PURE__ */ new Set();
130
- return JSON.stringify(obj, (key, value) => {
131
- if (typeof value == "object" && value !== null) {
132
- if (seen.has(value))
133
- return "[Circular]";
134
- seen.add(value);
135
- }
136
- return value;
178
+ return buildTemplate(ngComponentMetadata.selector, {
179
+ inputs: inputs.map((name) => ({ name, expression: formatPropInTemplate(name) })),
180
+ outputs,
181
+ innerTemplate
137
182
  });
138
- }
139
- var createAngularInputProperty = ({
140
- propertyName,
141
- value,
142
- argType
143
- }) => {
144
- let templateValue;
145
- switch (typeof value) {
146
- case "string":
147
- templateValue = `'${value}'`;
148
- break;
149
- case "object":
150
- templateValue = stringifyCircular(value).replace(/'/g, "\u2019").replace(/\\"/g, "\u201D").replace(/"([^-"]+)":/g, "$1: ").replace(/"/g, "'").replace(/\u2019/g, "\\'").replace(/\u201D/g, "\\'").split(",").join(", ");
151
- break;
152
- default:
153
- templateValue = value;
154
- }
155
- return `[${propertyName}]="${templateValue}"`;
156
- }, computesTemplateSourceFromComponent = (component, initialProps, argTypes) => {
183
+ }, computesTemplateSourceFromComponent = (component, initialProps) => {
157
184
  let ngComponentMetadata = getComponentDecoratorMetadata(component);
158
185
  if (!ngComponentMetadata)
159
186
  return null;
160
187
  if (!ngComponentMetadata.selector)
161
- return `<ng-container *ngComponentOutlet="${component.name}"></ng-container>`;
162
- let ngComponentInputsOutputs = getComponentInputsOutputs(component), { inputs: initialInputs, outputs: initialOutputs } = separateInputsOutputsAttributes(
188
+ return buildComponentOutletTemplate(component.name);
189
+ let ngComponentInputsOutputs = getComponentInputsOutputs(component), { inputs, outputs } = separateInputsOutputsAttributes(
163
190
  ngComponentInputsOutputs,
164
191
  initialProps
165
- ), templateInputs = initialInputs.length > 0 ? ` ${initialInputs.map(
166
- (propertyName) => createAngularInputProperty({
167
- propertyName,
168
- value: initialProps[propertyName],
169
- argType: argTypes?.[propertyName]
170
- })
171
- ).join(" ")}` : "", templateOutputs = initialOutputs.length > 0 ? ` ${initialOutputs.map((i) => `(${i})="${formatPropInTemplate(i)}($event)"`).join(" ")}` : "";
172
- return buildTemplate(ngComponentMetadata.selector, "", templateInputs, templateOutputs);
173
- }, buildTemplate = (selector, innerTemplate, inputs, outputs) => {
174
- let voidElements = [
175
- "area",
176
- "base",
177
- "br",
178
- "col",
179
- "command",
180
- "embed",
181
- "hr",
182
- "img",
183
- "input",
184
- "keygen",
185
- "link",
186
- "meta",
187
- "param",
188
- "source",
189
- "track",
190
- "wbr"
191
- ], firstSelector = selector.split(",")[0];
192
- return [
193
- [/(^.*?)(?=[,])/, "$1"],
194
- [/(^\..+)/, "div$1"],
195
- [/(^\[.+?])/, "div$1"],
196
- [/([\w[\]]+)(\s*,[\w\s-[\],]+)+/, "$1"],
197
- [/#([\w-]+)/, ' id="$1"'],
198
- [/((\.[\w-]+)+)/, (_, c) => ` class="${c.split`.`.join` `.trim()}"`],
199
- [/(\[.+?])/g, (_, a) => ` ${a.slice(1, -1)}`],
200
- [
201
- /([\S]+)(.*)/,
202
- (template, elementSelector) => voidElements.some((element) => elementSelector === element) ? template.replace(/([\S]+)(.*)/, `<$1$2${inputs}${outputs} />`) : template.replace(/([\S]+)(.*)/, `<$1$2${inputs}${outputs}>${innerTemplate}</$1>`)
203
- ]
204
- ].reduce(
205
- (prevSelector, [searchValue, replacer]) => prevSelector.replace(searchValue, replacer),
206
- firstSelector
207
192
  );
193
+ return buildTemplate(ngComponentMetadata.selector, {
194
+ inputs: inputs.map((name) => ({ name, expression: formatInputValue(initialProps?.[name]) })),
195
+ outputs
196
+ });
208
197
  };
209
198
 
210
199
  // src/client/renderer/StorybookWrapperComponent.ts
@@ -713,9 +702,9 @@ async function renderToCanvas({
713
702
 
714
703
  export {
715
704
  __export,
705
+ formatPropInTemplate,
716
706
  getComponentInputsOutputs,
717
707
  isComponent,
718
- formatPropInTemplate,
719
708
  computesTemplateFromComponent,
720
709
  computesTemplateSourceFromComponent,
721
710
  render,
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  config_exports
3
- } from "./chunk-P4DOL4U2.js";
3
+ } from "./chunk-CHMLOECK.js";
4
4
  import {
5
5
  config_exports as config_exports2
6
- } from "./chunk-THKACJYB.js";
6
+ } from "./chunk-BUNW7ROM.js";
7
7
  import {
8
8
  computesTemplateFromComponent,
9
9
  formatPropInTemplate,
10
10
  isComponent,
11
11
  render_exports
12
- } from "./chunk-6DVGZIOB.js";
12
+ } from "./chunk-ECGMCGUZ.js";
13
13
 
14
14
  // src/client/portable-stories.ts
15
15
  import {
@@ -0,0 +1,35 @@
1
+ import CJS_COMPAT_NODE_URL_ze1vib595n from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_ze1vib595n from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_ze1vib595n from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_ze1vib595n.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_ze1vib595n.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_ze1vib595n.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 { createMetaComponentResolver } from "storybook/internal/common";
15
+ import { loadCsf } from "storybook/internal/csf-tools";
16
+ import { readFileSync } from "node:fs";
17
+ var resolveMetaComponent = createMetaComponentResolver();
18
+ function parseStoryFile(storyFilePath, title) {
19
+ try {
20
+ let source = readFileSync(storyFilePath, "utf8").replace(/\r\n/g, `
21
+ `);
22
+ return { source, csf: loadCsf(source, { makeTitle: () => title }).parse() };
23
+ } catch {
24
+ return;
25
+ }
26
+ }
27
+ function resolveStoryComponent(storyFilePath, title = "Docgen") {
28
+ let parsed = parseStoryFile(storyFilePath, title);
29
+ return parsed ? resolveMetaComponent(parsed.csf, storyFilePath) : { reason: "no-meta-component" };
30
+ }
31
+
32
+ export {
33
+ parseStoryFile,
34
+ resolveStoryComponent
35
+ };
@@ -0,0 +1,38 @@
1
+ import CJS_COMPAT_NODE_URL_ze1vib595n from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_ze1vib595n from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_ze1vib595n from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_ze1vib595n.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_ze1vib595n.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_ze1vib595n.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+ import {
13
+ up
14
+ } from "./chunk-ORVVXDOZ.js";
15
+
16
+ // ../../../node_modules/empathic/package.mjs
17
+ function up2(options) {
18
+ return up("package.json", options);
19
+ }
20
+
21
+ // src/builders/utils/error-handler.ts
22
+ import { logger, instance as npmLog } from "storybook/internal/node-logger";
23
+ import { dedent } from "ts-dedent";
24
+ var printErrorDetails = (error) => {
25
+ npmLog.heading = "", error instanceof Error ? error.error ? logger.error(error.error) : error.stats && error.stats.compilation.errors ? error.stats.compilation.errors.forEach((e) => logger.log(e)) : logger.error(error) : error.compilation?.errors && error.compilation.errors.forEach((e) => logger.log(e));
26
+ }, errorSummary = (error) => error.close ? dedent`
27
+ FATAL broken build!, will close the process,
28
+ Fix the error below and restart storybook.
29
+ ` : dedent`
30
+ Broken build, fix the error above.
31
+ You may need to refresh the browser.
32
+ `;
33
+
34
+ export {
35
+ up2 as up,
36
+ printErrorDetails,
37
+ errorSummary
38
+ };
@@ -0,0 +1,50 @@
1
+ import CJS_COMPAT_NODE_URL_ze1vib595n from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_ze1vib595n from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_ze1vib595n from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_ze1vib595n.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_ze1vib595n.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_ze1vib595n.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+
13
+ // src/find-tsconfig.ts
14
+ import { getProjectRoot } from "storybook/internal/common";
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
+
29
+ // ../../../node_modules/empathic/walk.mjs
30
+ function up(base, options) {
31
+ let { last, cwd } = options || {}, tmp = absolute(base, cwd), root = absolute(last || "/", cwd), prev, arr = [];
32
+ for (; prev !== root && (arr.push(tmp), tmp = dirname(prev = tmp), tmp !== prev); )
33
+ ;
34
+ return arr;
35
+ }
36
+
37
+ // ../../../node_modules/empathic/find.mjs
38
+ function up2(name, options) {
39
+ let dir, tmp, start = options && options.cwd || "";
40
+ for (dir of up(start, options))
41
+ if (tmp = join2(dir, name), existsSync(tmp)) return tmp;
42
+ }
43
+
44
+ // src/find-tsconfig.ts
45
+ var findTsconfigUp = (configDir) => up2("tsconfig.json", { cwd: configDir, last: getProjectRoot() });
46
+
47
+ export {
48
+ up2 as up,
49
+ findTsconfigUp
50
+ };
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_b4rv4nwvmm5 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_b4rv4nwvmm5 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_b4rv4nwvmm5 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_ze1vib595n from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_ze1vib595n from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_ze1vib595n from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_b4rv4nwvmm5.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_b4rv4nwvmm5.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_b4rv4nwvmm5.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_ze1vib595n.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_ze1vib595n.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_ze1vib595n.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,13 +12,15 @@ var require = CJS_COMPAT_NODE_MODULE_b4rv4nwvmm5.createRequire(import.meta.url);
12
12
  import {
13
13
  errorSummary,
14
14
  printErrorDetails,
15
- up,
16
- up2
17
- } from "../../_node-chunks/chunk-W6F2Z6W3.js";
15
+ up
16
+ } from "../../_node-chunks/chunk-6P3TQP4W.js";
17
+ import {
18
+ findTsconfigUp
19
+ } from "../../_node-chunks/chunk-ORVVXDOZ.js";
18
20
 
19
21
  // src/builders/build-storybook/index.ts
20
22
  import { readFileSync } from "node:fs";
21
- import { getEnvConfig, getProjectRoot, versions } from "storybook/internal/common";
23
+ import { getEnvConfig, versions } from "storybook/internal/common";
22
24
  import { buildStaticStandalone, withTelemetry } from "storybook/internal/core-server";
23
25
  import { addToGlobalContext } from "storybook/internal/telemetry";
24
26
  import { logger, logTracker } from "storybook/internal/node-logger";
@@ -51,7 +53,7 @@ var commandBuilder = async (options, context) => {
51
53
  sourceMap = !1,
52
54
  preserveSymlinks = !1,
53
55
  zoneless = !0
54
- } = options, packageJsonPath = up2({ cwd: __dirname }), standaloneOptions = {
56
+ } = options, packageJsonPath = up({ cwd: __dirname }), standaloneOptions = {
55
57
  packageJson: packageJsonPath != null ? JSON.parse(readFileSync(packageJsonPath, "utf8")) : null,
56
58
  configDir,
57
59
  ...docs ? { docs } : {},
@@ -89,7 +91,7 @@ async function setup(options, context) {
89
91
  await context.getTargetOptions(browserTarget),
90
92
  await context.getBuilderNameForTarget(browserTarget)
91
93
  )), {
92
- tsConfig: options.tsConfig ?? up("tsconfig.json", { cwd: options.configDir, last: getProjectRoot() }) ?? browserOptions.tsConfig
94
+ tsConfig: options.tsConfig ?? findTsconfigUp(options.configDir) ?? browserOptions.tsConfig
93
95
  };
94
96
  }
95
97
  async function runInstance(options) {
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_b4rv4nwvmm5 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_b4rv4nwvmm5 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_b4rv4nwvmm5 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_ze1vib595n from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_ze1vib595n from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_ze1vib595n from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_b4rv4nwvmm5.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_b4rv4nwvmm5.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_b4rv4nwvmm5.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_ze1vib595n.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_ze1vib595n.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_ze1vib595n.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,9 +12,11 @@ var require = CJS_COMPAT_NODE_MODULE_b4rv4nwvmm5.createRequire(import.meta.url);
12
12
  import {
13
13
  errorSummary,
14
14
  printErrorDetails,
15
- up,
16
- up2
17
- } from "../../_node-chunks/chunk-W6F2Z6W3.js";
15
+ up
16
+ } from "../../_node-chunks/chunk-6P3TQP4W.js";
17
+ import {
18
+ findTsconfigUp
19
+ } from "../../_node-chunks/chunk-ORVVXDOZ.js";
18
20
 
19
21
  // src/builders/start-storybook/index.ts
20
22
  import { readFileSync } from "node:fs";
@@ -64,7 +66,7 @@ var commandBuilder = (options, context) => new Observable((observer) => {
64
66
  sourceMap = !1,
65
67
  preserveSymlinks = !1,
66
68
  zoneless = !0
67
- } = options, packageJsonPath = up2({ cwd: __dirname }), standaloneOptions = {
69
+ } = options, packageJsonPath = up({ cwd: __dirname }), standaloneOptions = {
68
70
  packageJson: packageJsonPath != null ? JSON.parse(readFileSync(packageJsonPath, "utf8")) : null,
69
71
  ci,
70
72
  configDir,
@@ -119,7 +121,7 @@ async function setup(options, context) {
119
121
  await context.getTargetOptions(browserTarget),
120
122
  await context.getBuilderNameForTarget(browserTarget)
121
123
  )), {
122
- tsConfig: options.tsConfig ?? up("tsconfig.json", { cwd: options.configDir }) ?? browserOptions.tsConfig
124
+ tsConfig: options.tsConfig ?? findTsconfigUp(options.configDir) ?? browserOptions.tsConfig
123
125
  };
124
126
  }
125
127
  async function runInstance(options) {
@@ -2,11 +2,11 @@ import {
2
2
  argTypesEnhancers,
3
3
  decorateStory,
4
4
  parameters
5
- } from "../_browser-chunks/chunk-P4DOL4U2.js";
5
+ } from "../_browser-chunks/chunk-CHMLOECK.js";
6
6
  import {
7
7
  render,
8
8
  renderToCanvas
9
- } from "../_browser-chunks/chunk-6DVGZIOB.js";
9
+ } from "../_browser-chunks/chunk-ECGMCGUZ.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-THKACJYB.js";
5
- import "../../_browser-chunks/chunk-6DVGZIOB.js";
4
+ } from "../../_browser-chunks/chunk-BUNW7ROM.js";
5
+ import "../../_browser-chunks/chunk-ECGMCGUZ.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-KBKLVYEJ.js";
9
- import "../_browser-chunks/chunk-P4DOL4U2.js";
10
- import "../_browser-chunks/chunk-THKACJYB.js";
11
- import "../_browser-chunks/chunk-6DVGZIOB.js";
8
+ } from "../_browser-chunks/chunk-HBLYOJ22.js";
9
+ import "../_browser-chunks/chunk-CHMLOECK.js";
10
+ import "../_browser-chunks/chunk-BUNW7ROM.js";
11
+ import "../_browser-chunks/chunk-ECGMCGUZ.js";
12
12
  export {
13
13
  __definePreview,
14
14
  applicationConfig,