New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@storybook/core

Package Overview
Dependencies
Maintainers
11
Versions
1377
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/core - npm Package Compare versions

Comparing version 0.0.0-pr-29223-sha-d3f5ad98 to 0.0.0-pr-29254-sha-27a5decc

4

dist/builder-manager/index.js

@@ -1083,2 +1083,3 @@ import ESM_COMPAT_Module from "node:module";

switch (this.mode) {
// Just executing code
case _.modes.EVAL:

@@ -1088,2 +1089,3 @@ this.source += " ; " + e + `

break;
// Exec, esc, and output
case _.modes.ESCAPED:

@@ -1093,2 +1095,3 @@ this.source += " ; __append(escapeFn(" + Ge(e) + `))

break;
// Exec and output
case _.modes.RAW:

@@ -1100,2 +1103,3 @@ this.source += " ; __append(" + Ge(e) + `)

break;
// Literal <%% mode, append as raw output
case _.modes.LITERAL:

@@ -1102,0 +1106,0 @@ this._addOutput(e);

4

dist/common/index.d.ts

@@ -838,4 +838,2 @@ import * as _storybook_core_types from '@storybook/core/types';

declare function handlebars(source: string, data: any): string;
/**

@@ -975,2 +973,2 @@ * Return a string corresponding to template filled with bindings using following pattern: For each

export { type FileOptions, HandledError, type InstallationMetadata, JsPackageManager, JsPackageManagerFactory, type PackageJsonWithDepsAndDevDeps, type PackageJsonWithMaybeDeps, type PackageManagerName, type PackageMetadata, boost, builderPackages, cache, checkAddonOrder, codeLog, commandLog, commonGlobOptions, createFileSystemCache, createLogStream, extractProperFrameworkName, extractProperRendererNameFromFramework, filterPresetsConfig, findConfigFile, formatFileContent, frameworkPackages, frameworkToRenderer, getAutoRefs, getBuilderOptions, getChars, getCoercedStorybookVersion, getConfigInfo, getDirectoryFromWorkingDir, getEnvConfig, getFrameworkName, getInterpretedFile, getInterpretedFileWithExt, getPackageDetails, getPresets, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStoryId, getStoryTitle, getStorybookConfiguration, getStorybookInfo, globToRegexp, handlebars, interopRequireDefault, interpolate, isCorePackage, isPreservingSymlinks, loadAllPresets, loadCustomPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, paddedLog, parseList, posix, readTemplate, removeAddon, rendererPackages, resolveAddonName, resolvePathInStorybookCache, satisfies, serverRequire, serverResolve, stringifyEnvs, stringifyProcessEnvs, stripAbsNodeModulesPath, temporaryDirectory, temporaryFile, validateConfigurationFiles, validateFrameworkName, _default as versions };
export { type FileOptions, HandledError, type InstallationMetadata, JsPackageManager, JsPackageManagerFactory, type PackageJsonWithDepsAndDevDeps, type PackageJsonWithMaybeDeps, type PackageManagerName, type PackageMetadata, boost, builderPackages, cache, checkAddonOrder, codeLog, commandLog, commonGlobOptions, createFileSystemCache, createLogStream, extractProperFrameworkName, extractProperRendererNameFromFramework, filterPresetsConfig, findConfigFile, formatFileContent, frameworkPackages, frameworkToRenderer, getAutoRefs, getBuilderOptions, getChars, getCoercedStorybookVersion, getConfigInfo, getDirectoryFromWorkingDir, getEnvConfig, getFrameworkName, getInterpretedFile, getInterpretedFileWithExt, getPackageDetails, getPresets, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStoryId, getStoryTitle, getStorybookConfiguration, getStorybookInfo, globToRegexp, interopRequireDefault, interpolate, isCorePackage, isPreservingSymlinks, loadAllPresets, loadCustomPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, paddedLog, parseList, posix, readTemplate, removeAddon, rendererPackages, resolveAddonName, resolvePathInStorybookCache, satisfies, serverRequire, serverResolve, stringifyEnvs, stringifyProcessEnvs, stripAbsNodeModulesPath, temporaryDirectory, temporaryFile, validateConfigurationFiles, validateFrameworkName, _default as versions };

@@ -549,2 +549,3 @@ var De = Object.defineProperty;

switch (n.tag) {
// arg & argument are aliases for param.
case "param":

@@ -551,0 +552,0 @@ case "arg":

@@ -625,3 +625,2 @@ import ESM_COMPAT_Module from "node:module";

"queryFromLocation",
"queryFromString",
"stringifyQuery",

@@ -643,3 +642,2 @@ "useNavigate"

"queryFromLocation",
"queryFromString",
"stringifyQuery",

@@ -661,3 +659,2 @@ "useNavigate"

"queryFromLocation",
"queryFromString",
"stringifyQuery",

@@ -664,0 +661,0 @@ "useNavigate"

/// <reference types="node" />
import { EventEmitter } from 'events';
/**
Levels:
- `0` - All colors disabled.
- `1` - Basic 16 colors support.
- `2` - ANSI 256 colors support.
- `3` - Truecolor 16 million colors support.
*/
type ColorSupportLevel = 0 | 1 | 2 | 3;
// TODO: Make it this when TS suports that.
// import {ModifierName, ForegroundColor, BackgroundColor, ColorName} from '#ansi-styles';
// import {ColorInfo, ColorSupportLevel} from '#supports-color';
// eslint-disable-line @typescript-eslint/naming-convention
interface ChalkInstance {
(...text: unknown[]): string;
/**
The color support for Chalk.
By default, color support is automatically detected based on the environment.
Levels:
- `0` - All colors disabled.
- `1` - Basic 16 colors support.
- `2` - ANSI 256 colors support.
- `3` - Truecolor 16 million colors support.
*/
level: ColorSupportLevel;
/**
Use RGB values to set text color.
@example
```
import chalk from 'chalk';
chalk.rgb(222, 173, 237);
```
*/
rgb: (red: number, green: number, blue: number) => this;
/**
Use HEX value to set text color.
@param color - Hexadecimal value representing the desired color.
@example
```
import chalk from 'chalk';
chalk.hex('#DEADED');
```
*/
hex: (color: string) => this;
/**
Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
@example
```
import chalk from 'chalk';
chalk.ansi256(201);
```
*/
ansi256: (index: number) => this;
/**
Use RGB values to set background color.
@example
```
import chalk from 'chalk';
chalk.bgRgb(222, 173, 237);
```
*/
bgRgb: (red: number, green: number, blue: number) => this;
/**
Use HEX value to set background color.
@param color - Hexadecimal value representing the desired color.
@example
```
import chalk from 'chalk';
chalk.bgHex('#DEADED');
```
*/
bgHex: (color: string) => this;
/**
Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color.
@example
```
import chalk from 'chalk';
chalk.bgAnsi256(201);
```
*/
bgAnsi256: (index: number) => this;
/**
Modifier: Reset the current style.
*/
readonly reset: this;
/**
Modifier: Make the text bold.
*/
readonly bold: this;
/**
Modifier: Make the text have lower opacity.
*/
readonly dim: this;
/**
Modifier: Make the text italic. *(Not widely supported)*
*/
readonly italic: this;
/**
Modifier: Put a horizontal line below the text. *(Not widely supported)*
*/
readonly underline: this;
/**
Modifier: Put a horizontal line above the text. *(Not widely supported)*
*/
readonly overline: this;
/**
Modifier: Invert background and foreground colors.
*/
readonly inverse: this;
/**
Modifier: Print the text but make it invisible.
*/
readonly hidden: this;
/**
Modifier: Puts a horizontal line through the center of the text. *(Not widely supported)*
*/
readonly strikethrough: this;
/**
Modifier: Print the text only when Chalk has a color level above zero.
Can be useful for things that are purely cosmetic.
*/
readonly visible: this;
readonly black: this;
readonly red: this;
readonly green: this;
readonly yellow: this;
readonly blue: this;
readonly magenta: this;
readonly cyan: this;
readonly white: this;
/*
Alias for `blackBright`.
*/
readonly gray: this;
/*
Alias for `blackBright`.
*/
readonly grey: this;
readonly blackBright: this;
readonly redBright: this;
readonly greenBright: this;
readonly yellowBright: this;
readonly blueBright: this;
readonly magentaBright: this;
readonly cyanBright: this;
readonly whiteBright: this;
readonly bgBlack: this;
readonly bgRed: this;
readonly bgGreen: this;
readonly bgYellow: this;
readonly bgBlue: this;
readonly bgMagenta: this;
readonly bgCyan: this;
readonly bgWhite: this;
/*
Alias for `bgBlackBright`.
*/
readonly bgGray: this;
/*
Alias for `bgBlackBright`.
*/
readonly bgGrey: this;
readonly bgBlackBright: this;
readonly bgRedBright: this;
readonly bgGreenBright: this;
readonly bgYellowBright: this;
readonly bgBlueBright: this;
readonly bgMagentaBright: this;
readonly bgCyanBright: this;
readonly bgWhiteBright: this;
}
declare namespace npmlog {

@@ -300,9 +85,9 @@ // TODO: newStream, newGroup, setGaugeTemplate and setGaugeTemplateSet need to be added

declare const colors: {
pink: ChalkInstance;
purple: ChalkInstance;
orange: ChalkInstance;
green: ChalkInstance;
blue: ChalkInstance;
red: ChalkInstance;
gray: ChalkInstance;
pink: (text: string) => string;
purple: (text: string) => string;
orange: (text: string) => string;
green: (text: string) => string;
blue: (text: string) => string;
red: (text: string) => string;
gray: (text: string) => string;
};

@@ -309,0 +94,0 @@ declare const logger: {

@@ -876,3 +876,3 @@ import { Channel } from '@storybook/core/channels';

setSelection(selection: Selection): void;
setQueryParams(queryParams: qs.ParsedQs): void;
setQueryParams(queryParams: Record<PropertyKey, unknown>): void;
}

@@ -967,56 +967,2 @@

declare namespace QueryString {
type defaultEncoder = (str: any, defaultEncoder?: any, charset?: string) => string;
type defaultDecoder = (str: string, decoder?: any, charset?: string) => string;
interface IStringifyOptions {
delimiter?: string | undefined;
strictNullHandling?: boolean | undefined;
skipNulls?: boolean | undefined;
encode?: boolean | undefined;
encoder?:
| ((str: any, defaultEncoder: defaultEncoder, charset: string, type: "key" | "value") => string)
| undefined;
filter?: Array<string | number> | ((prefix: string, value: any) => any) | undefined;
arrayFormat?: "indices" | "brackets" | "repeat" | "comma" | undefined;
indices?: boolean | undefined;
sort?: ((a: any, b: any) => number) | undefined;
serializeDate?: ((d: Date) => string) | undefined;
format?: "RFC1738" | "RFC3986" | undefined;
encodeValuesOnly?: boolean | undefined;
addQueryPrefix?: boolean | undefined;
allowDots?: boolean | undefined;
charset?: "utf-8" | "iso-8859-1" | undefined;
charsetSentinel?: boolean | undefined;
}
interface IParseOptions {
comma?: boolean | undefined;
delimiter?: string | RegExp | undefined;
depth?: number | false | undefined;
decoder?:
| ((str: string, defaultDecoder: defaultDecoder, charset: string, type: "key" | "value") => any)
| undefined;
arrayLimit?: number | undefined;
parseArrays?: boolean | undefined;
allowDots?: boolean | undefined;
plainObjects?: boolean | undefined;
allowPrototypes?: boolean | undefined;
parameterLimit?: number | undefined;
strictNullHandling?: boolean | undefined;
ignoreQueryPrefix?: boolean | undefined;
charset?: "utf-8" | "iso-8859-1" | undefined;
charsetSentinel?: boolean | undefined;
interpretNumericEntities?: boolean | undefined;
}
interface ParsedQs {
[key: string]: undefined | string | string[] | ParsedQs | ParsedQs[];
}
function stringify(obj: any, options?: IStringifyOptions): string;
function parse(str: string, options?: IParseOptions & { decoder?: never | undefined }): ParsedQs;
function parse(str: string | Record<string, string>, options?: IParseOptions): { [key: string]: unknown };
}
declare class UrlStore implements SelectionStore {

@@ -1027,3 +973,3 @@ selectionSpecifier: SelectionSpecifier | null;

setSelection(selection: Selection): void;
setQueryParams(queryParams: QueryString.ParsedQs): void;
setQueryParams(queryParams: Record<PropertyKey, unknown>): void;
}

@@ -1030,0 +976,0 @@

@@ -19,3 +19,2 @@ import * as React from 'react';

}
declare const queryFromString: (s?: string) => Query;
declare const queryFromLocation: (location: Partial<Location>) => Query;

@@ -387,2 +386,2 @@ declare const stringifyQuery: (query: Query) => string;

export { BaseLocationProvider, DEEPLY_EQUAL, Link, type LinkProps, Location$1 as Location, LocationProvider, Match, type NavigateFunction, type NavigateOptions, type Other, type RenderData, Route, type RouterData, type StoryData, buildArgsParam, deepDiff, getMatch, parsePath, queryFromLocation, queryFromString, stringifyQuery, useNavigate };
export { BaseLocationProvider, DEEPLY_EQUAL, Link, type LinkProps, Location$1 as Location, LocationProvider, Match, type NavigateFunction, type NavigateOptions, type Other, type RenderData, Route, type RouterData, type StoryData, buildArgsParam, deepDiff, getMatch, parsePath, queryFromLocation, stringifyQuery, useNavigate };

@@ -7,16 +7,22 @@ import ESM_COMPAT_Module from "node:module";

const require = ESM_COMPAT_Module.createRequire(import.meta.url);
var Ae = Object.create;
var I = Object.defineProperty;
var ke = Object.getOwnPropertyDescriptor;
var Ce = Object.getOwnPropertyNames;
var Te = Object.getPrototypeOf, xe = Object.prototype.hasOwnProperty;
var n = (t, o) => I(t, "name", { value: o, configurable: !0 });
var _e = (t, o) => () => (o || t((o = { exports: {} }).exports, o), o.exports);
var Me = (t, o, e, r) => {
if (o && typeof o == "object" || typeof o == "function")
for (let s of Ce(o))
!xe.call(t, s) && s !== e && I(t, s, { get: () => o[s], enumerable: !(r = ke(o, s)) || r.enumerable });
var ne = Object.create;
var x = Object.defineProperty;
var ae = Object.getOwnPropertyDescriptor;
var ie = Object.getOwnPropertyNames;
var ce = Object.getPrototypeOf, ue = Object.prototype.hasOwnProperty;
var s = (t, e) => x(t, "name", { value: e, configurable: !0 }), f = /* @__PURE__ */ ((t) => typeof require < "u" ? require : typeof Proxy < "\
u" ? new Proxy(t, {
get: (e, o) => (typeof require < "u" ? require : e)[o]
}) : t)(function(t) {
if (typeof require < "u") return require.apply(this, arguments);
throw Error('Dynamic require of "' + t + '" is not supported');
});
var O = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
var le = (t, e, o, n) => {
if (e && typeof e == "object" || typeof e == "function")
for (let c of ie(e))
!ue.call(t, c) && c !== o && x(t, c, { get: () => e[c], enumerable: !(n = ae(e, c)) || n.enumerable });
return t;
};
var Ie = (t, o, e) => (e = t != null ? Ae(Te(t)) : {}, Me(
var A = (t, e, o) => (o = t != null ? ne(ce(t)) : {}, le(
// If the importer is in node compatibility mode or this is not an ESM

@@ -26,415 +32,126 @@ // file that has been converted to a CommonJS file using a Babel-

// "default" to the CommonJS "module.exports" for node compatibility.
o || !t || !t.__esModule ? I(e, "default", { value: t, enumerable: !0 }) : e,
e || !t || !t.__esModule ? x(o, "default", { value: t, enumerable: !0 }) : o,
t
));
// ../node_modules/picocolors/picocolors.js
var w = O((ye, k) => {
var _ = process.argv || [], h = process.env, me = !("NO_COLOR" in h || _.includes("--no-color")) && ("FORCE_COLOR" in h || _.includes("--c\
olor") || process.platform === "win32" || f != null && f("tty").isatty(1) && h.TERM !== "dumb" || "CI" in h), be = /* @__PURE__ */ s((t, e, o = t) => (n) => {
let c = "" + n, u = c.indexOf(e, t.length);
return ~u ? t + ge(c, e, o, u) + e : t + c + e;
}, "formatter"), ge = /* @__PURE__ */ s((t, e, o, n) => {
let c = "", u = 0;
do
c += t.substring(u, n) + o, u = n + e.length, n = t.indexOf(e, u);
while (~n);
return c + t.substring(u);
}, "replaceClose"), C = /* @__PURE__ */ s((t = me) => {
let e = t ? be : () => String;
return {
isColorSupported: t,
reset: e("\x1B[0m", "\x1B[0m"),
bold: e("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
dim: e("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
italic: e("\x1B[3m", "\x1B[23m"),
underline: e("\x1B[4m", "\x1B[24m"),
inverse: e("\x1B[7m", "\x1B[27m"),
hidden: e("\x1B[8m", "\x1B[28m"),
strikethrough: e("\x1B[9m", "\x1B[29m"),
black: e("\x1B[30m", "\x1B[39m"),
red: e("\x1B[31m", "\x1B[39m"),
green: e("\x1B[32m", "\x1B[39m"),
yellow: e("\x1B[33m", "\x1B[39m"),
blue: e("\x1B[34m", "\x1B[39m"),
magenta: e("\x1B[35m", "\x1B[39m"),
cyan: e("\x1B[36m", "\x1B[39m"),
white: e("\x1B[37m", "\x1B[39m"),
gray: e("\x1B[90m", "\x1B[39m"),
bgBlack: e("\x1B[40m", "\x1B[49m"),
bgRed: e("\x1B[41m", "\x1B[49m"),
bgGreen: e("\x1B[42m", "\x1B[49m"),
bgYellow: e("\x1B[43m", "\x1B[49m"),
bgBlue: e("\x1B[44m", "\x1B[49m"),
bgMagenta: e("\x1B[45m", "\x1B[49m"),
bgCyan: e("\x1B[46m", "\x1B[49m"),
bgWhite: e("\x1B[47m", "\x1B[49m"),
blackBright: e("\x1B[90m", "\x1B[39m"),
redBright: e("\x1B[91m", "\x1B[39m"),
greenBright: e("\x1B[92m", "\x1B[39m"),
yellowBright: e("\x1B[93m", "\x1B[39m"),
blueBright: e("\x1B[94m", "\x1B[39m"),
magentaBright: e("\x1B[95m", "\x1B[39m"),
cyanBright: e("\x1B[96m", "\x1B[39m"),
whiteBright: e("\x1B[97m", "\x1B[39m"),
bgBlackBright: e("\x1B[100m", "\x1B[49m"),
bgRedBright: e("\x1B[101m", "\x1B[49m"),
bgGreenBright: e("\x1B[102m", "\x1B[49m"),
bgYellowBright: e("\x1B[103m", "\x1B[49m"),
bgBlueBright: e("\x1B[104m", "\x1B[49m"),
bgMagentaBright: e("\x1B[105m", "\x1B[49m"),
bgCyanBright: e("\x1B[106m", "\x1B[49m"),
bgWhiteBright: e("\x1B[107m", "\x1B[49m")
};
}, "createColors");
k.exports = C();
k.exports.createColors = C;
});
// ../node_modules/ts-dedent/dist/index.js
var Y = _e((C) => {
var I = O((y) => {
"use strict";
Object.defineProperty(C, "__esModule", { value: !0 });
C.dedent = void 0;
function U(t) {
for (var o = [], e = 1; e < arguments.length; e++)
o[e - 1] = arguments[e];
var r = Array.from(typeof t == "string" ? [t] : t);
r[r.length - 1] = r[r.length - 1].replace(/\r?\n([\t ]*)$/, "");
var s = r.reduce(function(g, _) {
var O = _.match(/\n([\t ]+|(?!\s).)/g);
return O ? g.concat(O.map(function(M) {
var y, b;
return (b = (y = M.match(/[\t ]/g)) === null || y === void 0 ? void 0 : y.length) !== null && b !== void 0 ? b : 0;
})) : g;
Object.defineProperty(y, "__esModule", { value: !0 });
y.dedent = void 0;
function M(t) {
for (var e = [], o = 1; o < arguments.length; o++)
e[o - 1] = arguments[o];
var n = Array.from(typeof t == "string" ? [t] : t);
n[n.length - 1] = n[n.length - 1].replace(/\r?\n([\t ]*)$/, "");
var c = n.reduce(function(m, E) {
var p = E.match(/\n([\t ]+|(?!\s).)/g);
return p ? m.concat(p.map(function(R) {
var g, d;
return (d = (g = R.match(/[\t ]/g)) === null || g === void 0 ? void 0 : g.length) !== null && d !== void 0 ? d : 0;
})) : m;
}, []);
if (s.length) {
var c = new RegExp(`
[ ]{` + Math.min.apply(Math, s) + "}", "g");
r = r.map(function(g) {
return g.replace(c, `
if (c.length) {
var u = new RegExp(`
[ ]{` + Math.min.apply(Math, c) + "}", "g");
n = n.map(function(m) {
return m.replace(u, `
`);
});
}
r[0] = r[0].replace(/^\r?\n/, "");
var l = r[0];
return o.forEach(function(g, _) {
var O = l.match(/(?:^|\n)( *)$/), M = O ? O[1] : "", y = g;
typeof g == "string" && g.includes(`
`) && (y = String(g).split(`
`).map(function(b, Oe) {
return Oe === 0 ? b : "" + M + b;
n[0] = n[0].replace(/^\r?\n/, "");
var b = n[0];
return e.forEach(function(m, E) {
var p = b.match(/(?:^|\n)( *)$/), R = p ? p[1] : "", g = m;
typeof m == "string" && m.includes(`
`) && (g = String(m).split(`
`).map(function(d, se) {
return se === 0 ? d : "" + R + d;
}).join(`
`)), l += y + r[_ + 1];
}), l;
`)), b += g + n[E + 1];
}), b;
}
n(U, "dedent");
C.dedent = U;
C.default = U;
s(M, "dedent");
y.dedent = M;
y.default = M;
});
// node_modules/chalk/source/vendor/ansi-styles/index.js
var L = /* @__PURE__ */ n((t = 0) => (o) => `\x1B[${o + t}m`, "wrapAnsi16"), B = /* @__PURE__ */ n((t = 0) => (o) => `\x1B[${38 + t};5;${o}m`,
"wrapAnsi256"), W = /* @__PURE__ */ n((t = 0) => (o, e, r) => `\x1B[${38 + t};2;${o};${e};${r}m`, "wrapAnsi16m"), d = {
modifier: {
reset: [0, 0],
// 21 isn't widely supported and 22 does the same thing
bold: [1, 22],
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
overline: [53, 55],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
},
color: {
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
// Bright color
blackBright: [90, 39],
gray: [90, 39],
// Alias of `blackBright`
grey: [90, 39],
// Alias of `blackBright`
redBright: [91, 39],
greenBright: [92, 39],
yellowBright: [93, 39],
blueBright: [94, 39],
magentaBright: [95, 39],
cyanBright: [96, 39],
whiteBright: [97, 39]
},
bgColor: {
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
// Bright color
bgBlackBright: [100, 49],
bgGray: [100, 49],
// Alias of `bgBlackBright`
bgGrey: [100, 49],
// Alias of `bgBlackBright`
bgRedBright: [101, 49],
bgGreenBright: [102, 49],
bgYellowBright: [103, 49],
bgBlueBright: [104, 49],
bgMagentaBright: [105, 49],
bgCyanBright: [106, 49],
bgWhiteBright: [107, 49]
}
}, He = Object.keys(d.modifier), Se = Object.keys(d.color), we = Object.keys(d.bgColor), Xe = [...Se, ...we];
function ve() {
let t = /* @__PURE__ */ new Map();
for (let [o, e] of Object.entries(d)) {
for (let [r, s] of Object.entries(e))
d[r] = {
open: `\x1B[${s[0]}m`,
close: `\x1B[${s[1]}m`
}, e[r] = d[r], t.set(s[0], s[1]);
Object.defineProperty(d, o, {
value: e,
enumerable: !1
});
}
return Object.defineProperty(d, "codes", {
value: t,
enumerable: !1
}), d.color.close = "\x1B[39m", d.bgColor.close = "\x1B[49m", d.color.ansi = L(), d.color.ansi256 = B(), d.color.ansi16m = W(), d.bgColor.
ansi = L(10), d.bgColor.ansi256 = B(10), d.bgColor.ansi16m = W(10), Object.defineProperties(d, {
rgbToAnsi256: {
value(o, e, r) {
return o === e && e === r ? o < 8 ? 16 : o > 248 ? 231 : Math.round((o - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(o / 255 * 5) + 6 *
Math.round(e / 255 * 5) + Math.round(r / 255 * 5);
},
enumerable: !1
},
hexToRgb: {
value(o) {
let e = /[a-f\d]{6}|[a-f\d]{3}/i.exec(o.toString(16));
if (!e)
return [0, 0, 0];
let [r] = e;
r.length === 3 && (r = [...r].map((c) => c + c).join(""));
let s = Number.parseInt(r, 16);
return [
/* eslint-disable no-bitwise */
s >> 16 & 255,
s >> 8 & 255,
s & 255
/* eslint-enable no-bitwise */
];
},
enumerable: !1
},
hexToAnsi256: {
value: /* @__PURE__ */ n((o) => d.rgbToAnsi256(...d.hexToRgb(o)), "value"),
enumerable: !1
},
ansi256ToAnsi: {
value(o) {
if (o < 8)
return 30 + o;
if (o < 16)
return 90 + (o - 8);
let e, r, s;
if (o >= 232)
e = ((o - 232) * 10 + 8) / 255, r = e, s = e;
else {
o -= 16;
let g = o % 36;
e = Math.floor(o / 36) / 5, r = Math.floor(g / 6) / 5, s = g % 6 / 5;
}
let c = Math.max(e, r, s) * 2;
if (c === 0)
return 30;
let l = 30 + (Math.round(s) << 2 | Math.round(r) << 1 | Math.round(e));
return c === 2 && (l += 60), l;
},
enumerable: !1
},
rgbToAnsi: {
value: /* @__PURE__ */ n((o, e, r) => d.ansi256ToAnsi(d.rgbToAnsi256(o, e, r)), "value"),
enumerable: !1
},
hexToAnsi: {
value: /* @__PURE__ */ n((o) => d.ansi256ToAnsi(d.hexToAnsi256(o)), "value"),
enumerable: !1
}
}), d;
}
n(ve, "assembleStyles");
var Ne = ve(), h = Ne;
// node_modules/chalk/source/vendor/supports-color/index.js
import S from "node:process";
import Le from "node:os";
import F from "node:tty";
function f(t, o = globalThis.Deno ? globalThis.Deno.args : S.argv) {
let e = t.startsWith("-") ? "" : t.length === 1 ? "-" : "--", r = o.indexOf(e + t), s = o.indexOf("--");
return r !== -1 && (s === -1 || r < s);
}
n(f, "hasFlag");
var { env: p } = S, T;
f("no-color") || f("no-colors") || f("color=false") || f("color=never") ? T = 0 : (f("color") || f("colors") || f("color=true") || f("color=\
always")) && (T = 1);
function Be() {
if ("FORCE_COLOR" in p)
return p.FORCE_COLOR === "true" ? 1 : p.FORCE_COLOR === "false" ? 0 : p.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(p.FORCE_COLOR,
10), 3);
}
n(Be, "envForceColor");
function We(t) {
return t === 0 ? !1 : {
level: t,
hasBasic: !0,
has256: t >= 2,
has16m: t >= 3
};
}
n(We, "translateLevel");
function Fe(t, { streamIsTTY: o, sniffFlags: e = !0 } = {}) {
let r = Be();
r !== void 0 && (T = r);
let s = e ? T : r;
if (s === 0)
return 0;
if (e) {
if (f("color=16m") || f("color=full") || f("color=truecolor"))
return 3;
if (f("color=256"))
return 2;
}
if ("TF_BUILD" in p && "AGENT_NAME" in p)
return 1;
if (t && !o && s === void 0)
return 0;
let c = s || 0;
if (p.TERM === "dumb")
return c;
if (S.platform === "win32") {
let l = Le.release().split(".");
return Number(l[0]) >= 10 && Number(l[2]) >= 10586 ? Number(l[2]) >= 14931 ? 3 : 2 : 1;
}
if ("CI" in p)
return "GITHUB_ACTIONS" in p || "GITEA_ACTIONS" in p ? 3 : ["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((l) => l in
p) || p.CI_NAME === "codeship" ? 1 : c;
if ("TEAMCITY_VERSION" in p)
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(p.TEAMCITY_VERSION) ? 1 : 0;
if (p.COLORTERM === "truecolor" || p.TERM === "xterm-kitty")
return 3;
if ("TERM_PROGRAM" in p) {
let l = Number.parseInt((p.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
switch (p.TERM_PROGRAM) {
case "iTerm.app":
return l >= 3 ? 3 : 2;
case "Apple_Terminal":
return 2;
}
}
return /-256(color)?$/i.test(p.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(p.TERM) || "COLORTERM" in p ?
1 : c;
}
n(Fe, "_supportsColor");
function K(t, o = {}) {
let e = Fe(t, {
streamIsTTY: t && t.isTTY,
...o
});
return We(e);
}
n(K, "createSupportsColor");
var Ke = {
stdout: K({ isTTY: F.isatty(1) }),
stderr: K({ isTTY: F.isatty(2) })
}, P = Ke;
// node_modules/chalk/source/utilities.js
function j(t, o, e) {
let r = t.indexOf(o);
if (r === -1)
return t;
let s = o.length, c = 0, l = "";
do
l += t.slice(c, r) + o + e, c = r + s, r = t.indexOf(o, c);
while (r !== -1);
return l += t.slice(c), l;
}
n(j, "stringReplaceAll");
function V(t, o, e, r) {
let s = 0, c = "";
do {
let l = t[r - 1] === "\r";
c += t.slice(s, l ? r - 1 : r) + o + (l ? `\r
` : `
`) + e, s = r + 1, r = t.indexOf(`
`, s);
} while (r !== -1);
return c += t.slice(s), c;
}
n(V, "stringEncaseCRLFWithFirstIndex");
// node_modules/chalk/source/index.js
var { stdout: $, stderr: D } = P, w = Symbol("GENERATOR"), E = Symbol("STYLER"), A = Symbol("IS_EMPTY"), G = [
"ansi",
"ansi",
"ansi256",
"ansi16m"
], R = /* @__PURE__ */ Object.create(null), Pe = /* @__PURE__ */ n((t, o = {}) => {
if (o.level && !(Number.isInteger(o.level) && o.level >= 0 && o.level <= 3))
throw new Error("The `level` option should be an integer from 0 to 3");
let e = $ ? $.level : 0;
t.level = o.level === void 0 ? e : o.level;
}, "applyOptions");
var je = /* @__PURE__ */ n((t) => {
let o = /* @__PURE__ */ n((...e) => e.join(" "), "chalk");
return Pe(o, t), Object.setPrototypeOf(o, k.prototype), o;
}, "chalkFactory");
function k(t) {
return je(t);
}
n(k, "createChalk");
Object.setPrototypeOf(k.prototype, Function.prototype);
for (let [t, o] of Object.entries(h))
R[t] = {
get() {
let e = x(this, N(o.open, o.close, this[E]), this[A]);
return Object.defineProperty(this, t, { value: e }), e;
}
};
R.visible = {
get() {
let t = x(this, this[E], !0);
return Object.defineProperty(this, "visible", { value: t }), t;
}
};
var v = /* @__PURE__ */ n((t, o, e, ...r) => t === "rgb" ? o === "ansi16m" ? h[e].ansi16m(...r) : o === "ansi256" ? h[e].ansi256(h.rgbToAnsi256(
...r)) : h[e].ansi(h.rgbToAnsi(...r)) : t === "hex" ? v("rgb", o, e, ...h.hexToRgb(...r)) : h[e][t](...r), "getModelAnsi"), Ve = ["rgb", "he\
x", "ansi256"];
for (let t of Ve) {
R[t] = {
get() {
let { level: e } = this;
return function(...r) {
let s = N(v(t, G[e], "color", ...r), h.color.close, this[E]);
return x(this, s, this[A]);
};
}
};
let o = "bg" + t[0].toUpperCase() + t.slice(1);
R[o] = {
get() {
let { level: e } = this;
return function(...r) {
let s = N(v(t, G[e], "bgColor", ...r), h.bgColor.close, this[E]);
return x(this, s, this[A]);
};
}
};
}
var $e = Object.defineProperties(() => {
}, {
...R,
level: {
enumerable: !0,
get() {
return this[w].level;
},
set(t) {
this[w].level = t;
}
}
}), N = /* @__PURE__ */ n((t, o, e) => {
let r, s;
return e === void 0 ? (r = t, s = o) : (r = e.openAll + t, s = o + e.closeAll), {
open: t,
close: o,
openAll: r,
closeAll: s,
parent: e
};
}, "createStyler"), x = /* @__PURE__ */ n((t, o, e) => {
let r = /* @__PURE__ */ n((...s) => De(r, s.length === 1 ? "" + s[0] : s.join(" ")), "builder");
return Object.setPrototypeOf(r, $e), r[w] = t, r[E] = o, r[A] = e, r;
}, "createBuilder"), De = /* @__PURE__ */ n((t, o) => {
if (t.level <= 0 || !o)
return t[A] ? "" : o;
let e = t[E];
if (e === void 0)
return o;
let { openAll: r, closeAll: s } = e;
if (o.includes("\x1B"))
for (; e !== void 0; )
o = j(o, e.close, e.open), e = e.parent;
let c = o.indexOf(`
`);
return c !== -1 && (o = V(o, s, r, c)), r + o + s;
}, "applyStyle");
Object.defineProperties(k.prototype, R);
var Ge = k(), ao = k({ level: D ? D.level : 0 });
var m = Ge;
// src/server-errors.ts
var u = Ie(Y(), 1);
var l = A(w(), 1), i = A(I(), 1);
// src/storybook-error.ts
function H({
function S({
code: t,
category: o
category: e
}) {
let e = String(t).padStart(4, "0");
return `SB_${o}_${e}`;
let o = String(t).padStart(4, "0");
return `SB_${e}_${o}`;
}
n(H, "parseErrorCode");
s(S, "parseErrorCode");
var a = class t extends Error {
constructor(e) {
super(t.getFullMessage(e));
constructor(o) {
super(t.getFullMessage(o));
/**

@@ -447,29 +164,29 @@ * Data associated with the error. Used to provide additional information in the error message or

this.fromStorybook = !0;
this.category = e.category, this.documentation = e.documentation ?? !1, this.code = e.code;
this.category = o.category, this.documentation = o.documentation ?? !1, this.code = o.code;
}
static {
n(this, "StorybookError");
s(this, "StorybookError");
}
get fullErrorCode() {
return H({ code: this.code, category: this.category });
return S({ code: this.code, category: this.category });
}
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
get name() {
let e = this.constructor.name;
return `${this.fullErrorCode} (${e})`;
let o = this.constructor.name;
return `${this.fullErrorCode} (${o})`;
}
/** Generates the error message along with additional documentation link (if applicable). */
static getFullMessage({
documentation: e,
code: r,
category: s,
message: c
documentation: o,
code: n,
category: c,
message: u
}) {
let l;
return e === !0 ? l = `https://storybook.js.org/error/${H({ code: r, category: s })}` : typeof e == "string" ? l = e : Array.isArray(e) &&
(l = `
${e.map((g) => ` - ${g}`).join(`
`)}`), `${c}${l != null ? `
let b;
return o === !0 ? b = `https://storybook.js.org/error/${S({ code: n, category: c })}` : typeof o == "string" ? b = o : Array.isArray(o) &&
(b = `
${o.map((m) => ` - ${m}`).join(`
`)}`), `${u}${b != null ? `
More info: ${l}
More info: ${b}
` : ""}`;

@@ -480,16 +197,16 @@ }

// src/server-errors.ts
var Ue = /* @__PURE__ */ ((i) => (i.CLI = "CLI", i.CLI_INIT = "CLI_INIT", i.CLI_AUTOMIGRATE = "CLI_AUTOMIGRATE", i.CLI_UPGRADE = "CLI_UPGRAD\
E", i.CLI_ADD = "CLI_ADD", i.CODEMOD = "CODEMOD", i.CORE_SERVER = "CORE-SERVER", i.CSF_PLUGIN = "CSF-PLUGIN", i.CSF_TOOLS = "CSF-TOOLS", i.CORE_COMMON =
"CORE-COMMON", i.NODE_LOGGER = "NODE-LOGGER", i.TELEMETRY = "TELEMETRY", i.BUILDER_MANAGER = "BUILDER-MANAGER", i.BUILDER_VITE = "BUILDER-VI\
TE", i.BUILDER_WEBPACK5 = "BUILDER-WEBPACK5", i.SOURCE_LOADER = "SOURCE-LOADER", i.POSTINSTALL = "POSTINSTALL", i.DOCS_TOOLS = "DOCS-TOOLS",
i.CORE_WEBPACK = "CORE-WEBPACK", i.FRAMEWORK_ANGULAR = "FRAMEWORK_ANGULAR", i.FRAMEWORK_EMBER = "FRAMEWORK_EMBER", i.FRAMEWORK_HTML_VITE = "\
FRAMEWORK_HTML-VITE", i.FRAMEWORK_HTML_WEBPACK5 = "FRAMEWORK_HTML-WEBPACK5", i.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", i.FRAMEWORK_PREACT_VITE =
"FRAMEWORK_PREACT-VITE", i.FRAMEWORK_PREACT_WEBPACK5 = "FRAMEWORK_PREACT-WEBPACK5", i.FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE", i.FRAMEWORK_REACT_WEBPACK5 =
"FRAMEWORK_REACT-WEBPACK5", i.FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5", i.FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE", i.
FRAMEWORK_SVELTE_WEBPACK5 = "FRAMEWORK_SVELTE-WEBPACK5", i.FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT", i.FRAMEWORK_VUE_VITE = "FRAMEWORK_VU\
E-VITE", i.FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5", i.FRAMEWORK_VUE3_VITE = "FRAMEWORK_VUE3-VITE", i.FRAMEWORK_VUE3_WEBPACK5 = "FR\
AMEWORK_VUE3-WEBPACK5", i.FRAMEWORK_WEB_COMPONENTS_VITE = "FRAMEWORK_WEB-COMPONENTS-VITE", i.FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = "FRAMEWORK_\
WEB-COMPONENTS-WEBPACK5", i))(Ue || {}), X = class extends a {
var de = /* @__PURE__ */ ((r) => (r.CLI = "CLI", r.CLI_INIT = "CLI_INIT", r.CLI_AUTOMIGRATE = "CLI_AUTOMIGRATE", r.CLI_UPGRADE = "CLI_UPGRAD\
E", r.CLI_ADD = "CLI_ADD", r.CODEMOD = "CODEMOD", r.CORE_SERVER = "CORE-SERVER", r.CSF_PLUGIN = "CSF-PLUGIN", r.CSF_TOOLS = "CSF-TOOLS", r.CORE_COMMON =
"CORE-COMMON", r.NODE_LOGGER = "NODE-LOGGER", r.TELEMETRY = "TELEMETRY", r.BUILDER_MANAGER = "BUILDER-MANAGER", r.BUILDER_VITE = "BUILDER-VI\
TE", r.BUILDER_WEBPACK5 = "BUILDER-WEBPACK5", r.SOURCE_LOADER = "SOURCE-LOADER", r.POSTINSTALL = "POSTINSTALL", r.DOCS_TOOLS = "DOCS-TOOLS",
r.CORE_WEBPACK = "CORE-WEBPACK", r.FRAMEWORK_ANGULAR = "FRAMEWORK_ANGULAR", r.FRAMEWORK_EMBER = "FRAMEWORK_EMBER", r.FRAMEWORK_HTML_VITE = "\
FRAMEWORK_HTML-VITE", r.FRAMEWORK_HTML_WEBPACK5 = "FRAMEWORK_HTML-WEBPACK5", r.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", r.FRAMEWORK_PREACT_VITE =
"FRAMEWORK_PREACT-VITE", r.FRAMEWORK_PREACT_WEBPACK5 = "FRAMEWORK_PREACT-WEBPACK5", r.FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE", r.FRAMEWORK_REACT_WEBPACK5 =
"FRAMEWORK_REACT-WEBPACK5", r.FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5", r.FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE", r.
FRAMEWORK_SVELTE_WEBPACK5 = "FRAMEWORK_SVELTE-WEBPACK5", r.FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT", r.FRAMEWORK_VUE_VITE = "FRAMEWORK_VU\
E-VITE", r.FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5", r.FRAMEWORK_VUE3_VITE = "FRAMEWORK_VUE3-VITE", r.FRAMEWORK_VUE3_WEBPACK5 = "FR\
AMEWORK_VUE3-WEBPACK5", r.FRAMEWORK_WEB_COMPONENTS_VITE = "FRAMEWORK_WEB-COMPONENTS-VITE", r.FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = "FRAMEWORK_\
WEB-COMPONENTS-WEBPACK5", r))(de || {}), T = class extends a {
static {
n(this, "NxProjectDetectedError");
s(this, "NxProjectDetectedError");
}

@@ -501,3 +218,3 @@ constructor() {

documentation: "https://nx.dev/packages/storybook",
message: u.dedent`
message: i.dedent`
We have detected Nx in your project. Nx has its own Storybook initializer, so please use it instead.

@@ -507,5 +224,5 @@ Run "nx g @nx/storybook:configuration" to add Storybook to your project.`

}
}, z = class extends a {
}, W = class extends a {
static {
n(this, "MissingFrameworkFieldError");
s(this, "MissingFrameworkFieldError");
}

@@ -517,3 +234,3 @@ constructor() {

documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api",
message: u.dedent`
message: i.dedent`
Could not find a 'framework' field in Storybook config.

@@ -524,4 +241,4 @@

}
}, J = class extends a {
constructor(e) {
}, K = class extends a {
constructor(o) {
super({

@@ -531,4 +248,4 @@ category: "CORE-COMMON",

documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api",
message: u.dedent`
Invalid value of '${e.frameworkName}' in the 'framework' field of Storybook config.
message: i.dedent`
Invalid value of '${o.frameworkName}' in the 'framework' field of Storybook config.

@@ -538,9 +255,9 @@ Please run 'npx storybook automigrate' to automatically fix your config.

});
this.data = e;
this.data = o;
}
static {
n(this, "InvalidFrameworkNameError");
s(this, "InvalidFrameworkNameError");
}
}, q = class extends a {
constructor(e) {
}, v = class extends a {
constructor(o) {
super({

@@ -550,15 +267,15 @@ category: "CORE-COMMON",

documentation: "",
message: u.dedent`
Could not evaluate the '${e.frameworkName}' package from the 'framework' field of Storybook config.
message: i.dedent`
Could not evaluate the '${o.frameworkName}' package from the 'framework' field of Storybook config.
Are you sure it's a valid package and is installed?`
});
this.data = e;
this.data = o;
}
static {
n(this, "CouldNotEvaluateFrameworkError");
s(this, "CouldNotEvaluateFrameworkError");
}
}, Q = class extends a {
}, L = class extends a {
static {
n(this, "ConflictingStaticDirConfigError");
s(this, "ConflictingStaticDirConfigError");
}

@@ -570,3 +287,3 @@ constructor() {

documentation: "https://storybook.js.org/docs/react/configure/images-and-assets#serving-static-files-via-storybook-configuration",
message: u.dedent`
message: i.dedent`
Storybook encountered a conflict when trying to serve statics. You have configured both:

@@ -579,5 +296,5 @@ * Storybook's option in the config file: 'staticDirs'

}
}, Z = class extends a {
}, B = class extends a {
static {
n(this, "InvalidStoriesEntryError");
s(this, "InvalidStoriesEntryError");
}

@@ -589,3 +306,3 @@ constructor() {

documentation: "https://storybook.js.org/docs/react/faq#can-i-have-a-storybook-with-no-local-stories",
message: u.dedent`
message: i.dedent`
Storybook could not index your stories.

@@ -597,5 +314,5 @@ Your main configuration somehow does not contain a 'stories' field, or it resolved to an empty array.

}
}, ee = class extends a {
}, P = class extends a {
static {
n(this, "WebpackMissingStatsError");
s(this, "WebpackMissingStatsError");
}

@@ -610,3 +327,3 @@ constructor() {

],
message: u.dedent`
message: i.dedent`
No Webpack stats found. Did you turn off stats reporting in your Webpack config?

@@ -616,26 +333,26 @@ Storybook needs Webpack stats (including errors) in order to build correctly.`

}
}, oe = class extends a {
constructor(e) {
}, N = class extends a {
constructor(o) {
super({
category: "BUILDER-WEBPACK5",
code: 2,
message: e.error.message.trim()
message: o.error.message.trim()
});
this.data = e;
this.data = o;
}
static {
n(this, "WebpackInvocationError");
s(this, "WebpackInvocationError");
}
};
function te(t = "") {
function V(t = "") {
return t.replace(/\u001B\[[0-9;]*m/g, "");
}
n(te, "removeAnsiEscapeCodes");
var re = class extends a {
constructor(e) {
e.errors = e.errors.map((r) => ({
...r,
message: te(r.message),
stack: te(r.stack),
name: r.name
s(V, "removeAnsiEscapeCodes");
var j = class extends a {
constructor(o) {
o.errors = o.errors.map((n) => ({
...n,
message: V(n.message),
stack: V(n.stack),
name: n.name
}));

@@ -646,3 +363,3 @@ super({

// This error message is a followup of errors logged by Webpack to the user
message: u.dedent`
message: i.dedent`
There were problems when compiling your code with Webpack.

@@ -652,9 +369,9 @@ Run Storybook with --debug-webpack for more information.

});
this.data = e;
this.data = o;
}
static {
n(this, "WebpackCompilationError");
s(this, "WebpackCompilationError");
}
}, ne = class extends a {
constructor(e) {
}, F = class extends a {
constructor(o) {
super({

@@ -664,14 +381,14 @@ category: "CLI_INIT",

documentation: "https://storybook.js.org/docs/angular/faq#error-no-angularjson-file-found",
message: u.dedent`
An angular.json file was not found in the current working directory: ${e.path}
message: i.dedent`
An angular.json file was not found in the current working directory: ${o.path}
Storybook needs it to work properly, so please rerun the command at the root of your project, where the angular.json file is located.`
});
this.data = e;
this.data = o;
}
static {
n(this, "MissingAngularJsonError");
s(this, "MissingAngularJsonError");
}
}, se = class extends a {
}, $ = class extends a {
static {
n(this, "AngularLegacyBuildOptionsError");
s(this, "AngularLegacyBuildOptionsError");
}

@@ -686,3 +403,3 @@ constructor() {

],
message: u.dedent`
message: i.dedent`
Your Storybook startup script uses a solution that is not supported anymore.

@@ -694,4 +411,4 @@ You must use Angular builder to have an explicit configuration on the project used in angular.json.

}
}, ie = class extends a {
constructor(e) {
}, D = class extends a {
constructor(o) {
super({

@@ -701,4 +418,4 @@ category: "CORE-SERVER",

documentation: "",
message: u.dedent`
Storybook failed to load the following preset: ${e.presetName}.
message: i.dedent`
Storybook failed to load the following preset: ${o.presetName}.

@@ -709,12 +426,12 @@ Please check whether your setup is correct, the Storybook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.

${e.error.stack || e.error.message}`
${o.error.stack || o.error.message}`
});
this.data = e;
this.data = o;
}
static {
n(this, "CriticalPresetLoadError");
s(this, "CriticalPresetLoadError");
}
}, ae = class extends a {
}, U = class extends a {
static {
n(this, "MissingBuilderError");
s(this, "MissingBuilderError");
}

@@ -726,3 +443,3 @@ constructor() {

documentation: "https://github.com/storybookjs/storybook/issues/24071",
message: u.dedent`
message: i.dedent`
Storybook could not find a builder configuration for your project.

@@ -739,4 +456,4 @@ Builders normally come from a framework package e.g. '@storybook/react-vite', or from builder packages e.g. '@storybook/builder-vite'.

}
}, ce = class extends a {
constructor(e) {
}, G = class extends a {
constructor(o) {
super({

@@ -746,12 +463,12 @@ category: "FRAMEWORK_NEXTJS",

documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
message: u.dedent`
Failed to fetch \`${e.fontFamily}\` from Google Fonts with URL: \`${e.url}\``
message: i.dedent`
Failed to fetch \`${o.fontFamily}\` from Google Fonts with URL: \`${o.url}\``
});
this.data = e;
this.data = o;
}
static {
n(this, "GoogleFontsDownloadError");
s(this, "GoogleFontsDownloadError");
}
}, le = class extends a {
constructor(e) {
}, Y = class extends a {
constructor(o) {
super({

@@ -761,14 +478,14 @@ category: "FRAMEWORK_NEXTJS",

documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
message: u.dedent`
An error occurred when trying to load Google Fonts with URL \`${e.url}\`.
message: i.dedent`
An error occurred when trying to load Google Fonts with URL \`${o.url}\`.
${e.error instanceof Error ? e.error.message : ""}`
${o.error instanceof Error ? o.error.message : ""}`
});
this.data = e;
this.data = o;
}
static {
n(this, "GoogleFontsLoadingError");
s(this, "GoogleFontsLoadingError");
}
}, ue = class extends a {
constructor(e) {
}, q = class extends a {
constructor(o) {
super({

@@ -778,3 +495,3 @@ category: "CORE-SERVER",

documentation: "",
message: u.dedent`
message: i.dedent`
There was an exports mismatch error when trying to build Storybook.

@@ -791,30 +508,30 @@ Please check whether the versions of your Storybook packages match whenever possible, as this might be the cause.

});
this.data = e;
this.data = o;
}
static {
n(this, "NoMatchingExportError");
s(this, "NoMatchingExportError");
}
}, de = class extends a {
constructor(e) {
let r = [
`Storybook failed to load ${e.location}`,
}, H = class extends a {
constructor(o) {
let n = [
`Storybook failed to load ${o.location}`,
"",
"It looks like the file tried to load/import an ESM only module.",
`Support for this is currently limited in ${e.location}`,
`Support for this is currently limited in ${o.location}`,
"You can import ESM modules in your main file, but only as dynamic import.",
""
];
e.line && r.push(
m.white(
`In your ${m.yellow(e.location)} file, line ${m.bold.cyan(
e.num
o.line && n.push(
l.default.white(
`In your ${l.default.yellow(o.location)} file, line ${l.default.bold(
l.default.cyan(o.num)
)} threw an error:`
),
m.grey(e.line)
), r.push(
l.default.gray(o.line)
), n.push(
"",
m.white(
`Convert the static import to a dynamic import ${m.underline("where they are used")}.`
l.default.white(
`Convert the static import to a dynamic import ${l.default.underline("where they are used")}.`
),
m.white("Example:") + " " + m.gray("await import(<your ESM only module>);"),
l.default.white("Example:") + " " + l.default.gray("await import(<your ESM only module>);"),
""

@@ -826,13 +543,13 @@ );

documentation: "https://github.com/storybookjs/storybook/issues/23972#issuecomment-1948534058",
message: r.join(`
message: n.join(`
`)
});
this.data = e;
this.data = o;
}
static {
n(this, "MainFileESMOnlyImportError");
s(this, "MainFileESMOnlyImportError");
}
}, pe = class extends a {
constructor(e) {
let r = {
}, X = class extends a {
constructor(o) {
let n = {
storybook: {

@@ -847,22 +564,22 @@ helperMessage: "You can pass a --config-dir flag to tell Storybook, where your main.js file is located at.",

}
}, { documentation: s, helperMessage: c } = r[e.source || "storybook"];
}, { documentation: c, helperMessage: u } = n[o.source || "storybook"];
super({
category: "CORE-SERVER",
code: 6,
documentation: s,
message: u.dedent`
No configuration files have been found in your configDir: ${m.yellow(e.location)}.
documentation: c,
message: i.dedent`
No configuration files have been found in your configDir: ${l.default.yellow(o.location)}.
Storybook needs a "main.js" file, please add it.
${c}`
${u}`
});
this.data = e;
this.data = o;
}
static {
n(this, "MainFileMissingError");
s(this, "MainFileMissingError");
}
}, ge = class extends a {
constructor(e) {
let r = m.white(
(e.error.stack || e.error.message).replaceAll(process.cwd(), "")
}, z = class extends a {
constructor(o) {
let n = l.default.white(
(o.error.stack || o.error.message).replaceAll(process.cwd(), "")
);

@@ -872,15 +589,15 @@ super({

code: 7,
message: u.dedent`
Storybook couldn't evaluate your ${m.yellow(e.location)} file.
message: i.dedent`
Storybook couldn't evaluate your ${l.default.yellow(o.location)} file.
Original error:
${r}`
${n}`
});
this.data = e;
this.data = o;
}
static {
n(this, "MainFileEvaluationError");
s(this, "MainFileEvaluationError");
}
}, fe = class extends a {
constructor(e) {
}, J = class extends a {
constructor(o) {
super({

@@ -890,21 +607,21 @@ category: "CLI_INIT",

documentation: "",
message: u.dedent`
There was an error while using ${e.packageManager} to create a new ${e.projectType} project.
message: i.dedent`
There was an error while using ${o.packageManager} to create a new ${o.projectType} project.
${e.error instanceof Error ? e.error.message : ""}`
${o.error instanceof Error ? o.error.message : ""}`
});
this.data = e;
this.data = o;
}
static {
n(this, "GenerateNewProjectOnInitError");
s(this, "GenerateNewProjectOnInitError");
}
}, me = class extends a {
constructor(e) {
}, Q = class extends a {
constructor(o) {
super({
category: "CLI_UPGRADE",
code: 3,
message: u.dedent`
message: i.dedent`
You are trying to upgrade Storybook to a lower version than the version currently installed. This is not supported.
Storybook version ${e.beforeVersion} was detected in your project, but you are trying to "upgrade" to version ${e.currentVersion}.
Storybook version ${o.beforeVersion} was detected in your project, but you are trying to "upgrade" to version ${o.currentVersion}.

@@ -918,14 +635,14 @@ This usually happens when running the upgrade command without a version specifier, e.g. "npx storybook upgrade".

});
this.data = e;
this.data = o;
}
static {
n(this, "UpgradeStorybookToLowerVersionError");
s(this, "UpgradeStorybookToLowerVersionError");
}
}, he = class extends a {
constructor(e) {
}, Z = class extends a {
constructor(o) {
super({
category: "CLI_UPGRADE",
code: 4,
message: u.dedent`
You are upgrading Storybook to the same version that is currently installed in the project, version ${e.beforeVersion}.
message: i.dedent`
You are upgrading Storybook to the same version that is currently installed in the project, version ${o.beforeVersion}.

@@ -944,10 +661,10 @@ This usually happens when running the upgrade command without a version specifier, e.g. "npx storybook upgrade".

});
this.data = e;
this.data = o;
}
static {
n(this, "UpgradeStorybookToSameVersionError");
s(this, "UpgradeStorybookToSameVersionError");
}
}, ye = class extends a {
}, ee = class extends a {
static {
n(this, "UpgradeStorybookUnknownCurrentVersionError");
s(this, "UpgradeStorybookUnknownCurrentVersionError");
}

@@ -958,3 +675,3 @@ constructor() {

code: 5,
message: u.dedent`
message: i.dedent`
We couldn't determine the current version of Storybook in your project.

@@ -966,5 +683,5 @@

}
}, be = class extends a {
}, oe = class extends a {
static {
n(this, "UpgradeStorybookInWrongWorkingDirectory");
s(this, "UpgradeStorybookInWrongWorkingDirectory");
}

@@ -975,3 +692,3 @@ constructor() {

code: 6,
message: u.dedent`
message: i.dedent`
You are running the upgrade command in a CWD that does not contain Storybook dependencies.

@@ -982,5 +699,5 @@

}
}, Ee = class extends a {
}, te = class extends a {
static {
n(this, "NoStatsForViteDevError");
s(this, "NoStatsForViteDevError");
}

@@ -991,3 +708,3 @@ constructor() {

code: 1,
message: u.dedent`
message: i.dedent`
Unable to write preview stats as the Vite builder does not support stats in dev mode.

@@ -998,45 +715,45 @@

}
}, Re = class extends a {
constructor(e) {
}, re = class extends a {
constructor(o) {
super({
category: "CLI",
code: 1,
message: u.dedent`
Unable to find versions of "${e.packageName}" using ${e.packageManager}
${e.error && `Reason: ${e.error}`}`
message: i.dedent`
Unable to find versions of "${o.packageName}" using ${o.packageManager}
${o.error && `Reason: ${o.error}`}`
});
this.data = e;
this.data = o;
}
static {
n(this, "FindPackageVersionsError");
s(this, "FindPackageVersionsError");
}
};
export {
se as AngularLegacyBuildOptionsError,
Ue as Category,
Q as ConflictingStaticDirConfigError,
q as CouldNotEvaluateFrameworkError,
ie as CriticalPresetLoadError,
Re as FindPackageVersionsError,
fe as GenerateNewProjectOnInitError,
ce as GoogleFontsDownloadError,
le as GoogleFontsLoadingError,
J as InvalidFrameworkNameError,
Z as InvalidStoriesEntryError,
de as MainFileESMOnlyImportError,
ge as MainFileEvaluationError,
pe as MainFileMissingError,
ne as MissingAngularJsonError,
ae as MissingBuilderError,
z as MissingFrameworkFieldError,
ue as NoMatchingExportError,
Ee as NoStatsForViteDevError,
X as NxProjectDetectedError,
be as UpgradeStorybookInWrongWorkingDirectory,
me as UpgradeStorybookToLowerVersionError,
he as UpgradeStorybookToSameVersionError,
ye as UpgradeStorybookUnknownCurrentVersionError,
re as WebpackCompilationError,
oe as WebpackInvocationError,
ee as WebpackMissingStatsError
$ as AngularLegacyBuildOptionsError,
de as Category,
L as ConflictingStaticDirConfigError,
v as CouldNotEvaluateFrameworkError,
D as CriticalPresetLoadError,
re as FindPackageVersionsError,
J as GenerateNewProjectOnInitError,
G as GoogleFontsDownloadError,
Y as GoogleFontsLoadingError,
K as InvalidFrameworkNameError,
B as InvalidStoriesEntryError,
H as MainFileESMOnlyImportError,
z as MainFileEvaluationError,
X as MainFileMissingError,
F as MissingAngularJsonError,
U as MissingBuilderError,
W as MissingFrameworkFieldError,
q as NoMatchingExportError,
te as NoStatsForViteDevError,
T as NxProjectDetectedError,
oe as UpgradeStorybookInWrongWorkingDirectory,
Q as UpgradeStorybookToLowerVersionError,
Z as UpgradeStorybookToSameVersionError,
ee as UpgradeStorybookUnknownCurrentVersionError,
j as WebpackCompilationError,
N as WebpackInvocationError,
P as WebpackMissingStatsError
};
{
"name": "@storybook/core",
"version": "0.0.0-pr-29223-sha-d3f5ad98",
"version": "0.0.0-pr-29254-sha-27a5decc",
"description": "Storybook framework-agnostic API",

@@ -284,3 +284,3 @@ "keywords": [

"browser-assert": "^1.2.1",
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0",
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0",
"esbuild-register": "^3.5.0",

@@ -333,3 +333,2 @@ "express": "^4.19.2",

"@types/prompts": "^2.0.9",
"@types/qs": "^6",
"@types/react-syntax-highlighter": "11.0.5",

@@ -349,3 +348,2 @@ "@types/react-transition-group": "^4",

"chai": "^4.4.1",
"chalk": "^5.3.0",
"cli-table3": "^0.6.1",

@@ -381,3 +379,2 @@ "commander": "^12.1.0",

"globby": "^14.0.1",
"handlebars": "^4.7.7",
"jiti": "^1.21.6",

@@ -393,3 +390,5 @@ "js-yaml": "^4.1.0",

"open": "^8.4.0",
"picocolors": "^1.1.0",
"picomatch": "^2.3.0",
"picoquery": "^1.4.0",
"polished": "^4.2.2",

@@ -399,3 +398,2 @@ "prettier": "^3.2.5",

"prompts": "^2.4.0",
"qs": "^6.10.0",
"react": "^18.2.0",

@@ -402,0 +400,0 @@ "react-dom": "^18.2.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc