Socket
Socket
Sign inDemoInstall

@storybook/core

Package Overview
Dependencies
Maintainers
11
Versions
1201
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-28483-sha-c6902abe to 0.0.0-pr-28483-sha-d7c2f6b8

19

dist/channels/index.js

@@ -172,8 +172,7 @@ var Qt = Object.create;

nerateRandomId"), lt = class lt {
isAsync;
sender = le();
events = {};
data = {};
transports = [];
constructor(e = {}) {
this.sender = le();
this.events = {};
this.data = {};
this.transports = [];
this.isAsync = e.async || !1, se(e) ? (this.transports = e.transports || [], this.transports.forEach((r) => {

@@ -1271,2 +1270,3 @@ r.setHandler((n) => this.handleEvent(n));

this.config = e;
this.connected = !1;
if (this.buffer = [], typeof b?.addEventListener == "function" && b.addEventListener("message", this.handleEvent.bind(this), !1), e.page !==

@@ -1276,5 +1276,2 @@ "manager" && e.page !== "preview")

}
buffer;
handler;
connected = !1;
setHandler(e) {

@@ -1400,7 +1397,5 @@ this.handler = (...r) => {

var { WebSocket: eo } = b, bt = class bt {
buffer = [];
handler;
socket;
isReady = !1;
constructor({ url: e, onError: r, page: n }) {
this.buffer = [];
this.isReady = !1;
this.socket = new eo(e), this.socket.onopen = () => {

@@ -1407,0 +1402,0 @@ this.isReady = !0, this.flush();

@@ -138,6 +138,6 @@ import { StrictArgTypes, Renderer, StoryContextForEnhancers, Options } from '@storybook/core/types';

declare const ADDON_ID = "@storybook/core/docs";
declare const PANEL_ID = "@storybook/core/docs/panel";
declare const ADDON_ID = "storybook/docs";
declare const PANEL_ID = "storybook/docs/panel";
declare const PARAM_KEY = "docs";
declare const SNIPPET_RENDERED = "@storybook/core/docs/snippet-rendered";
declare const SNIPPET_RENDERED = "storybook/docs/snippet-rendered";
declare enum SourceType {

@@ -144,0 +144,0 @@ /**

@@ -1,3 +0,3 @@

var R = Object.defineProperty;
var o = (A, e) => R(A, "name", { value: e, configurable: !0 });
var g = Object.defineProperty;
var t = (A, o) => g(A, "name", { value: o, configurable: !0 });

@@ -7,32 +7,21 @@ // src/storybook-error.ts

code: A,
category: e
category: o
}) {
let t = String(A).padStart(4, "0");
return `SB_${e}_${t}`;
let e = String(A).padStart(4, "0");
return `SB_${o}_${e}`;
}
o(E, "parseErrorCode");
t(E, "parseErrorCode");
var c = class c extends Error {
/**
* Category of the error. Used to classify the type of error, e.g., 'PREVIEW_API'.
*/
category;
/**
* Code representing the error. Used to uniquely identify the error, e.g., 1.
*/
code;
/**
* Data associated with the error. Used to provide additional information in the error message or to be passed to telemetry.
*/
data = {};
/**
* Specifies the documentation for the error.
* - If `true`, links to a documentation page on the Storybook website (make sure it exists before enabling) – This is not implemented yet.
* - If a string, uses the provided URL for documentation (external or FAQ links).
* - If `false` (default), no documentation link is added.
*/
documentation;
/**
* Flag used to easily determine if the error originates from Storybook.
*/
fromStorybook = !0;
constructor(e) {
super(c.getFullMessage(e));
/**
* Data associated with the error. Used to provide additional information in the error message or to be passed to telemetry.
*/
this.data = {};
/**
* Flag used to easily determine if the error originates from Storybook.
*/
this.fromStorybook = !0;
this.category = e.category, this.documentation = e.documentation ?? !1, this.code = e.code;
}
get fullErrorCode() {

@@ -48,5 +37,2 @@ return E({ code: this.code, category: this.category });

}
constructor(e) {
super(c.getFullMessage(e)), this.category = e.category, this.documentation = e.documentation ?? !1, this.code = e.code;
}
/**

@@ -57,11 +43,11 @@ * Generates the error message along with additional documentation link (if applicable).

documentation: e,
code: t,
category: u,
message: d
code: u,
category: d,
message: G
}) {
let s;
return e === !0 ? s = `https://storybook.js.org/error/${E({ code: t, category: u })}` : typeof e == "string" ? s = e : Array.isArray(e) &&
return e === !0 ? s = `https://storybook.js.org/error/${E({ code: u, category: d })}` : typeof e == "string" ? s = e : Array.isArray(e) &&
(s = `
${e.map((G) => ` - ${G}`).join(`
`)}`), `${d}${s != null ? `
${e.map((R) => ` - ${R}`).join(`
`)}`), `${G}${s != null ? `

@@ -72,9 +58,9 @@ More info: ${s}

};
o(c, "StorybookError");
t(c, "StorybookError");
var n = c;
// src/manager-errors.ts
var g = /* @__PURE__ */ ((r) => (r.MANAGER_UNCAUGHT = "MANAGER_UNCAUGHT", r.MANAGER_UI = "MANAGER_UI", r.MANAGER_API = "MANAGER_API", r.MANAGER_CLIENT_LOGGER =
var M = /* @__PURE__ */ ((r) => (r.MANAGER_UNCAUGHT = "MANAGER_UNCAUGHT", r.MANAGER_UI = "MANAGER_UI", r.MANAGER_API = "MANAGER_API", r.MANAGER_CLIENT_LOGGER =
"MANAGER_CLIENT-LOGGER", r.MANAGER_CHANNELS = "MANAGER_CHANNELS", r.MANAGER_CORE_EVENTS = "MANAGER_CORE-EVENTS", r.MANAGER_ROUTER = "MANAGER\
_ROUTER", r.MANAGER_THEMING = "MANAGER_THEMING", r))(g || {}), i = class i extends n {
_ROUTER", r.MANAGER_THEMING = "MANAGER_THEMING", r))(M || {}), i = class i extends n {
constructor() {

@@ -88,20 +74,20 @@ super({

};
o(i, "ProviderDoesNotExtendBaseProviderError");
t(i, "ProviderDoesNotExtendBaseProviderError");
var l = i, a = class a extends n {
constructor(t) {
constructor(e) {
super({
category: "MANAGER_UNCAUGHT",
code: 1,
message: t.error.message
message: e.error.message
});
this.data = t;
this.stack = t.error.stack;
this.data = e;
this.stack = e.error.stack;
}
};
o(a, "UncaughtManagerError");
t(a, "UncaughtManagerError");
var N = a;
export {
g as Category,
M as Category,
l as ProviderDoesNotExtendBaseProviderError,
N as UncaughtManagerError
};

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

interface IStringifyOptions {
type BooleanOptional = boolean | undefined;
interface IStringifyBaseOptions {
delimiter?: string | undefined;

@@ -911,3 +913,3 @@ strictNullHandling?: boolean | undefined;

indices?: boolean | undefined;
sort?: ((a: any, b: any) => number) | undefined;
sort?: ((a: string, b: string) => number) | undefined;
serializeDate?: ((d: Date) => string) | undefined;

@@ -917,8 +919,16 @@ format?: "RFC1738" | "RFC3986" | undefined;

addQueryPrefix?: boolean | undefined;
allowDots?: boolean | undefined;
charset?: "utf-8" | "iso-8859-1" | undefined;
charsetSentinel?: boolean | undefined;
allowEmptyArrays?: boolean | undefined;
}
interface IParseOptions {
type IStringifyDynamicOptions<AllowDots extends BooleanOptional> = AllowDots extends true
? { allowDots?: AllowDots; encodeDotInKeys?: boolean }
: { allowDots?: boolean; encodeDotInKeys?: false };
type IStringifyOptions<AllowDots extends BooleanOptional = undefined> =
& IStringifyBaseOptions
& IStringifyDynamicOptions<AllowDots>;
interface IParseBaseOptions {
comma?: boolean | undefined;

@@ -932,5 +942,5 @@ delimiter?: string | RegExp | undefined;

parseArrays?: boolean | undefined;
allowDots?: boolean | undefined;
plainObjects?: boolean | undefined;
allowPrototypes?: boolean | undefined;
allowSparse?: boolean | undefined;
parameterLimit?: number | undefined;

@@ -942,4 +952,14 @@ strictNullHandling?: boolean | undefined;

interpretNumericEntities?: boolean | undefined;
allowEmptyArrays?: boolean | undefined;
duplicates?: "combine" | "first" | "last" | undefined;
}
type IParseDynamicOptions<AllowDots extends BooleanOptional> = AllowDots extends true
? { allowDots?: AllowDots; decodeDotInKeys?: boolean }
: { allowDots?: boolean; decodeDotInKeys?: false };
type IParseOptions<AllowDots extends BooleanOptional = undefined> =
& IParseBaseOptions
& IParseDynamicOptions<AllowDots>;
interface ParsedQs {

@@ -949,5 +969,8 @@ [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 };
function stringify(obj: any, options?: IStringifyOptions<BooleanOptional>): string;
function parse(str: string, options?: IParseOptions<BooleanOptional> & { decoder?: never | undefined }): ParsedQs;
function parse(
str: string | Record<string, string>,
options?: IParseOptions<BooleanOptional>,
): { [key: string]: unknown };
}

@@ -954,0 +977,0 @@

var oe = Object.defineProperty;
var o = (c, t) => oe(c, "name", { value: t, configurable: !0 });
var t = (u, n) => oe(u, "name", { value: n, configurable: !0 });
// ../node_modules/ts-dedent/esm/index.js
function r(c) {
for (var t = [], e = 1; e < arguments.length; e++)
t[e - 1] = arguments[e];
var a = Array.from(typeof c == "string" ? [c] : c);
function r(u) {
for (var n = [], e = 1; e < arguments.length; e++)
n[e - 1] = arguments[e];
var a = Array.from(typeof u == "string" ? [u] : u);
a[a.length - 1] = a[a.length - 1].replace(/\r?\n([\t ]*)$/, "");
var g = a.reduce(function(i, m) {
var p = m.match(/\n([\t ]+|(?!\s).)/g);
return p ? i.concat(p.map(function(h) {
var p = a.reduce(function(i, h) {
var y = h.match(/\n([\t ]+|(?!\s).)/g);
return y ? i.concat(y.map(function(E) {
var d, l;
return (l = (d = h.match(/[\t ]/g)) === null || d === void 0 ? void 0 : d.length) !== null && l !== void 0 ? l : 0;
return (l = (d = E.match(/[\t ]/g)) === null || d === void 0 ? void 0 : d.length) !== null && l !== void 0 ? l : 0;
})) : i;
}, []);
if (g.length) {
var u = new RegExp(`
[ ]{` + Math.min.apply(Math, g) + "}", "g");
if (p.length) {
var m = new RegExp(`
[ ]{` + Math.min.apply(Math, p) + "}", "g");
a = a.map(function(i) {
return i.replace(u, `
return i.replace(m, `
`);

@@ -26,48 +26,37 @@ });

a[0] = a[0].replace(/^\r?\n/, "");
var y = a[0];
return t.forEach(function(i, m) {
var p = y.match(/(?:^|\n)( *)$/), h = p ? p[1] : "", d = i;
var c = a[0];
return n.forEach(function(i, h) {
var y = c.match(/(?:^|\n)( *)$/), E = y ? y[1] : "", d = i;
typeof i == "string" && i.includes(`
`) && (d = String(i).split(`
`).map(function(l, te) {
return te === 0 ? l : "" + h + l;
return te === 0 ? l : "" + E + l;
}).join(`
`)), y += d + a[m + 1];
}), y;
`)), c += d + a[h + 1];
}), c;
}
o(r, "dedent");
t(r, "dedent");
// src/storybook-error.ts
function O({
code: c,
category: t
code: u,
category: n
}) {
let e = String(c).padStart(4, "0");
return `SB_${t}_${e}`;
let e = String(u).padStart(4, "0");
return `SB_${n}_${e}`;
}
o(O, "parseErrorCode");
var E = class E extends Error {
/**
* Category of the error. Used to classify the type of error, e.g., 'PREVIEW_API'.
*/
category;
/**
* Code representing the error. Used to uniquely identify the error, e.g., 1.
*/
code;
/**
* Data associated with the error. Used to provide additional information in the error message or to be passed to telemetry.
*/
data = {};
/**
* Specifies the documentation for the error.
* - If `true`, links to a documentation page on the Storybook website (make sure it exists before enabling) – This is not implemented yet.
* - If a string, uses the provided URL for documentation (external or FAQ links).
* - If `false` (default), no documentation link is added.
*/
documentation;
/**
* Flag used to easily determine if the error originates from Storybook.
*/
fromStorybook = !0;
t(O, "parseErrorCode");
var g = class g extends Error {
constructor(e) {
super(g.getFullMessage(e));
/**
* Data associated with the error. Used to provide additional information in the error message or to be passed to telemetry.
*/
this.data = {};
/**
* Flag used to easily determine if the error originates from Storybook.
*/
this.fromStorybook = !0;
this.category = e.category, this.documentation = e.documentation ?? !1, this.code = e.code;
}
get fullErrorCode() {

@@ -80,8 +69,5 @@ return O({ code: this.code, category: this.category });

get name() {
let t = this.constructor.name;
return `${this.fullErrorCode} (${t})`;
let e = this.constructor.name;
return `${this.fullErrorCode} (${e})`;
}
constructor(t) {
super(E.getFullMessage(t)), this.category = t.category, this.documentation = t.documentation ?? !1, this.code = t.code;
}
/**

@@ -91,27 +77,27 @@ * Generates the error message along with additional documentation link (if applicable).

static getFullMessage({
documentation: t,
code: e,
category: a,
message: g
documentation: e,
code: a,
category: p,
message: m
}) {
let u;
return t === !0 ? u = `https://storybook.js.org/error/${O({ code: e, category: a })}` : typeof t == "string" ? u = t : Array.isArray(t) &&
(u = `
${t.map((y) => ` - ${y}`).join(`
`)}`), `${g}${u != null ? `
let c;
return e === !0 ? c = `https://storybook.js.org/error/${O({ code: a, category: p })}` : typeof e == "string" ? c = e : Array.isArray(e) &&
(c = `
${e.map((i) => ` - ${i}`).join(`
`)}`), `${m}${c != null ? `
More info: ${u}
More info: ${c}
` : ""}`;
}
};
o(E, "StorybookError");
var s = E;
t(g, "StorybookError");
var o = g;
// src/preview-errors.ts
var se = /* @__PURE__ */ ((n) => (n.BLOCKS = "BLOCKS", n.DOCS_TOOLS = "DOCS-TOOLS", n.PREVIEW_CLIENT_LOGGER = "PREVIEW_CLIENT-LOGGER", n.PREVIEW_CHANNELS =
"PREVIEW_CHANNELS", n.PREVIEW_CORE_EVENTS = "PREVIEW_CORE-EVENTS", n.PREVIEW_INSTRUMENTER = "PREVIEW_INSTRUMENTER", n.PREVIEW_API = "PREVIEW\
_API", n.PREVIEW_REACT_DOM_SHIM = "PREVIEW_REACT-DOM-SHIM", n.PREVIEW_ROUTER = "PREVIEW_ROUTER", n.PREVIEW_THEMING = "PREVIEW_THEMING", n.RENDERER_HTML =
"RENDERER_HTML", n.RENDERER_PREACT = "RENDERER_PREACT", n.RENDERER_REACT = "RENDERER_REACT", n.RENDERER_SERVER = "RENDERER_SERVER", n.RENDERER_SVELTE =
"RENDERER_SVELTE", n.RENDERER_VUE = "RENDERER_VUE", n.RENDERER_VUE3 = "RENDERER_VUE3", n.RENDERER_WEB_COMPONENTS = "RENDERER_WEB-COMPONENTS",
n.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", n))(se || {}), R = class R extends s {
var se = /* @__PURE__ */ ((s) => (s.BLOCKS = "BLOCKS", s.DOCS_TOOLS = "DOCS-TOOLS", s.PREVIEW_CLIENT_LOGGER = "PREVIEW_CLIENT-LOGGER", s.PREVIEW_CHANNELS =
"PREVIEW_CHANNELS", s.PREVIEW_CORE_EVENTS = "PREVIEW_CORE-EVENTS", s.PREVIEW_INSTRUMENTER = "PREVIEW_INSTRUMENTER", s.PREVIEW_API = "PREVIEW\
_API", s.PREVIEW_REACT_DOM_SHIM = "PREVIEW_REACT-DOM-SHIM", s.PREVIEW_ROUTER = "PREVIEW_ROUTER", s.PREVIEW_THEMING = "PREVIEW_THEMING", s.RENDERER_HTML =
"RENDERER_HTML", s.RENDERER_PREACT = "RENDERER_PREACT", s.RENDERER_REACT = "RENDERER_REACT", s.RENDERER_SERVER = "RENDERER_SERVER", s.RENDERER_SVELTE =
"RENDERER_SVELTE", s.RENDERER_VUE = "RENDERER_VUE", s.RENDERER_VUE3 = "RENDERER_VUE3", s.RENDERER_WEB_COMPONENTS = "RENDERER_WEB-COMPONENTS",
s.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", s))(se || {}), f = class f extends o {
constructor(e) {

@@ -132,4 +118,4 @@ super({

};
o(R, "MissingStoryAfterHmrError");
var D = R, f = class f extends s {
t(f, "MissingStoryAfterHmrError");
var D = f, R = class R extends o {
constructor(e) {

@@ -156,4 +142,4 @@ super({

};
o(f, "ImplicitActionsDuringRendering");
var j = f, b = class b extends s {
t(R, "ImplicitActionsDuringRendering");
var j = R, b = class b extends o {
constructor() {

@@ -170,4 +156,4 @@ super({

};
o(b, "CalledExtractOnStoreError");
var L = b, I = class I extends s {
t(b, "CalledExtractOnStoreError");
var L = b, I = class I extends o {
constructor() {

@@ -185,4 +171,4 @@ super({

};
o(I, "MissingRenderToCanvasError");
var F = I, P = class P extends s {
t(I, "MissingRenderToCanvasError");
var F = I, P = class P extends o {
constructor(e) {

@@ -204,4 +190,4 @@ super({

};
o(P, "CalledPreviewMethodBeforeInitializationError");
var G = P, x = class x extends s {
t(P, "CalledPreviewMethodBeforeInitializationError");
var G = P, x = class x extends o {
constructor(e) {

@@ -225,4 +211,4 @@ super({

};
o(x, "StoryIndexFetchError");
var H = x, S = class S extends s {
t(x, "StoryIndexFetchError");
var Y = x, S = class S extends o {
constructor(e) {

@@ -242,4 +228,4 @@ super({

};
o(S, "MdxFileWithNoCsfReferencesError");
var Y = S, T = class T extends s {
t(S, "MdxFileWithNoCsfReferencesError");
var H = S, w = class w extends o {
constructor() {

@@ -257,4 +243,4 @@ super({

};
o(T, "EmptyIndexError");
var K = T, _ = class _ extends s {
t(w, "EmptyIndexError");
var K = w, k = class k extends o {
constructor(e) {

@@ -274,4 +260,4 @@ super({

};
o(_, "NoStoryMatchError");
var M = _, V = class V extends s {
t(k, "NoStoryMatchError");
var M = k, T = class T extends o {
constructor(e) {

@@ -294,4 +280,4 @@ super({

};
o(V, "MissingStoryFromCsfFileError");
var U = V, k = class k extends s {
t(T, "MissingStoryFromCsfFileError");
var U = T, V = class V extends o {
constructor() {

@@ -309,8 +295,5 @@ super({

};
o(k, "StoryStoreAccessedBeforeInitializationError");
var X = k, v = class v extends s {
t(V, "StoryStoreAccessedBeforeInitializationError");
var X = V, _ = class _ extends o {
constructor(e) {
let a = /function\s*\*|regeneratorRuntime|asyncToGenerator|_ref|param|_0|__async/.test(
e.playFunction
);
super({

@@ -321,10 +304,15 @@ category: "PREVIEW_API",

To use mount in the play function, you must use object destructuring, e.g. play: ({ mount }) => {}.
${a ? r`
It seems that your builder is configured to transpile destructuring.
To use the mount prop of the story context, you must configure your builder to transpile to no earlier than ES2017.
` : ""}
More info: https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-each-test
To use mount in the play function, you must satisfy the following two requirements:
1. You *must* destructure the mount property from the \`context\` (the argument passed to your play function).
This makes sure that Storybook does not start rendering the story before the play function begins.
2. Your Storybook framework or builder must be configured to transpile to ES2017 or newer.
This is because destructuring statements and async/await usages are otherwise transpiled away,
which prevents Storybook from recognizing your usage of \`mount\`.
Note that Angular is not supported. As async/await is transpiled to support the zone.js polyfill.
More info: https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-the-component-gets-rendered
Received the following play function:

@@ -336,4 +324,4 @@ ${e.playFunction}`

};
o(v, "MountMustBeDestructuredError");
var J = v, w = class w extends s {
t(_, "MountMustBeDestructuredError");
var J = _, v = class v extends o {
constructor() {

@@ -373,4 +361,4 @@ super({

};
o(w, "TestingLibraryMustBeConfiguredError");
var q = w, W = class W extends s {
t(v, "TestingLibraryMustBeConfiguredError");
var q = v, W = class W extends o {
constructor(e) {

@@ -387,4 +375,4 @@ super({

};
o(W, "NoRenderFunctionError");
var Q = W, N = class N extends s {
t(W, "NoRenderFunctionError");
var z = W, A = class A extends o {
constructor() {

@@ -413,4 +401,4 @@ super({

};
o(N, "NoStoryMountedError");
var Z = N, A = class A extends s {
t(A, "NoStoryMountedError");
var Q = A, N = class N extends o {
constructor() {

@@ -429,4 +417,4 @@ super({

};
o(A, "NextJsSharpError");
var z = A, $ = class $ extends s {
t(N, "NextJsSharpError");
var Z = N, $ = class $ extends o {
constructor(e) {

@@ -443,4 +431,4 @@ super({

};
o($, "NextjsRouterMocksNotAvailable");
var B = $, C = class C extends s {
t($, "NextjsRouterMocksNotAvailable");
var B = $, C = class C extends o {
constructor(e) {

@@ -464,3 +452,3 @@ super({

};
o(C, "UnknownArgTypesError");
t(C, "UnknownArgTypesError");
var ee = C;

@@ -473,3 +461,3 @@ export {

j as ImplicitActionsDuringRendering,
Y as MdxFileWithNoCsfReferencesError,
H as MdxFileWithNoCsfReferencesError,
F as MissingRenderToCanvasError,

@@ -479,8 +467,8 @@ D as MissingStoryAfterHmrError,

J as MountMustBeDestructuredError,
z as NextJsSharpError,
Z as NextJsSharpError,
B as NextjsRouterMocksNotAvailable,
Q as NoRenderFunctionError,
z as NoRenderFunctionError,
M as NoStoryMatchError,
Z as NoStoryMountedError,
H as StoryIndexFetchError,
Q as NoStoryMountedError,
Y as StoryIndexFetchError,
X as StoryStoreAccessedBeforeInitializationError,

@@ -487,0 +475,0 @@ q as TestingLibraryMustBeConfiguredError,

@@ -12,11 +12,11 @@ import ESM_COMPAT_Module from "node:module";

var Te = Object.getPrototypeOf, xe = Object.prototype.hasOwnProperty;
var n = (t, e) => I(t, "name", { value: e, configurable: !0 });
var _e = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
var Me = (t, e, o, r) => {
if (e && typeof e == "object" || typeof e == "function")
for (let s of Ce(e))
!xe.call(t, s) && s !== o && I(t, s, { get: () => e[s], enumerable: !(r = ke(e, s)) || r.enumerable });
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 });
return t;
};
var Ie = (t, e, o) => (o = t != null ? Ae(Te(t)) : {}, Me(
var Ie = (t, o, e) => (e = t != null ? Ae(Te(t)) : {}, Me(
// If the importer is in node compatibility mode or this is not an ESM

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

// "default" to the CommonJS "module.exports" for node compatibility.
e || !t || !t.__esModule ? I(o, "default", { value: t, enumerable: !0 }) : o,
o || !t || !t.__esModule ? I(e, "default", { value: t, enumerable: !0 }) : e,
t

@@ -37,4 +37,4 @@ ));

function U(t) {
for (var e = [], o = 1; o < arguments.length; o++)
e[o - 1] = arguments[o];
for (var o = [], e = 1; e < arguments.length; e++)
o[e - 1] = arguments[e];
var r = Array.from(typeof t == "string" ? [t] : t);

@@ -50,6 +50,6 @@ r[r.length - 1] = r[r.length - 1].replace(/\r?\n([\t ]*)$/, "");

if (s.length) {
var a = new RegExp(`
var l = new RegExp(`
[ ]{` + Math.min.apply(Math, s) + "}", "g");
r = r.map(function(g) {
return g.replace(a, `
return g.replace(l, `
`);

@@ -59,5 +59,5 @@ });

r[0] = r[0].replace(/^\r?\n/, "");
var d = r[0];
return e.forEach(function(g, _) {
var O = d.match(/(?:^|\n)( *)$/), M = O ? O[1] : "", y = g;
var c = r[0];
return o.forEach(function(g, _) {
var O = c.match(/(?:^|\n)( *)$/), M = O ? O[1] : "", y = g;
typeof g == "string" && g.includes(`

@@ -68,4 +68,4 @@ `) && (y = String(g).split(`

}).join(`
`)), d += y + r[_ + 1];
}), d;
`)), c += y + r[_ + 1];
}), c;
}

@@ -78,4 +78,4 @@ n(U, "dedent");

// node_modules/chalk/source/vendor/ansi-styles/index.js
var L = /* @__PURE__ */ n((t = 0) => (e) => `\x1B[${e + t}m`, "wrapAnsi16"), B = /* @__PURE__ */ n((t = 0) => (e) => `\x1B[${38 + t};5;${e}m`,
"wrapAnsi256"), W = /* @__PURE__ */ n((t = 0) => (e, o, r) => `\x1B[${38 + t};2;${e};${o};${r}m`, "wrapAnsi16m"), u = {
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: {

@@ -139,25 +139,25 @@ reset: [0, 0],

}
}, He = Object.keys(u.modifier), Se = Object.keys(u.color), we = Object.keys(u.bgColor), Xe = [...Se, ...we];
}, 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 [e, o] of Object.entries(u)) {
for (let [r, s] of Object.entries(o))
u[r] = {
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`
}, o[r] = u[r], t.set(s[0], s[1]);
Object.defineProperty(u, e, {
value: o,
}, e[r] = d[r], t.set(s[0], s[1]);
Object.defineProperty(d, o, {
value: e,
enumerable: !1
});
}
return Object.defineProperty(u, "codes", {
return Object.defineProperty(d, "codes", {
value: t,
enumerable: !1
}), u.color.close = "\x1B[39m", u.bgColor.close = "\x1B[49m", u.color.ansi = L(), u.color.ansi256 = B(), u.color.ansi16m = W(), u.bgColor.
ansi = L(10), u.bgColor.ansi256 = B(10), u.bgColor.ansi16m = W(10), Object.defineProperties(u, {
}), 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(e, o, r) {
return e === o && o === r ? e < 8 ? 16 : e > 248 ? 231 : Math.round((e - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(e / 255 * 5) + 6 *
Math.round(o / 255 * 5) + Math.round(r / 255 * 5);
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);
},

@@ -167,8 +167,8 @@ enumerable: !1

hexToRgb: {
value(e) {
let o = /[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));
if (!o)
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] = o;
r.length === 3 && (r = [...r].map((a) => a + a).join(""));
let [r] = e;
r.length === 3 && (r = [...r].map((l) => l + l).join(""));
let s = Number.parseInt(r, 16);

@@ -186,24 +186,24 @@ return [

hexToAnsi256: {
value: /* @__PURE__ */ n((e) => u.rgbToAnsi256(...u.hexToRgb(e)), "value"),
value: /* @__PURE__ */ n((o) => d.rgbToAnsi256(...d.hexToRgb(o)), "value"),
enumerable: !1
},
ansi256ToAnsi: {
value(e) {
if (e < 8)
return 30 + e;
if (e < 16)
return 90 + (e - 8);
let o, r, s;
if (e >= 232)
o = ((e - 232) * 10 + 8) / 255, r = o, s = o;
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 {
e -= 16;
let g = e % 36;
o = Math.floor(e / 36) / 5, r = Math.floor(g / 6) / 5, s = g % 6 / 5;
o -= 16;
let g = o % 36;
e = Math.floor(o / 36) / 5, r = Math.floor(g / 6) / 5, s = g % 6 / 5;
}
let a = Math.max(o, r, s) * 2;
if (a === 0)
let l = Math.max(e, r, s) * 2;
if (l === 0)
return 30;
let d = 30 + (Math.round(s) << 2 | Math.round(r) << 1 | Math.round(o));
return a === 2 && (d += 60), d;
let c = 30 + (Math.round(s) << 2 | Math.round(r) << 1 | Math.round(e));
return l === 2 && (c += 60), c;
},

@@ -213,10 +213,10 @@ enumerable: !1

rgbToAnsi: {
value: /* @__PURE__ */ n((e, o, r) => u.ansi256ToAnsi(u.rgbToAnsi256(e, o, r)), "value"),
value: /* @__PURE__ */ n((o, e, r) => d.ansi256ToAnsi(d.rgbToAnsi256(o, e, r)), "value"),
enumerable: !1
},
hexToAnsi: {
value: /* @__PURE__ */ n((e) => u.ansi256ToAnsi(u.hexToAnsi256(e)), "value"),
value: /* @__PURE__ */ n((o) => d.ansi256ToAnsi(d.hexToAnsi256(o)), "value"),
enumerable: !1
}
}), u;
}), d;
}

@@ -230,4 +230,4 @@ n(ve, "assembleStyles");

import F from "node:tty";
function f(t, e = globalThis.Deno ? globalThis.Deno.args : S.argv) {
let o = t.startsWith("-") ? "" : t.length === 1 ? "-" : "--", r = e.indexOf(o + t), s = e.indexOf("--");
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);

@@ -254,9 +254,9 @@ }

n(We, "translateLevel");
function Fe(t, { streamIsTTY: e, sniffFlags: o = !0 } = {}) {
function Fe(t, { streamIsTTY: o, sniffFlags: e = !0 } = {}) {
let r = Be();
r !== void 0 && (T = r);
let s = o ? T : r;
let s = e ? T : r;
if (s === 0)
return 0;
if (o) {
if (e) {
if (f("color=16m") || f("color=full") || f("color=truecolor"))

@@ -269,14 +269,14 @@ return 3;

return 1;
if (t && !e && s === void 0)
if (t && !o && s === void 0)
return 0;
let a = s || 0;
let l = s || 0;
if (p.TERM === "dumb")
return a;
return l;
if (S.platform === "win32") {
let d = Le.release().split(".");
return Number(d[0]) >= 10 && Number(d[2]) >= 10586 ? Number(d[2]) >= 14931 ? 3 : 2 : 1;
let c = Le.release().split(".");
return Number(c[0]) >= 10 && Number(c[2]) >= 10586 ? Number(c[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((d) => d in
p) || p.CI_NAME === "codeship" ? 1 : a;
return "GITHUB_ACTIONS" in p || "GITEA_ACTIONS" in p ? 3 : ["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((c) => c in
p) || p.CI_NAME === "codeship" ? 1 : l;
if ("TEAMCITY_VERSION" in p)

@@ -287,6 +287,6 @@ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(p.TEAMCITY_VERSION) ? 1 : 0;

if ("TERM_PROGRAM" in p) {
let d = Number.parseInt((p.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
let c = Number.parseInt((p.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
switch (p.TERM_PROGRAM) {
case "iTerm.app":
return d >= 3 ? 3 : 2;
return c >= 3 ? 3 : 2;
case "Apple_Terminal":

@@ -297,11 +297,11 @@ 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 : a;
1 : l;
}
n(Fe, "_supportsColor");
function K(t, e = {}) {
let o = Fe(t, {
function K(t, o = {}) {
let e = Fe(t, {
streamIsTTY: t && t.isTTY,
...e
...o
});
return We(o);
return We(e);
}

@@ -315,23 +315,23 @@ n(K, "createSupportsColor");

// node_modules/chalk/source/utilities.js
function j(t, e, o) {
let r = t.indexOf(e);
function j(t, o, e) {
let r = t.indexOf(o);
if (r === -1)
return t;
let s = e.length, a = 0, d = "";
let s = o.length, l = 0, c = "";
do
d += t.slice(a, r) + e + o, a = r + s, r = t.indexOf(e, a);
c += t.slice(l, r) + o + e, l = r + s, r = t.indexOf(o, l);
while (r !== -1);
return d += t.slice(a), d;
return c += t.slice(l), c;
}
n(j, "stringReplaceAll");
function V(t, e, o, r) {
let s = 0, a = "";
function V(t, o, e, r) {
let s = 0, l = "";
do {
let d = t[r - 1] === "\r";
a += t.slice(s, d ? r - 1 : r) + e + (d ? `\r
let c = t[r - 1] === "\r";
l += t.slice(s, c ? r - 1 : r) + o + (c ? `\r
` : `
`) + o, s = r + 1, r = t.indexOf(`
`) + e, s = r + 1, r = t.indexOf(`
`, s);
} while (r !== -1);
return a += t.slice(s), a;
return l += t.slice(s), l;
}

@@ -346,11 +346,11 @@ n(V, "stringEncaseCRLFWithFirstIndex");

"ansi16m"
], R = /* @__PURE__ */ Object.create(null), Pe = /* @__PURE__ */ n((t, e = {}) => {
if (e.level && !(Number.isInteger(e.level) && e.level >= 0 && e.level <= 3))
], 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 o = $ ? $.level : 0;
t.level = e.level === void 0 ? o : e.level;
let e = $ ? $.level : 0;
t.level = o.level === void 0 ? e : o.level;
}, "applyOptions");
var je = /* @__PURE__ */ n((t) => {
let e = /* @__PURE__ */ n((...o) => o.join(" "), "chalk");
return Pe(e, t), Object.setPrototypeOf(e, k.prototype), e;
let o = /* @__PURE__ */ n((...e) => e.join(" "), "chalk");
return Pe(o, t), Object.setPrototypeOf(o, k.prototype), o;
}, "chalkFactory");

@@ -362,7 +362,7 @@ function k(t) {

Object.setPrototypeOf(k.prototype, Function.prototype);
for (let [t, e] of Object.entries(h))
for (let [t, o] of Object.entries(h))
R[t] = {
get() {
let o = x(this, N(e.open, e.close, this[E]), this[A]);
return Object.defineProperty(this, t, { value: o }), o;
let e = x(this, N(o.open, o.close, this[E]), this[A]);
return Object.defineProperty(this, t, { value: e }), e;
}

@@ -376,4 +376,4 @@ };

};
var v = /* @__PURE__ */ n((t, e, o, ...r) => t === "rgb" ? e === "ansi16m" ? h[o].ansi16m(...r) : e === "ansi256" ? h[o].ansi256(h.rgbToAnsi256(
...r)) : h[o].ansi(h.rgbToAnsi(...r)) : t === "hex" ? v("rgb", e, o, ...h.hexToRgb(...r)) : h[o][t](...r), "getModelAnsi"), Ve = ["rgb", "he\
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"];

@@ -383,5 +383,5 @@ for (let t of Ve) {

get() {
let { level: o } = this;
let { level: e } = this;
return function(...r) {
let s = N(v(t, G[o], "color", ...r), h.color.close, this[E]);
let s = N(v(t, G[e], "color", ...r), h.color.close, this[E]);
return x(this, s, this[A]);

@@ -391,8 +391,8 @@ };

};
let e = "bg" + t[0].toUpperCase() + t.slice(1);
R[e] = {
let o = "bg" + t[0].toUpperCase() + t.slice(1);
R[o] = {
get() {
let { level: o } = this;
let { level: e } = this;
return function(...r) {
let s = N(v(t, G[o], "bgColor", ...r), h.bgColor.close, this[E]);
let s = N(v(t, G[e], "bgColor", ...r), h.bgColor.close, this[E]);
return x(this, s, this[A]);

@@ -415,27 +415,27 @@ };

}
}), N = /* @__PURE__ */ n((t, e, o) => {
}), N = /* @__PURE__ */ n((t, o, e) => {
let r, s;
return o === void 0 ? (r = t, s = e) : (r = o.openAll + t, s = e + o.closeAll), {
return e === void 0 ? (r = t, s = o) : (r = e.openAll + t, s = o + e.closeAll), {
open: t,
close: e,
close: o,
openAll: r,
closeAll: s,
parent: o
parent: e
};
}, "createStyler"), x = /* @__PURE__ */ n((t, e, o) => {
}, "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] = e, r[A] = o, r;
}, "createBuilder"), De = /* @__PURE__ */ n((t, e) => {
if (t.level <= 0 || !e)
return t[A] ? "" : e;
let o = t[E];
if (o === void 0)
return e;
let { openAll: r, closeAll: s } = o;
if (e.includes("\x1B"))
for (; o !== void 0; )
e = j(e, o.close, o.open), o = o.parent;
let a = e.indexOf(`
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 l = o.indexOf(`
`);
return a !== -1 && (e = V(e, s, r, a)), r + e + s;
return l !== -1 && (o = V(o, s, r, l)), r + o + s;
}, "applyStyle");

@@ -447,3 +447,3 @@ Object.defineProperties(k.prototype, R);

// src/server-errors.ts
var l = Ie(Y(), 1);
var u = Ie(Y(), 1);

@@ -453,35 +453,24 @@ // src/storybook-error.ts

code: t,
category: e
category: o
}) {
let o = String(t).padStart(4, "0");
return `SB_${e}_${o}`;
let e = String(t).padStart(4, "0");
return `SB_${o}_${e}`;
}
n(H, "parseErrorCode");
var c = class t extends Error {
var a = class t extends Error {
constructor(e) {
super(t.getFullMessage(e));
/**
* Data associated with the error. Used to provide additional information in the error message or to be passed to telemetry.
*/
this.data = {};
/**
* Flag used to easily determine if the error originates from Storybook.
*/
this.fromStorybook = !0;
this.category = e.category, this.documentation = e.documentation ?? !1, this.code = e.code;
}
static {
n(this, "StorybookError");
}
/**
* Category of the error. Used to classify the type of error, e.g., 'PREVIEW_API'.
*/
category;
/**
* Code representing the error. Used to uniquely identify the error, e.g., 1.
*/
code;
/**
* Data associated with the error. Used to provide additional information in the error message or to be passed to telemetry.
*/
data = {};
/**
* Specifies the documentation for the error.
* - If `true`, links to a documentation page on the Storybook website (make sure it exists before enabling) – This is not implemented yet.
* - If a string, uses the provided URL for documentation (external or FAQ links).
* - If `false` (default), no documentation link is added.
*/
documentation;
/**
* Flag used to easily determine if the error originates from Storybook.
*/
fromStorybook = !0;
get fullErrorCode() {

@@ -497,5 +486,2 @@ return H({ code: this.code, category: this.category });

}
constructor(e) {
super(t.getFullMessage(e)), this.category = e.category, this.documentation = e.documentation ?? !1, this.code = e.code;
}
/**

@@ -506,13 +492,13 @@ * Generates the error message along with additional documentation link (if applicable).

documentation: e,
code: o,
category: r,
message: s
code: r,
category: s,
message: l
}) {
let a;
return e === !0 ? a = `https://storybook.js.org/error/${H({ code: o, category: r })}` : typeof e == "string" ? a = e : Array.isArray(e) &&
(a = `
${e.map((d) => ` - ${d}`).join(`
`)}`), `${s}${a != null ? `
let c;
return e === !0 ? c = `https://storybook.js.org/error/${H({ code: r, category: s })}` : typeof e == "string" ? c = e : Array.isArray(e) &&
(c = `
${e.map((g) => ` - ${g}`).join(`
`)}`), `${l}${c != null ? `
More info: ${a}
More info: ${c}
` : ""}`;

@@ -534,3 +520,3 @@ }

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 c {
WEB-COMPONENTS-WEBPACK5", i))(Ue || {}), X = class extends a {
static {

@@ -544,3 +530,3 @@ n(this, "NxProjectDetectedError");

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

@@ -550,3 +536,3 @@ Run "nx g @nx/storybook:configuration" to add Storybook to your project.`

}
}, z = class extends c {
}, z = class extends a {
static {

@@ -560,3 +546,3 @@ n(this, "MissingFrameworkFieldError");

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

@@ -567,4 +553,4 @@

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

@@ -574,4 +560,4 @@ category: "CORE-COMMON",

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

@@ -581,3 +567,3 @@ Please run 'npx storybook automigrate' to automatically fix your config.

});
this.data = o;
this.data = e;
}

@@ -587,4 +573,4 @@ static {

}
}, q = class extends c {
constructor(o) {
}, q = class extends a {
constructor(e) {
super({

@@ -594,8 +580,8 @@ category: "CORE-COMMON",

documentation: "",
message: l.dedent`
Could not evaluate the '${o.frameworkName}' package from the 'framework' field of Storybook config.
message: u.dedent`
Could not evaluate the '${e.frameworkName}' package from the 'framework' field of Storybook config.
Are you sure it's a valid package and is installed?`
});
this.data = o;
this.data = e;
}

@@ -605,3 +591,3 @@ static {

}
}, Q = class extends c {
}, Q = class extends a {
static {

@@ -615,3 +601,3 @@ n(this, "ConflictingStaticDirConfigError");

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

@@ -624,3 +610,3 @@ * Storybook's option in the config file: 'staticDirs'

}
}, Z = class extends c {
}, Z = class extends a {
static {

@@ -634,3 +620,3 @@ n(this, "InvalidStoriesEntryError");

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

@@ -642,3 +628,3 @@ Your main configuration somehow does not contain a 'stories' field, or it resolved to an empty array.

}
}, ee = class extends c {
}, ee = class extends a {
static {

@@ -655,3 +641,3 @@ n(this, "WebpackMissingStatsError");

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

@@ -661,10 +647,10 @@ Storybook needs Webpack stats (including errors) in order to build correctly.`

}
}, oe = class extends c {
constructor(o) {
}, oe = class extends a {
constructor(e) {
super({
category: "BUILDER-WEBPACK5",
code: 2,
message: o.error.message.trim()
message: e.error.message.trim()
});
this.data = o;
this.data = e;
}

@@ -679,5 +665,5 @@ static {

n(te, "removeAnsiEscapeCodes");
var re = class extends c {
constructor(o) {
o.errors = o.errors.map((r) => ({
var re = class extends a {
constructor(e) {
e.errors = e.errors.map((r) => ({
...r,

@@ -692,3 +678,3 @@ message: te(r.message),

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

@@ -698,3 +684,3 @@ Run Storybook with --debug-webpack for more information.

});
this.data = o;
this.data = e;
}

@@ -704,4 +690,4 @@ static {

}
}, ne = class extends c {
constructor(o) {
}, ne = class extends a {
constructor(e) {
super({

@@ -711,7 +697,7 @@ category: "CLI_INIT",

documentation: "https://storybook.js.org/docs/angular/faq#error-no-angularjson-file-found",
message: l.dedent`
An angular.json file was not found in the current working directory: ${o.path}
message: u.dedent`
An angular.json file was not found in the current working directory: ${e.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 = o;
this.data = e;
}

@@ -721,3 +707,3 @@ static {

}
}, se = class extends c {
}, se = class extends a {
static {

@@ -734,3 +720,3 @@ n(this, "AngularLegacyBuildOptionsError");

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

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

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

@@ -749,4 +735,4 @@ category: "CORE-SERVER",

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

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

${o.error.stack || o.error.message}`
${e.error.stack || e.error.message}`
});
this.data = o;
this.data = e;
}

@@ -765,3 +751,3 @@ static {

}
}, ae = class extends c {
}, ae = class extends a {
static {

@@ -775,3 +761,3 @@ n(this, "MissingBuilderError");

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

@@ -788,4 +774,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 c {
constructor(o) {
}, ce = class extends a {
constructor(e) {
super({

@@ -795,6 +781,6 @@ category: "FRAMEWORK_NEXTJS",

documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
message: l.dedent`
Failed to fetch \`${o.fontFamily}\` from Google Fonts with URL: \`${o.url}\``
message: u.dedent`
Failed to fetch \`${e.fontFamily}\` from Google Fonts with URL: \`${e.url}\``
});
this.data = o;
this.data = e;
}

@@ -804,4 +790,4 @@ static {

}
}, le = class extends c {
constructor(o) {
}, le = class extends a {
constructor(e) {
super({

@@ -811,8 +797,8 @@ category: "FRAMEWORK_NEXTJS",

documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
message: l.dedent`
An error occurred when trying to load Google Fonts with URL \`${o.url}\`.
message: u.dedent`
An error occurred when trying to load Google Fonts with URL \`${e.url}\`.
${o.error instanceof Error ? o.error.message : ""}`
${e.error instanceof Error ? e.error.message : ""}`
});
this.data = o;
this.data = e;
}

@@ -822,4 +808,4 @@ static {

}
}, ue = class extends c {
constructor(o) {
}, ue = class extends a {
constructor(e) {
super({

@@ -829,3 +815,3 @@ category: "CORE-SERVER",

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

@@ -842,3 +828,3 @@ Please check whether the versions of your Storybook packages match whenever possible, as this might be the cause.

});
this.data = o;
this.data = e;
}

@@ -848,19 +834,19 @@ static {

}
}, de = class extends c {
constructor(o) {
}, de = class extends a {
constructor(e) {
let r = [
`Storybook failed to load ${o.location}`,
`Storybook failed to load ${e.location}`,
"",
"It looks like the file tried to load/import an ESM only module.",
`Support for this is currently limited in ${o.location}`,
`Support for this is currently limited in ${e.location}`,
"You can import ESM modules in your main file, but only as dynamic import.",
""
];
o.line && r.push(
e.line && r.push(
m.white(
`In your ${m.yellow(o.location)} file, line ${m.bold.cyan(
o.num
`In your ${m.yellow(e.location)} file, line ${m.bold.cyan(
e.num
)} threw an error:`
),
m.grey(o.line)
m.grey(e.line)
), r.push(

@@ -881,3 +867,3 @@ "",

});
this.data = o;
this.data = e;
}

@@ -887,4 +873,4 @@ static {

}
}, pe = class extends c {
constructor(o) {
}, pe = class extends a {
constructor(e) {
super({

@@ -894,4 +880,4 @@ category: "CORE-SERVER",

documentation: "https://storybook.js.org/docs/configure",
message: l.dedent`
No configuration files have been found in your configDir: ${m.yellow(o.location)}.
message: u.dedent`
No configuration files have been found in your configDir: ${m.yellow(e.location)}.
Storybook needs a "main.js" file, please add it.

@@ -901,3 +887,3 @@

});
this.data = o;
this.data = e;
}

@@ -907,6 +893,6 @@ static {

}
}, ge = class extends c {
constructor(o) {
}, ge = class extends a {
constructor(e) {
let r = m.white(
(o.error.stack || o.error.message).replaceAll(process.cwd(), "")
(e.error.stack || e.error.message).replaceAll(process.cwd(), "")
);

@@ -916,4 +902,4 @@ super({

code: 7,
message: l.dedent`
Storybook couldn't evaluate your ${m.yellow(o.location)} file.
message: u.dedent`
Storybook couldn't evaluate your ${m.yellow(e.location)} file.

@@ -923,3 +909,3 @@ Original error:

});
this.data = o;
this.data = e;
}

@@ -929,4 +915,4 @@ static {

}
}, fe = class extends c {
constructor(o) {
}, fe = class extends a {
constructor(e) {
super({

@@ -936,8 +922,8 @@ category: "CLI_INIT",

documentation: "",
message: l.dedent`
There was an error while using ${o.packageManager} to create a new ${o.projectType} project.
message: u.dedent`
There was an error while using ${e.packageManager} to create a new ${e.projectType} project.
${o.error instanceof Error ? o.error.message : ""}`
${e.error instanceof Error ? e.error.message : ""}`
});
this.data = o;
this.data = e;
}

@@ -947,11 +933,11 @@ static {

}
}, me = class extends c {
constructor(o) {
}, me = class extends a {
constructor(e) {
super({
category: "CLI_UPGRADE",
code: 3,
message: l.dedent`
message: u.dedent`
You are trying to upgrade Storybook to a lower version than the version currently installed. This is not supported.
Storybook version ${o.beforeVersion} was detected in your project, but you are trying to "upgrade" to version ${o.currentVersion}.
Storybook version ${e.beforeVersion} was detected in your project, but you are trying to "upgrade" to version ${e.currentVersion}.

@@ -965,3 +951,3 @@ This usually happens when running the upgrade command without a version specifier, e.g. "npx storybook upgrade".

});
this.data = o;
this.data = e;
}

@@ -971,9 +957,9 @@ static {

}
}, he = class extends c {
constructor(o) {
}, he = class extends a {
constructor(e) {
super({
category: "CLI_UPGRADE",
code: 4,
message: l.dedent`
You are upgrading Storybook to the same version that is currently installed in the project, version ${o.beforeVersion}.
message: u.dedent`
You are upgrading Storybook to the same version that is currently installed in the project, version ${e.beforeVersion}.

@@ -992,3 +978,3 @@ This usually happens when running the upgrade command without a version specifier, e.g. "npx storybook upgrade".

});
this.data = o;
this.data = e;
}

@@ -998,3 +984,3 @@ static {

}
}, ye = class extends c {
}, ye = class extends a {
static {

@@ -1007,3 +993,3 @@ n(this, "UpgradeStorybookUnknownCurrentVersionError");

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

@@ -1015,3 +1001,3 @@

}
}, be = class extends c {
}, be = class extends a {
static {

@@ -1024,3 +1010,3 @@ n(this, "UpgradeStorybookInWrongWorkingDirectory");

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

@@ -1031,3 +1017,3 @@

}
}, Ee = class extends c {
}, Ee = class extends a {
static {

@@ -1040,3 +1026,3 @@ n(this, "NoStatsForViteDevError");

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

@@ -1047,12 +1033,12 @@

}
}, Re = class extends c {
constructor(o) {
}, Re = class extends a {
constructor(e) {
super({
category: "CLI",
code: 1,
message: l.dedent`
Unable to find versions of "${o.packageName}" using ${o.packageManager}
${o.error && `Reason: ${o.error}`}`
message: u.dedent`
Unable to find versions of "${e.packageName}" using ${e.packageManager}
${e.error && `Reason: ${e.error}`}`
});
this.data = o;
this.data = e;
}

@@ -1059,0 +1045,0 @@ static {

var ie = Object.defineProperty;
var n = (t, e) => ie(t, "name", { value: e, configurable: !0 });
var n = (r, e) => ie(r, "name", { value: e, configurable: !0 });
// ../node_modules/@babel/runtime/helpers/esm/extends.js
function g() {
return g = Object.assign ? Object.assign.bind() : function(t) {
function v() {
return v = Object.assign ? Object.assign.bind() : function(r) {
for (var e = 1; e < arguments.length; e++) {
var r = arguments[e];
for (var a in r)
Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
var t = arguments[e];
for (var a in t) ({}).hasOwnProperty.call(t, a) && (r[a] = t[a]);
}
return t;
}, g.apply(this, arguments);
return r;
}, v.apply(null, arguments);
}
n(g, "_extends");
n(v, "_extends");
// ../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
function I(t) {
if (t === void 0)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return t;
function q(r) {
if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return r;
}
n(I, "_assertThisInitialized");
n(q, "_assertThisInitialized");
// ../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
function m(t, e) {
return m = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : /* @__PURE__ */ n(function(a, i) {
return a.__proto__ = i, a;
}, "_setPrototypeOf"), m(t, e);
function m(r, e) {
return m = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, a) {
return t.__proto__ = a, t;
}, m(r, e);
}

@@ -34,56 +32,55 @@ n(m, "_setPrototypeOf");

// ../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
function R(t, e) {
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, m(t, e);
function U(r, e) {
r.prototype = Object.create(e.prototype), r.prototype.constructor = r, m(r, e);
}
n(R, "_inheritsLoose");
n(U, "_inheritsLoose");
// ../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
function w(t) {
return w = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : /* @__PURE__ */ n(function(r) {
return r.__proto__ || Object.getPrototypeOf(r);
}, "_getPrototypeOf"), w(t);
function F(r) {
return F = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
return e.__proto__ || Object.getPrototypeOf(e);
}, F(r);
}
n(w, "_getPrototypeOf");
n(F, "_getPrototypeOf");
// ../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
function O(t) {
function V(r) {
try {
return Function.toString.call(t).indexOf("[native code]") !== -1;
return Function.toString.call(r).indexOf("[native code]") !== -1;
} catch {
return typeof t == "function";
return typeof r == "function";
}
}
n(O, "_isNativeFunction");
n(V, "_isNativeFunction");
// ../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
function C() {
function T() {
try {
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
var r = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
}));
} catch {
}
return (C = /* @__PURE__ */ n(function() {
return !!t;
return (T = /* @__PURE__ */ n(function() {
return !!r;
}, "_isNativeReflectConstruct"))();
}
n(C, "_isNativeReflectConstruct");
n(T, "_isNativeReflectConstruct");
// ../node_modules/@babel/runtime/helpers/esm/construct.js
function j(t, e, r) {
if (C()) return Reflect.construct.apply(null, arguments);
function N(r, e, t) {
if (T()) return Reflect.construct.apply(null, arguments);
var a = [null];
a.push.apply(a, e);
var i = new (t.bind.apply(t, a))();
return r && m(i, r.prototype), i;
var i = new (r.bind.apply(r, a))();
return t && m(i, t.prototype), i;
}
n(j, "_construct");
n(N, "_construct");
// ../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
function x(t) {
function C(r) {
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
return x = /* @__PURE__ */ n(function(a) {
if (a === null || !O(a)) return a;
if (typeof a != "function")
throw new TypeError("Super expression must either be null or a function");
if (typeof e < "u") {
return C = /* @__PURE__ */ n(function(a) {
if (a === null || !V(a)) return a;
if (typeof a != "function") throw new TypeError("Super expression must either be null or a function");
if (e !== void 0) {
if (e.has(a)) return e.get(a);

@@ -93,3 +90,3 @@ e.set(a, i);

function i() {
return j(a, arguments, w(this).constructor);
return N(a, arguments, F(this).constructor);
}

@@ -104,5 +101,5 @@ return n(i, "Wrapper"), i.prototype = Object.create(a.prototype, {

}), m(i, a);
}, "_wrapNativeSuper"), x(t);
}, "_wrapNativeSuper"), C(r);
}
n(x, "_wrapNativeSuper");
n(C, "_wrapNativeSuper");

@@ -343,40 +340,40 @@ // ../node_modules/polished/dist/polished.esm.js

};
function ue() {
for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
e[r] = arguments[r];
function se() {
for (var r = arguments.length, e = new Array(r), t = 0; t < r; t++)
e[t] = arguments[t];
var a = e[0], i = [], o;
for (o = 1; o < e.length; o += 1)
i.push(e[o]);
return i.forEach(function(s) {
a = a.replace(/%[a-z]/, s);
return i.forEach(function(u) {
a = a.replace(/%[a-z]/, u);
}), a;
}
n(ue, "format");
var d = /* @__PURE__ */ function(t) {
R(e, t);
function e(r) {
for (var a, i = arguments.length, o = new Array(i > 1 ? i - 1 : 0), s = 1; s < i; s++)
o[s - 1] = arguments[s];
return a = t.call(this, ue.apply(void 0, [oe[r]].concat(o))) || this, I(a);
n(se, "format");
var d = /* @__PURE__ */ function(r) {
U(e, r);
function e(t) {
for (var a, i = arguments.length, o = new Array(i > 1 ? i - 1 : 0), u = 1; u < i; u++)
o[u - 1] = arguments[u];
return a = r.call(this, se.apply(void 0, [oe[t]].concat(o))) || this, q(a);
}
return n(e, "PolishedError"), e;
}(/* @__PURE__ */ x(Error));
function $(t) {
return Math.round(t * 255);
}(/* @__PURE__ */ C(Error));
function I(r) {
return Math.round(r * 255);
}
n($, "colorToInt");
function se(t, e, r) {
return $(t) + "," + $(e) + "," + $(r);
n(I, "colorToInt");
function ue(r, e, t) {
return I(r) + "," + I(e) + "," + I(t);
}
n(se, "convertToInt");
function S(t, e, r, a) {
if (a === void 0 && (a = se), e === 0)
return a(r, r, r);
var i = (t % 360 + 360) % 360 / 60, o = (1 - Math.abs(2 * r - 1)) * e, s = o * (1 - Math.abs(i % 2 - 1)), f = 0, p = 0, l = 0;
i >= 0 && i < 1 ? (f = o, p = s) : i >= 1 && i < 2 ? (f = s, p = o) : i >= 2 && i < 3 ? (p = o, l = s) : i >= 3 && i < 4 ? (p = s, l = o) :
i >= 4 && i < 5 ? (f = s, l = o) : i >= 5 && i < 6 && (f = o, l = s);
var b = r - o / 2, v = f + b, c = p + b, T = l + b;
return a(v, c, T);
n(ue, "convertToInt");
function w(r, e, t, a) {
if (a === void 0 && (a = ue), e === 0)
return a(t, t, t);
var i = (r % 360 + 360) % 360 / 60, o = (1 - Math.abs(2 * t - 1)) * e, u = o * (1 - Math.abs(i % 2 - 1)), f = 0, p = 0, l = 0;
i >= 0 && i < 1 ? (f = o, p = u) : i >= 1 && i < 2 ? (f = u, p = o) : i >= 2 && i < 3 ? (p = o, l = u) : i >= 3 && i < 4 ? (p = u, l = o) :
i >= 4 && i < 5 ? (f = u, l = o) : i >= 5 && i < 6 && (f = o, l = u);
var h = t - o / 2, b = f + h, c = p + h, A = l + h;
return a(b, c, A);
}
n(S, "hslToRgb");
n(w, "hslToRgb");
var G = {

@@ -532,15 +529,15 @@ aliceblue: "f0f8ff",

};
function fe(t) {
if (typeof t != "string") return t;
var e = t.toLowerCase();
return G[e] ? "#" + G[e] : t;
function fe(r) {
if (typeof r != "string") return r;
var e = r.toLowerCase();
return G[e] ? "#" + G[e] : r;
}
n(fe, "nameToHex");
var pe = /^#[a-fA-F0-9]{6}$/, le = /^#[a-fA-F0-9]{8}$/, de = /^#[a-fA-F0-9]{3}$/, ce = /^#[a-fA-F0-9]{4}$/, k = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,
var pe = /^#[a-fA-F0-9]{6}$/, le = /^#[a-fA-F0-9]{8}$/, de = /^#[a-fA-F0-9]{3}$/, ce = /^#[a-fA-F0-9]{4}$/, R = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,
me = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, ge = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,
he = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
function E(t) {
if (typeof t != "string")
function $(r) {
if (typeof r != "string")
throw new d(3);
var e = fe(t);
var e = fe(r);
if (e.match(pe))

@@ -553,3 +550,3 @@ return {

if (e.match(le)) {
var r = parseFloat((parseInt("" + e[7] + e[8], 16) / 255).toFixed(2));
var t = parseFloat((parseInt("" + e[7] + e[8], 16) / 255).toFixed(2));
return {

@@ -559,3 +556,3 @@ red: parseInt("" + e[1] + e[2], 16),

blue: parseInt("" + e[5] + e[6], 16),
alpha: r
alpha: t
};

@@ -578,3 +575,3 @@ }

}
var i = k.exec(e);
var i = R.exec(e);
if (i)

@@ -594,12 +591,12 @@ return {

};
var s = ge.exec(e);
if (s) {
var f = parseInt("" + s[1], 10), p = parseInt("" + s[2], 10) / 100, l = parseInt("" + s[3], 10) / 100, b = "rgb(" + S(f, p, l) + ")", v = k.
exec(b);
if (!v)
throw new d(4, e, b);
var u = ge.exec(e);
if (u) {
var f = parseInt("" + u[1], 10), p = parseInt("" + u[2], 10) / 100, l = parseInt("" + u[3], 10) / 100, h = "rgb(" + w(f, p, l) + ")", b = R.
exec(h);
if (!b)
throw new d(4, e, h);
return {
red: parseInt("" + v[1], 10),
green: parseInt("" + v[2], 10),
blue: parseInt("" + v[3], 10)
red: parseInt("" + b[1], 10),
green: parseInt("" + b[2], 10),
blue: parseInt("" + b[3], 10)
};

@@ -609,10 +606,10 @@ }

if (c) {
var T = parseInt("" + c[1], 10), ne = parseInt("" + c[2], 10) / 100, ae = parseInt("" + c[3], 10) / 100, N = "rgb(" + S(T, ne, ae) + ")",
z = k.exec(N);
if (!z)
throw new d(4, e, N);
var A = parseInt("" + c[1], 10), ne = parseInt("" + c[2], 10) / 100, ae = parseInt("" + c[3], 10) / 100, W = "rgb(" + w(A, ne, ae) + ")",
S = R.exec(W);
if (!S)
throw new d(4, e, W);
return {
red: parseInt("" + z[1], 10),
green: parseInt("" + z[2], 10),
blue: parseInt("" + z[3], 10),
red: parseInt("" + S[1], 10),
green: parseInt("" + S[2], 10),
blue: parseInt("" + S[3], 10),
alpha: parseFloat("" + c[4]) > 1 ? parseFloat("" + c[4]) / 100 : parseFloat("" + c[4])

@@ -623,42 +620,42 @@ };

}
n(E, "parseToRgb");
function be(t) {
var e = t.red / 255, r = t.green / 255, a = t.blue / 255, i = Math.max(e, r, a), o = Math.min(e, r, a), s = (i + o) / 2;
n($, "parseToRgb");
function be(r) {
var e = r.red / 255, t = r.green / 255, a = r.blue / 255, i = Math.max(e, t, a), o = Math.min(e, t, a), u = (i + o) / 2;
if (i === o)
return t.alpha !== void 0 ? {
return r.alpha !== void 0 ? {
hue: 0,
saturation: 0,
lightness: s,
alpha: t.alpha
lightness: u,
alpha: r.alpha
} : {
hue: 0,
saturation: 0,
lightness: s
lightness: u
};
var f, p = i - o, l = s > 0.5 ? p / (2 - i - o) : p / (i + o);
var f, p = i - o, l = u > 0.5 ? p / (2 - i - o) : p / (i + o);
switch (i) {
case e:
f = (r - a) / p + (r < a ? 6 : 0);
f = (t - a) / p + (t < a ? 6 : 0);
break;
case r:
case t:
f = (a - e) / p + 2;
break;
default:
f = (e - r) / p + 4;
f = (e - t) / p + 4;
break;
}
return f *= 60, t.alpha !== void 0 ? {
return f *= 60, r.alpha !== void 0 ? {
hue: f,
saturation: l,
lightness: s,
alpha: t.alpha
lightness: u,
alpha: r.alpha
} : {
hue: f,
saturation: l,
lightness: s
lightness: u
};
}
n(be, "rgbToHsl");
function Q(t) {
return be(E(t));
function Q(r) {
return be($(r));
}

@@ -668,57 +665,57 @@ n(Q, "parseToHsl");

return e.length === 7 && e[1] === e[2] && e[3] === e[4] && e[5] === e[6] ? "#" + e[1] + e[3] + e[5] : e;
}, "reduceHexValue"), B = ve;
function h(t) {
var e = t.toString(16);
}, "reduceHexValue"), O = ve;
function g(r) {
var e = r.toString(16);
return e.length === 1 ? "0" + e : e;
}
n(h, "numberToHex");
function P(t) {
return h(Math.round(t * 255));
n(g, "numberToHex");
function j(r) {
return g(Math.round(r * 255));
}
n(P, "colorToHex");
function ye(t, e, r) {
return B("#" + P(t) + P(e) + P(r));
n(j, "colorToHex");
function ye(r, e, t) {
return O("#" + j(r) + j(e) + j(t));
}
n(ye, "convertToHex");
function A(t, e, r) {
return S(t, e, r, ye);
function z(r, e, t) {
return w(r, e, t, ye);
}
n(A, "hslToHex");
function we(t, e, r) {
if (typeof t == "number" && typeof e == "number" && typeof r == "number")
return A(t, e, r);
if (typeof t == "object" && e === void 0 && r === void 0)
return A(t.hue, t.saturation, t.lightness);
n(z, "hslToHex");
function we(r, e, t) {
if (typeof r == "number" && typeof e == "number" && typeof t == "number")
return z(r, e, t);
if (typeof r == "object" && e === void 0 && t === void 0)
return z(r.hue, r.saturation, r.lightness);
throw new d(1);
}
n(we, "hsl");
function xe(t, e, r, a) {
if (typeof t == "number" && typeof e == "number" && typeof r == "number" && typeof a == "number")
return a >= 1 ? A(t, e, r) : "rgba(" + S(t, e, r) + "," + a + ")";
if (typeof t == "object" && e === void 0 && r === void 0 && a === void 0)
return t.alpha >= 1 ? A(t.hue, t.saturation, t.lightness) : "rgba(" + S(t.hue, t.saturation, t.lightness) + "," + t.alpha + ")";
function xe(r, e, t, a) {
if (typeof r == "number" && typeof e == "number" && typeof t == "number" && typeof a == "number")
return a >= 1 ? z(r, e, t) : "rgba(" + w(r, e, t) + "," + a + ")";
if (typeof r == "object" && e === void 0 && t === void 0 && a === void 0)
return r.alpha >= 1 ? z(r.hue, r.saturation, r.lightness) : "rgba(" + w(r.hue, r.saturation, r.lightness) + "," + r.alpha + ")";
throw new d(2);
}
n(xe, "hsla");
function M(t, e, r) {
if (typeof t == "number" && typeof e == "number" && typeof r == "number")
return B("#" + h(t) + h(e) + h(r));
if (typeof t == "object" && e === void 0 && r === void 0)
return B("#" + h(t.red) + h(t.green) + h(t.blue));
function k(r, e, t) {
if (typeof r == "number" && typeof e == "number" && typeof t == "number")
return O("#" + g(r) + g(e) + g(t));
if (typeof r == "object" && e === void 0 && t === void 0)
return O("#" + g(r.red) + g(r.green) + g(r.blue));
throw new d(6);
}
n(M, "rgb");
function F(t, e, r, a) {
if (typeof t == "string" && typeof e == "number") {
var i = E(t);
n(k, "rgb");
function x(r, e, t, a) {
if (typeof r == "string" && typeof e == "number") {
var i = $(r);
return "rgba(" + i.red + "," + i.green + "," + i.blue + "," + e + ")";
} else {
if (typeof t == "number" && typeof e == "number" && typeof r == "number" && typeof a == "number")
return a >= 1 ? M(t, e, r) : "rgba(" + t + "," + e + "," + r + "," + a + ")";
if (typeof t == "object" && e === void 0 && r === void 0 && a === void 0)
return t.alpha >= 1 ? M(t.red, t.green, t.blue) : "rgba(" + t.red + "," + t.green + "," + t.blue + "," + t.alpha + ")";
if (typeof r == "number" && typeof e == "number" && typeof t == "number" && typeof a == "number")
return a >= 1 ? k(r, e, t) : "rgba(" + r + "," + e + "," + t + "," + a + ")";
if (typeof r == "object" && e === void 0 && t === void 0 && a === void 0)
return r.alpha >= 1 ? k(r.red, r.green, r.blue) : "rgba(" + r.red + "," + r.green + "," + r.blue + "," + r.alpha + ")";
}
throw new d(7);
}
n(F, "rgba");
n(x, "rgba");
var Se = /* @__PURE__ */ n(function(e) {

@@ -729,62 +726,62 @@ return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && (typeof e.alpha != "number" || typeof e.alpha >

return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && typeof e.alpha == "number";
}, "isRgba"), ze = /* @__PURE__ */ n(function(e) {
}, "isRgba"), Ce = /* @__PURE__ */ n(function(e) {
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && (typeof e.alpha != "number" || typeof e.
alpha > "u");
}, "isHsl"), Ce = /* @__PURE__ */ n(function(e) {
}, "isHsl"), ze = /* @__PURE__ */ n(function(e) {
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && typeof e.alpha == "number";
}, "isHsla");
function Y(t) {
if (typeof t != "object") throw new d(8);
if (Fe(t)) return F(t);
if (Se(t)) return M(t);
if (Ce(t)) return xe(t);
if (ze(t)) return we(t);
function Y(r) {
if (typeof r != "object") throw new d(8);
if (Fe(r)) return x(r);
if (Se(r)) return k(r);
if (ze(r)) return xe(r);
if (Ce(r)) return we(r);
throw new d(8);
}
n(Y, "toColorString");
function J(t, e, r) {
function J(r, e, t) {
return /* @__PURE__ */ n(function() {
var i = r.concat(Array.prototype.slice.call(arguments));
return i.length >= e ? t.apply(this, i) : J(t, e, i);
var i = t.concat(Array.prototype.slice.call(arguments));
return i.length >= e ? r.apply(this, i) : J(r, e, i);
}, "fn");
}
n(J, "curried");
function H(t) {
return J(t, t.length, []);
function B(r) {
return J(r, r.length, []);
}
n(H, "curry");
function L(t, e, r) {
return Math.max(t, Math.min(e, r));
n(B, "curry");
function M(r, e, t) {
return Math.max(r, Math.min(e, t));
}
n(L, "guard");
function Ae(t, e) {
n(M, "guard");
function Ae(r, e) {
if (e === "transparent") return e;
var r = Q(e);
return Y(g({}, r, {
lightness: L(0, 1, r.lightness - parseFloat(t))
var t = Q(e);
return Y(v({}, t, {
lightness: M(0, 1, t.lightness - parseFloat(r))
}));
}
n(Ae, "darken");
var Te = /* @__PURE__ */ H(Ae), Z = Te;
function Ie(t, e) {
var Te = /* @__PURE__ */ B(Ae), Z = Te;
function Ie(r, e) {
if (e === "transparent") return e;
var r = Q(e);
return Y(g({}, r, {
lightness: L(0, 1, r.lightness + parseFloat(t))
var t = Q(e);
return Y(v({}, t, {
lightness: M(0, 1, t.lightness + parseFloat(r))
}));
}
n(Ie, "lighten");
var Re = /* @__PURE__ */ H(Ie), X = Re;
function Oe(t, e) {
var Re = /* @__PURE__ */ B(Ie), X = Re;
function je(r, e) {
if (e === "transparent") return e;
var r = E(e), a = typeof r.alpha == "number" ? r.alpha : 1, i = g({}, r, {
alpha: L(0, 1, +(a * 100 - parseFloat(t) * 100).toFixed(2) / 100)
var t = $(e), a = typeof t.alpha == "number" ? t.alpha : 1, i = v({}, t, {
alpha: M(0, 1, +(a * 100 - parseFloat(r) * 100).toFixed(2) / 100)
});
return F(i);
return x(i);
}
n(Oe, "transparentize");
var je = /* @__PURE__ */ H(Oe), K = je;
n(je, "transparentize");
var Oe = /* @__PURE__ */ B(je), K = Oe;
// src/theming/base.ts
var u = {
var s = {
// Official color palette

@@ -827,9 +824,9 @@ primary: "#FF4785",

warningText: "#A15C20"
}, D = {
}, P = {
app: "#F6F9FC",
bar: u.lightest,
content: u.lightest,
preview: u.lightest,
bar: s.lightest,
content: s.lightest,
preview: s.lightest,
gridCellSize: 10,
hoverable: K(0.9, u.secondary),
hoverable: K(0.9, s.secondary),
// hover state for items in a list

@@ -887,3 +884,3 @@ // Notification, error, and warning backgrounds

// src/theming/themes/light.ts
var $e = {
var ke = {
base: "light",

@@ -896,6 +893,6 @@ // Storybook-specific color palette

// UI
appBg: D.app,
appContentBg: u.lightest,
appPreviewBg: u.lightest,
appBorderColor: u.border,
appBg: P.app,
appContentBg: s.lightest,
appPreviewBg: s.lightest,
appBorderColor: s.border,
appBorderRadius: 4,

@@ -906,23 +903,23 @@ // Fonts

// Text colors
textColor: u.darkest,
textInverseColor: u.lightest,
textMutedColor: u.dark,
textColor: s.darkest,
textInverseColor: s.lightest,
textMutedColor: s.dark,
// Toolbar default and active colors
barTextColor: u.mediumdark,
barHoverColor: u.secondary,
barSelectedColor: u.secondary,
barBg: u.lightest,
barTextColor: s.mediumdark,
barHoverColor: s.secondary,
barSelectedColor: s.secondary,
barBg: s.lightest,
// Form colors
buttonBg: D.app,
buttonBorder: u.medium,
booleanBg: u.mediumlight,
booleanSelectedBg: u.lightest,
inputBg: u.lightest,
inputBorder: u.border,
inputTextColor: u.darkest,
buttonBg: P.app,
buttonBorder: s.medium,
booleanBg: s.mediumlight,
booleanSelectedBg: s.lightest,
inputBg: s.lightest,
inputBorder: s.border,
inputTextColor: s.darkest,
inputBorderRadius: 4
}, W = $e;
}, E = ke;
// src/theming/themes/dark.ts
var ke = {
var $e = {
base: "dark",

@@ -937,3 +934,3 @@ // Storybook-specific color palette

appContentBg: "#1B1C1D",
appPreviewBg: u.lightest,
appPreviewBg: s.lightest,
appBorderColor: "rgba(255,255,255,.1)",

@@ -949,5 +946,5 @@ appBorderRadius: 4,

// Toolbar default and active colors
barTextColor: u.mediumdark,
barHoverColor: u.secondary,
barSelectedColor: u.secondary,
barTextColor: s.mediumdark,
barHoverColor: s.secondary,
barSelectedColor: s.secondary,
barBg: "#292C2E",

@@ -961,51 +958,51 @@ // Form colors

inputBorder: "rgba(255,255,255,.1)",
inputTextColor: u.lightest,
inputTextColor: s.lightest,
inputBorderRadius: 4
}, _ = ke;
}, _ = $e;
// ../node_modules/@storybook/global/dist/index.mjs
var ee = (() => {
let t;
return typeof window < "u" ? t = window : typeof globalThis < "u" ? t = globalThis : typeof global < "u" ? t = global : typeof self < "u" ?
t = self : t = {}, t;
let r;
return typeof window < "u" ? r = window : typeof globalThis < "u" ? r = globalThis : typeof global < "u" ? r = global : typeof self < "u" ?
r = self : r = {}, r;
})();
// src/theming/utils.ts
import { logger as Pe } from "@storybook/core/client-logger";
var { window: q } = ee;
var Be = /* @__PURE__ */ n((t) => typeof t != "string" ? (Pe.warn(
`Color passed to theme object should be a string. Instead ${t}(${typeof t}) was passed.`
), !1) : !0, "isColorString"), Me = /* @__PURE__ */ n((t) => !/(gradient|var|calc)/.test(t), "isValidColorForPolished"), Ee = /* @__PURE__ */ n(
(t, e) => t === "darken" ? F(`${Z(1, e)}`, 0.95) : t === "lighten" ? F(`${X(1, e)}`, 0.95) : e, "applyPolished"), te = /* @__PURE__ */ n((t) => (e) => {
if (!Be(e) || !Me(e))
import { logger as Be } from "@storybook/core/client-logger";
var { window: H } = ee;
var Me = /* @__PURE__ */ n((r) => typeof r != "string" ? (Be.warn(
`Color passed to theme object should be a string. Instead ${r}(${typeof r}) was passed.`
), !1) : !0, "isColorString"), Pe = /* @__PURE__ */ n((r) => !/(gradient|var|calc)/.test(r), "isValidColorForPolished"), Ee = /* @__PURE__ */ n(
(r, e) => r === "darken" ? x(`${Z(1, e)}`, 0.95) : r === "lighten" ? x(`${X(1, e)}`, 0.95) : e, "applyPolished"), re = /* @__PURE__ */ n((r) => (e) => {
if (!Me(e) || !Pe(e))
return e;
try {
return Ee(t, e);
return Ee(r, e);
} catch {
return e;
}
}, "colorFactory"), Ot = te("lighten"), jt = te("darken"), re = /* @__PURE__ */ n(() => !q || !q.matchMedia ? "light" : q.matchMedia("(prefe\
}, "colorFactory"), jr = re("lighten"), Or = re("darken"), te = /* @__PURE__ */ n(() => !H || !H.matchMedia ? "light" : H.matchMedia("(prefe\
rs-color-scheme: dark)").matches ? "dark" : "light", "getPreferredColorScheme");
// src/theming/create.ts
var U = {
light: W,
var L = {
light: E,
dark: _,
normal: W
}, V = re(), Et = /* @__PURE__ */ n((t = { base: V }, e) => {
let r = {
...U[V],
...U[t.base] || {},
...t,
base: U[t.base] ? t.base : V
normal: E
}, D = te(), Er = /* @__PURE__ */ n((r = { base: D }, e) => {
let t = {
...L[D],
...L[r.base] || {},
...r,
base: L[r.base] ? r.base : D
};
return {
...e,
...r,
barSelectedColor: t.barSelectedColor || r.colorSecondary
...t,
barSelectedColor: r.barSelectedColor || t.colorSecondary
};
}, "create");
export {
Et as create,
U as themes
Er as create,
L as themes
};
{
"name": "@storybook/core",
"version": "0.0.0-pr-28483-sha-c6902abe",
"version": "0.0.0-pr-28483-sha-d7c2f6b8",
"description": "Storybook framework-agnostic API",

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

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

@@ -331,3 +331,3 @@ "express": "^4.19.2",

"ejs": "^3.1.10",
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0",
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0",
"esbuild-plugin-alias": "^0.2.1",

@@ -334,0 +334,0 @@ "execa": "^8.0.1",

@@ -27,1 +27,26 @@ # Storybook Core

Importing from `@storybook/core` is explicitly NOT supported; it WILL break in a future version of storybook, very likely in a non-major version bump.
# For maintainers
## When to use `@storybook/core`
In the following packages you should import from `@storybook/core` (and ONLY from `@storybook/core`):
- `@storybook/core`
- `@storybook/codemod`
To prevent cyclical dependencies, these packages cannot depend on the `storybook` package.
## When to use `storybook/internal`
In every other package you should import from `storybook/internal` (and ONLY from `storybook/internal`).
The heuristic is simple:
> If you see a peerDependency on `storybook` in the `package.json` of the package you are working on, you should import from `storybook/internal`.
## The 1 exception: the `storybook` package itself
The sole exception is the `storybook` package itself.
Obviously, the `storybook` package cannot depend on itself, so it must import from `@storybook/core`.

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 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 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 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

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