Add comprehensive development roadmap via GitHub Issues

Created 10 detailed GitHub issues covering:
- Project activation and management UI (#1-2)
- Worker node coordination and visualization (#3-4)
- Automated GitHub repository scanning (#5)
- Intelligent model-to-issue matching (#6)
- Multi-model task execution system (#7)
- N8N workflow integration (#8)
- Hive-Bzzz P2P bridge (#9)
- Peer assistance protocol (#10)

Each issue includes detailed specifications, acceptance criteria,
technical implementation notes, and dependency mapping.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
anthonyrawlins
2025-07-12 19:41:01 +10:00
parent 9a6a06da89
commit e89f2f4b7b
4980 changed files with 1501266 additions and 57 deletions

View File

@@ -0,0 +1,6 @@
import { Renderer, PartialStoryFn } from 'storybook/internal/types';
/** @deprecated Will be removed in Storybook v10 */
declare const withActions: <T extends Renderer>(storyFn: PartialStoryFn<T>) => T['storyResult'];
export { withActions };

View File

@@ -0,0 +1,131 @@
var D = Object.defineProperty;
var r = (e, n) => D(e, "name", { value: n, configurable: !0 });
// src/actions/decorator.ts
import { makeDecorator as P, useEffect as x } from "storybook/preview-api";
// src/actions/constants.ts
var h = "actions", y = "storybook/actions", $ = `${y}/panel`, g = `${y}/action-event`, B = `${y}/action-clear`;
// src/actions/runtime/action.ts
import { ImplicitActionsDuringRendering as R } from "storybook/internal/preview-errors";
import { global as E } from "@storybook/global";
import { addons as S } from "storybook/preview-api";
// src/actions/runtime/configureActions.ts
var a = {
depth: 10,
clearOnStoryChange: !0,
limit: 50
};
// src/actions/runtime/action.ts
var A = /* @__PURE__ */ r((e, n) => {
let t = Object.getPrototypeOf(e);
return !t || n(t) ? t : A(t, n);
}, "findProto"), j = /* @__PURE__ */ r((e) => !!(typeof e == "object" && e && A(e, (n) => /^Synthetic(?:Base)?Event$/.test(n.constructor.name)) &&
typeof e.persist == "function"), "isReactSyntheticEvent"), I = /* @__PURE__ */ r((e) => {
if (j(e)) {
let n = Object.create(
e.constructor.prototype,
Object.getOwnPropertyDescriptors(e)
);
n.persist();
let t = Object.getOwnPropertyDescriptor(n, "view"), o = t?.value;
return typeof o == "object" && o?.constructor.name === "Window" && Object.defineProperty(n, "view", {
...t,
value: Object.create(o.constructor.prototype)
}), n;
}
return e;
}, "serializeArg");
function O(e, n = {}) {
let t = {
...a,
...n
}, o = /* @__PURE__ */ r(function(...i) {
if (n.implicit) {
let d = ("__STORYBOOK_PREVIEW__" in E ? E.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
(c) => c.phase === "playing" || c.phase === "rendering"
);
if (d) {
let c = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, u = new R({
phase: d.phase,
name: e,
deprecated: c
});
if (c)
console.warn(u);
else
throw u;
}
}
let m = S.getChannel(), p = Date.now().toString(36) + Math.random().toString(36).substring(2), l = 5, f = i.map(I), w = i.length > 1 ? f :
f[0], _ = {
id: p,
count: 0,
data: { name: e, args: w },
options: {
...t,
maxDepth: l + (t.depth || 3)
}
};
m.emit(g, _);
}, "actionHandler");
return o.isAction = !0, o.implicit = n.implicit, o;
}
r(O, "action");
// src/actions/runtime/actions.ts
var b = /* @__PURE__ */ r((...e) => {
let n = a, t = e;
t.length === 1 && Array.isArray(t[0]) && ([t] = t), t.length !== 1 && typeof t[t.length - 1] != "string" && (n = {
...a,
...t.pop()
});
let o = t[0];
(t.length !== 1 || typeof o == "string") && (o = {}, t.forEach((i) => {
o[i] = i;
}));
let s = {};
return Object.keys(o).forEach((i) => {
s[i] = O(o[i], n);
}), s;
}, "actions");
// src/actions/decorator.ts
var T = /^(\S+)\s*(.*)$/, k = Element != null && !Element.prototype.matches, F = k ? "msMatchesSelector" : "matches", v = /* @__PURE__ */ r(
(e, n) => {
if (e[F](n))
return !0;
let t = e.parentElement;
return t ? v(t, n) : !1;
}, "hasMatchInAncestry"), M = /* @__PURE__ */ r((e, ...n) => {
let t = e(...n);
return Object.entries(t).map(([o, s]) => {
let [i, m, p] = o.match(T) || [];
return {
eventName: m,
handler: /* @__PURE__ */ r((l) => {
(!p || v(l.target, p)) && s(l);
}, "handler")
};
});
}, "createHandlers"), C = /* @__PURE__ */ r((e, ...n) => {
let t = typeof globalThis.document < "u" && globalThis.document.getElementById("storybook-root");
x(() => {
if (t) {
let o = M(e, ...n);
return o.forEach(({ eventName: s, handler: i }) => t.addEventListener(s, i)), () => o.forEach(({ eventName: s, handler: i }) => t.removeEventListener(
s, i));
}
}, [t, e, n]);
}, "applyEventHandlers"), rt = P({
name: "withActions",
parameterName: h,
skipIfNoParametersOrOptions: !0,
wrapper: /* @__PURE__ */ r((e, n, { parameters: t }) => (t?.handles && C(b, ...t.handles), e(n)), "wrapper")
});
export {
rt as withActions
};

121
frontend/node_modules/storybook/dist/actions/index.cjs generated vendored Normal file
View File

@@ -0,0 +1,121 @@
"use strict";
var a = Object.defineProperty;
var D = Object.getOwnPropertyDescriptor;
var x = Object.getOwnPropertyNames;
var R = Object.prototype.hasOwnProperty;
var i = (t, o) => a(t, "name", { value: o, configurable: !0 });
var j = (t, o) => {
for (var n in o)
a(t, n, { get: o[n], enumerable: !0 });
}, P = (t, o, n, e) => {
if (o && typeof o == "object" || typeof o == "function")
for (let r of x(o))
!R.call(t, r) && r !== n && a(t, r, { get: () => o[r], enumerable: !(e = D(o, r)) || e.enumerable });
return t;
};
var S = (t) => P(a({}, "__esModule", { value: !0 }), t);
// src/actions/index.ts
var $ = {};
j($, {
ADDON_ID: () => l,
CLEAR_ID: () => k,
CYCLIC_KEY: () => C,
EVENT_ID: () => m,
PANEL_ID: () => T,
PARAM_KEY: () => I,
action: () => f,
actions: () => Y,
config: () => s,
configureActions: () => F
});
module.exports = S($);
// src/actions/constants.ts
var I = "actions", l = "storybook/actions", T = `${l}/panel`, m = `${l}/action-event`, k = `${l}/action-clear`, C = "$___storybook.isCyclic";
// src/actions/runtime/action.ts
var A = require("storybook/internal/preview-errors"), y = require("@storybook/global"), O = require("storybook/preview-api");
// src/actions/runtime/configureActions.ts
var s = {
depth: 10,
clearOnStoryChange: !0,
limit: 50
}, F = /* @__PURE__ */ i((t = {}) => {
Object.assign(s, t);
}, "configureActions");
// src/actions/runtime/action.ts
var h = /* @__PURE__ */ i((t, o) => {
let n = Object.getPrototypeOf(t);
return !n || o(n) ? n : h(n, o);
}, "findProto"), V = /* @__PURE__ */ i((t) => !!(typeof t == "object" && t && h(t, (o) => /^Synthetic(?:Base)?Event$/.test(o.constructor.name)) &&
typeof t.persist == "function"), "isReactSyntheticEvent"), W = /* @__PURE__ */ i((t) => {
if (V(t)) {
let o = Object.create(
t.constructor.prototype,
Object.getOwnPropertyDescriptors(t)
);
o.persist();
let n = Object.getOwnPropertyDescriptor(o, "view"), e = n?.value;
return typeof e == "object" && e?.constructor.name === "Window" && Object.defineProperty(o, "view", {
...n,
value: Object.create(e.constructor.prototype)
}), o;
}
return t;
}, "serializeArg");
function f(t, o = {}) {
let n = {
...s,
...o
}, e = /* @__PURE__ */ i(function(...c) {
if (o.implicit) {
let u = ("__STORYBOOK_PREVIEW__" in y.global ? y.global.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
(p) => p.phase === "playing" || p.phase === "rendering"
);
if (u) {
let p = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, g = new A.ImplicitActionsDuringRendering({
phase: u.phase,
name: t,
deprecated: p
});
if (p)
console.warn(g);
else
throw g;
}
}
let E = O.addons.getChannel(), b = Date.now().toString(36) + Math.random().toString(36).substring(2), w = 5, d = c.map(W), _ = c.length >
1 ? d : d[0], v = {
id: b,
count: 0,
data: { name: t, args: _ },
options: {
...n,
maxDepth: w + (n.depth || 3)
}
};
E.emit(m, v);
}, "actionHandler");
return e.isAction = !0, e.implicit = o.implicit, e;
}
i(f, "action");
// src/actions/runtime/actions.ts
var Y = /* @__PURE__ */ i((...t) => {
let o = s, n = t;
n.length === 1 && Array.isArray(n[0]) && ([n] = n), n.length !== 1 && typeof n[n.length - 1] != "string" && (o = {
...s,
...n.pop()
});
let e = n[0];
(n.length !== 1 || typeof e == "string") && (e = {}, n.forEach((c) => {
e[c] = c;
}));
let r = {};
return Object.keys(e).forEach((c) => {
r[c] = f(e[c], o);
}), r;
}, "actions");

102
frontend/node_modules/storybook/dist/actions/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,102 @@
declare const PARAM_KEY = "actions";
declare const ADDON_ID = "storybook/actions";
declare const PANEL_ID = "storybook/actions/panel";
declare const EVENT_ID = "storybook/actions/action-event";
declare const CLEAR_ID = "storybook/actions/action-clear";
declare const CYCLIC_KEY = "$___storybook.isCyclic";
interface Options$1 {
allowRegExp: boolean;
allowSymbol: boolean;
allowDate: boolean;
allowUndefined: boolean;
allowError: boolean;
maxDepth: number;
space: number | undefined;
}
interface Options {
depth: number;
clearOnStoryChange: boolean;
limit: number;
implicit: boolean;
id: string;
}
type ActionOptions = Partial<Options> & Partial<Options$1>;
interface ActionDisplay {
id: string;
data: {
name: string;
args: any[];
};
count: number;
options: ActionOptions;
}
type HandlerFunction = (...args: any[]) => void;
type ActionsMap<T extends string = string> = Record<T, HandlerFunction>;
interface ActionsFunction {
<T extends string>(handlerMap: Record<T, string>, options?: ActionOptions): ActionsMap<T>;
<T extends string>(...handlers: T[]): ActionsMap<T>;
<T extends string>(handler1: T, options?: ActionOptions): ActionsMap<T>;
<T extends string>(handler1: T, handler2: T, options?: ActionOptions): ActionsMap<T>;
<T extends string>(handler1: T, handler2: T, handler3: T, options?: ActionOptions): ActionsMap<T>;
<T extends string>(handler1: T, handler2: T, handler3: T, handler4: T, options?: ActionOptions): ActionsMap<T>;
<T extends string>(handler1: T, handler2: T, handler3: T, handler4: T, handler5: T, options?: ActionOptions): ActionsMap<T>;
<T extends string>(handler1: T, handler2: T, handler3: T, handler4: T, handler5: T, handler6: T, options?: ActionOptions): ActionsMap<T>;
<T extends string>(handler1: T, handler2: T, handler3: T, handler4: T, handler5: T, handler6: T, handler7: T, options?: ActionOptions): ActionsMap<T>;
<T extends string>(handler1: T, handler2: T, handler3: T, handler4: T, handler5: T, handler6: T, handler7: T, handler8: T, options?: ActionOptions): ActionsMap<T>;
<T extends string>(handler1: T, handler2: T, handler3: T, handler4: T, handler5: T, handler6: T, handler7: T, handler8: T, handler9: T, options?: ActionOptions): ActionsMap<T>;
<T extends string>(handler1: T, handler2: T, handler3: T, handler4: T, handler5: T, handler6: T, handler7: T, handler8: T, handler9: T, handler10: T, options?: ActionOptions): ActionsMap<T>;
}
type DecoratorFunction = (args: any[]) => any[];
declare function action(name: string, options?: ActionOptions): HandlerFunction;
declare const actions: ActionsFunction;
declare const config: ActionOptions;
declare const configureActions: (options?: ActionOptions) => void;
interface ActionsParameters {
/**
* Actions configuration
*
* @see https://storybook.js.org/docs/essentials/actions#parameters
*/
actions: {
/**
* Create actions for each arg that matches the regex. (**NOT recommended, see below**)
*
* This is quite useful when your component has dozens (or hundreds) of methods and you do not
* want to manually apply the fn utility for each of those methods. However, this is not the
* recommended way of writing actions. That's because automatically inferred args are not
* available as spies in your play function. If you use argTypesRegex and your stories have play
* functions, you will need to also define args with the fn utility to test them in your play
* function.
*
* @example `argTypesRegex: '^on.*'`
*/
argTypesRegex?: string;
/** Remove the addon panel and disable the addon's behavior */
disable?: boolean;
/**
* Binds a standard HTML event handler to the outermost HTML element rendered by your component
* and triggers an action when the event is called for a given selector. The format is
* `<eventname> <selector>`. The selector is optional; it defaults to all elements.
*
* **To enable this feature, you must use the `withActions` decorator.**
*
* @example `handles: ['mouseover', 'click .btn']`
*
* @see https://storybook.js.org/docs/essentials/actions#action-event-handlers
*/
handles?: string[];
};
}
export { ADDON_ID, type ActionDisplay, type ActionOptions, type ActionsFunction, type ActionsMap, type ActionsParameters, CLEAR_ID, CYCLIC_KEY, type DecoratorFunction, EVENT_ID, type HandlerFunction, PANEL_ID, PARAM_KEY, action, actions, config, configureActions };

105
frontend/node_modules/storybook/dist/actions/index.js generated vendored Normal file
View File

@@ -0,0 +1,105 @@
var w = Object.defineProperty;
var i = (o, n) => w(o, "name", { value: n, configurable: !0 });
// src/actions/constants.ts
var P = "actions", a = "storybook/actions", S = `${a}/panel`, f = `${a}/action-event`, I = `${a}/action-clear`, T = "$___storybook.isCyclic";
// src/actions/runtime/action.ts
import { ImplicitActionsDuringRendering as _ } from "storybook/internal/preview-errors";
import { global as d } from "@storybook/global";
import { addons as v } from "storybook/preview-api";
// src/actions/runtime/configureActions.ts
var c = {
depth: 10,
clearOnStoryChange: !0,
limit: 50
}, C = /* @__PURE__ */ i((o = {}) => {
Object.assign(c, o);
}, "configureActions");
// src/actions/runtime/action.ts
var u = /* @__PURE__ */ i((o, n) => {
let t = Object.getPrototypeOf(o);
return !t || n(t) ? t : u(t, n);
}, "findProto"), D = /* @__PURE__ */ i((o) => !!(typeof o == "object" && o && u(o, (n) => /^Synthetic(?:Base)?Event$/.test(n.constructor.name)) &&
typeof o.persist == "function"), "isReactSyntheticEvent"), x = /* @__PURE__ */ i((o) => {
if (D(o)) {
let n = Object.create(
o.constructor.prototype,
Object.getOwnPropertyDescriptors(o)
);
n.persist();
let t = Object.getOwnPropertyDescriptor(n, "view"), e = t?.value;
return typeof e == "object" && e?.constructor.name === "Window" && Object.defineProperty(n, "view", {
...t,
value: Object.create(e.constructor.prototype)
}), n;
}
return o;
}, "serializeArg");
function g(o, n = {}) {
let t = {
...c,
...n
}, e = /* @__PURE__ */ i(function(...r) {
if (n.implicit) {
let m = ("__STORYBOOK_PREVIEW__" in d ? d.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
(s) => s.phase === "playing" || s.phase === "rendering"
);
if (m) {
let s = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, y = new _({
phase: m.phase,
name: o,
deprecated: s
});
if (s)
console.warn(y);
else
throw y;
}
}
let A = v.getChannel(), O = Date.now().toString(36) + Math.random().toString(36).substring(2), h = 5, l = r.map(x), E = r.length > 1 ? l :
l[0], b = {
id: O,
count: 0,
data: { name: o, args: E },
options: {
...t,
maxDepth: h + (t.depth || 3)
}
};
A.emit(f, b);
}, "actionHandler");
return e.isAction = !0, e.implicit = n.implicit, e;
}
i(g, "action");
// src/actions/runtime/actions.ts
var L = /* @__PURE__ */ i((...o) => {
let n = c, t = o;
t.length === 1 && Array.isArray(t[0]) && ([t] = t), t.length !== 1 && typeof t[t.length - 1] != "string" && (n = {
...c,
...t.pop()
});
let e = t[0];
(t.length !== 1 || typeof e == "string") && (e = {}, t.forEach((r) => {
e[r] = r;
}));
let p = {};
return Object.keys(e).forEach((r) => {
p[r] = g(e[r], n);
}), p;
}, "actions");
export {
a as ADDON_ID,
I as CLEAR_ID,
T as CYCLIC_KEY,
f as EVENT_ID,
S as PANEL_ID,
P as PARAM_KEY,
g as action,
L as actions,
c as config,
C as configureActions
};

54126
frontend/node_modules/storybook/dist/babel/index.cjs generated vendored Normal file

File diff suppressed because one or more lines are too long

7507
frontend/node_modules/storybook/dist/babel/index.d.ts generated vendored Normal file

File diff suppressed because one or more lines are too long

54136
frontend/node_modules/storybook/dist/babel/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

102
frontend/node_modules/storybook/dist/bin/index.cjs generated vendored Normal file
View File

@@ -0,0 +1,102 @@
"use strict";
var l = Object.create;
var y = Object.defineProperty;
var d = Object.getOwnPropertyDescriptor;
var p = Object.getOwnPropertyNames;
var v = Object.getPrototypeOf, u = Object.prototype.hasOwnProperty;
var m = (o, t, e, r) => {
if (t && typeof t == "object" || typeof t == "function")
for (let i of p(t))
!u.call(o, i) && i !== e && y(o, i, { get: () => t[i], enumerable: !(r = d(t, i)) || r.enumerable });
return o;
};
var c = (o, t, e) => (e = o != null ? l(v(o)) : {}, m(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
t || !o || !o.__esModule ? y(e, "default", { value: o, enumerable: !0 }) : e,
o
));
// src/bin/index.ts
var a = require("node:child_process"), n = require("node:fs"), b = require("node:path");
// src/common/versions.ts
var k = {
"@storybook/addon-a11y": "9.0.16",
"@storybook/addon-docs": "9.0.16",
"@storybook/addon-jest": "9.0.16",
"@storybook/addon-links": "9.0.16",
"@storybook/addon-onboarding": "9.0.16",
"storybook-addon-pseudo-states": "9.0.16",
"@storybook/addon-themes": "9.0.16",
"@storybook/addon-vitest": "9.0.16",
"@storybook/builder-vite": "9.0.16",
"@storybook/builder-webpack5": "9.0.16",
storybook: "9.0.16",
"@storybook/angular": "9.0.16",
"@storybook/ember": "9.0.16",
"@storybook/html-vite": "9.0.16",
"@storybook/nextjs": "9.0.16",
"@storybook/nextjs-vite": "9.0.16",
"@storybook/preact-vite": "9.0.16",
"@storybook/react-native-web-vite": "9.0.16",
"@storybook/react-vite": "9.0.16",
"@storybook/react-webpack5": "9.0.16",
"@storybook/server-webpack5": "9.0.16",
"@storybook/svelte-vite": "9.0.16",
"@storybook/sveltekit": "9.0.16",
"@storybook/vue3-vite": "9.0.16",
"@storybook/web-components-vite": "9.0.16",
sb: "9.0.16",
"@storybook/cli": "9.0.16",
"@storybook/codemod": "9.0.16",
"@storybook/core-webpack": "9.0.16",
"create-storybook": "9.0.16",
"@storybook/csf-plugin": "9.0.16",
"eslint-plugin-storybook": "9.0.16",
"@storybook/react-dom-shim": "9.0.16",
"@storybook/preset-create-react-app": "9.0.16",
"@storybook/preset-react-webpack": "9.0.16",
"@storybook/preset-server-webpack": "9.0.16",
"@storybook/html": "9.0.16",
"@storybook/preact": "9.0.16",
"@storybook/react": "9.0.16",
"@storybook/server": "9.0.16",
"@storybook/svelte": "9.0.16",
"@storybook/vue3": "9.0.16",
"@storybook/web-components": "9.0.16"
};
// src/bin/index.ts
var s = process.argv.slice(2);
if (["dev", "build", "index"].includes(s[0]))
require("storybook/internal/cli/bin");
else {
let o;
if (s[0] === "init") {
let e;
try {
e = require.resolve("create-storybook/package.json");
} catch {
}
e ? JSON.parse((0, n.readFileSync)(e, "utf-8")).version === k["create-storybook"] && (o = [
"node",
(0, b.join)((0, b.dirname)(e), "bin", "index.cjs"),
...s.slice(1)
]) : o = ["npx", "--yes", `create-storybook@${k.storybook}`, ...s.slice(1)];
} else {
let e;
try {
e = require.resolve("@storybook/cli/package.json");
} catch {
}
e ? JSON.parse((0, n.readFileSync)(e, "utf-8")).version === k["@storybook/cli"] && (o = ["node", (0, b.join)((0, b.dirname)(e), "bin", "\
index.cjs"), ...s]) : o = ["npx", "--yes", `@storybook/cli@${k.storybook}`, ...s];
}
o || (console.error("Could not run storybook cli, please report this as a bug"), process.exit(1)), (0, a.spawn)(o[0], o.slice(1), { stdio: "\
inherit", shell: !0 }).on("exit", (e) => {
e != null && process.exit(e), process.exit(1);
});
}

96
frontend/node_modules/storybook/dist/bin/index.js generated vendored Normal file
View File

@@ -0,0 +1,96 @@
import ESM_COMPAT_Module from "node:module";
import { fileURLToPath as ESM_COMPAT_fileURLToPath } from 'node:url';
import { dirname as ESM_COMPAT_dirname } from 'node:path';
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
const __dirname = ESM_COMPAT_dirname(__filename);
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
var s = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, {
get: (i, o) => (typeof require < "u" ? require : i)[o]
}) : e)(function(e) {
if (typeof require < "u") return require.apply(this, arguments);
throw Error('Dynamic require of "' + e + '" is not supported');
});
// src/bin/index.ts
import { spawn as c } from "node:child_process";
import { readFileSync as k } from "node:fs";
import { dirname as n, join as y } from "node:path";
// src/common/versions.ts
var r = {
"@storybook/addon-a11y": "9.0.16",
"@storybook/addon-docs": "9.0.16",
"@storybook/addon-jest": "9.0.16",
"@storybook/addon-links": "9.0.16",
"@storybook/addon-onboarding": "9.0.16",
"storybook-addon-pseudo-states": "9.0.16",
"@storybook/addon-themes": "9.0.16",
"@storybook/addon-vitest": "9.0.16",
"@storybook/builder-vite": "9.0.16",
"@storybook/builder-webpack5": "9.0.16",
storybook: "9.0.16",
"@storybook/angular": "9.0.16",
"@storybook/ember": "9.0.16",
"@storybook/html-vite": "9.0.16",
"@storybook/nextjs": "9.0.16",
"@storybook/nextjs-vite": "9.0.16",
"@storybook/preact-vite": "9.0.16",
"@storybook/react-native-web-vite": "9.0.16",
"@storybook/react-vite": "9.0.16",
"@storybook/react-webpack5": "9.0.16",
"@storybook/server-webpack5": "9.0.16",
"@storybook/svelte-vite": "9.0.16",
"@storybook/sveltekit": "9.0.16",
"@storybook/vue3-vite": "9.0.16",
"@storybook/web-components-vite": "9.0.16",
sb: "9.0.16",
"@storybook/cli": "9.0.16",
"@storybook/codemod": "9.0.16",
"@storybook/core-webpack": "9.0.16",
"create-storybook": "9.0.16",
"@storybook/csf-plugin": "9.0.16",
"eslint-plugin-storybook": "9.0.16",
"@storybook/react-dom-shim": "9.0.16",
"@storybook/preset-create-react-app": "9.0.16",
"@storybook/preset-react-webpack": "9.0.16",
"@storybook/preset-server-webpack": "9.0.16",
"@storybook/html": "9.0.16",
"@storybook/preact": "9.0.16",
"@storybook/react": "9.0.16",
"@storybook/server": "9.0.16",
"@storybook/svelte": "9.0.16",
"@storybook/vue3": "9.0.16",
"@storybook/web-components": "9.0.16"
};
// src/bin/index.ts
var t = process.argv.slice(2);
if (["dev", "build", "index"].includes(t[0]))
s("storybook/internal/cli/bin");
else {
let e;
if (t[0] === "init") {
let o;
try {
o = s.resolve("create-storybook/package.json");
} catch {
}
o ? JSON.parse(k(o, "utf-8")).version === r["create-storybook"] && (e = [
"node",
y(n(o), "bin", "index.cjs"),
...t.slice(1)
]) : e = ["npx", "--yes", `create-storybook@${r.storybook}`, ...t.slice(1)];
} else {
let o;
try {
o = s.resolve("@storybook/cli/package.json");
} catch {
}
o ? JSON.parse(k(o, "utf-8")).version === r["@storybook/cli"] && (e = ["node", y(n(o), "bin", "index.cjs"), ...t]) : e = ["npx", "--yes",
`@storybook/cli@${r.storybook}`, ...t];
}
e || (console.error("Could not run storybook cli, please report this as a bug"), process.exit(1)), c(e[0], e.slice(1), { stdio: "inherit",
shell: !0 }).on("exit", (o) => {
o != null && process.exit(o), process.exit(1);
});
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,19 @@
import * as esbuild from 'esbuild';
import { BuildOptions } from 'esbuild';
import { Builder, Builder_WithRequiredProperty, BuilderStats } from 'storybook/internal/types';
type ManagerBuilder = Builder<Builder_WithRequiredProperty<BuildOptions, 'outdir'> & {
entryPoints: string[];
}, BuilderStats>;
declare const getConfig: ManagerBuilder['getConfig'];
declare const executor: {
get: () => Promise<typeof esbuild.build>;
};
declare const bail: ManagerBuilder['bail'];
declare const start: ManagerBuilder['start'];
declare const build: ManagerBuilder['build'];
declare const corePresets: ManagerBuilder['corePresets'];
declare const overridePresets: ManagerBuilder['overridePresets'];
export { bail, build, corePresets, executor, getConfig, overridePresets, start };

File diff suppressed because it is too large Load Diff

1983
frontend/node_modules/storybook/dist/channels/index.cjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,108 @@
interface Config {
page: 'manager' | 'preview';
}
type ChannelHandler = (event: ChannelEvent) => void;
interface ChannelTransport {
send(event: ChannelEvent, options?: any): void;
setHandler(handler: ChannelHandler): void;
}
interface ChannelEvent {
type: string;
from: string;
args: any[];
}
interface Listener {
(...args: any[]): void;
}
interface ChannelArgsSingle {
transport?: ChannelTransport;
async?: boolean;
}
interface ChannelArgsMulti {
transports: ChannelTransport[];
async?: boolean;
}
declare class Channel {
readonly isAsync: boolean;
private sender;
private events;
private data;
private readonly transports;
constructor(input: ChannelArgsMulti);
constructor(input: ChannelArgsSingle);
get hasTransport(): boolean;
addListener(eventName: string, listener: Listener): void;
emit(eventName: string, ...args: any): void;
last(eventName: string): any;
eventNames(): string[];
listenerCount(eventName: string): number;
listeners(eventName: string): Listener[] | undefined;
once(eventName: string, listener: Listener): void;
removeAllListeners(eventName?: string): void;
removeListener(eventName: string, listener: Listener): void;
on(eventName: string, listener: Listener): void;
off(eventName: string, listener: Listener): void;
private handleEvent;
private onceListener;
}
declare class PostMessageTransport implements ChannelTransport {
private readonly config;
private buffer;
private handler?;
private connected;
constructor(config: Config);
setHandler(handler: ChannelHandler): void;
/**
* Sends `event` to the associated window. If the window does not yet exist the event will be
* stored in a buffer and sent when the window exists.
*
* @param event
*/
send(event: ChannelEvent, options?: any): Promise<any>;
private flush;
private getFrames;
private getCurrentFrames;
private getLocalFrame;
private handleEvent;
}
type OnError = (message: Event) => void;
interface WebsocketTransportArgs extends Partial<Config> {
url: string;
onError: OnError;
}
declare const HEARTBEAT_INTERVAL = 15000;
declare const HEARTBEAT_MAX_LATENCY = 5000;
declare class WebsocketTransport implements ChannelTransport {
private buffer;
private handler?;
private socket;
private isReady;
private isClosed;
private pingTimeout;
private heartbeat;
constructor({ url, onError, page }: WebsocketTransportArgs);
setHandler(handler: ChannelHandler): void;
send(event: any): void;
private sendLater;
private sendNow;
private flush;
}
type Options = Config & {
extraTransports?: ChannelTransport[];
};
/**
* Creates a new browser channel instance.
*
* @param {Options} options - The options object.
* @param {Page} options.page - Page identifier.
* @param {ChannelTransport[]} [options.extraTransports=[]] - An optional array of extra channel
* transports. Default is `[]`
* @returns {Channel} - The new channel instance.
*/
declare function createBrowserChannel({ page, extraTransports }: Options): Channel;
export { Channel, type ChannelEvent, type ChannelHandler, type ChannelTransport, HEARTBEAT_INTERVAL, HEARTBEAT_MAX_LATENCY, type Listener, PostMessageTransport, WebsocketTransport, createBrowserChannel, Channel as default };

1914
frontend/node_modules/storybook/dist/channels/index.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

6136
frontend/node_modules/storybook/dist/cli/bin/index.cjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
export { }

6158
frontend/node_modules/storybook/dist/cli/bin/index.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

79911
frontend/node_modules/storybook/dist/cli/index.cjs generated vendored Normal file

File diff suppressed because one or more lines are too long

1884
frontend/node_modules/storybook/dist/cli/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

79940
frontend/node_modules/storybook/dist/cli/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,80 @@
"use strict";
var s = Object.defineProperty;
var L = Object.getOwnPropertyDescriptor;
var v = Object.getOwnPropertyNames;
var b = Object.prototype.hasOwnProperty;
var t = (r, e) => s(r, "name", { value: e, configurable: !0 });
var w = (r, e) => {
for (var n in e)
s(r, n, { get: e[n], enumerable: !0 });
}, h = (r, e, n, i) => {
if (e && typeof e == "object" || typeof e == "function")
for (let c of v(e))
!b.call(r, c) && c !== n && s(r, c, { get: () => e[c], enumerable: !(i = L(e, c)) || i.enumerable });
return r;
};
var m = (r) => h(s({}, "__esModule", { value: !0 }), r);
// src/client-logger/index.ts
var k = {};
w(k, {
deprecate: () => F,
logger: () => y,
once: () => o,
pretty: () => a
});
module.exports = m(k);
var p = require("@storybook/global");
var { LOGLEVEL: x } = p.global, g = {
trace: 1,
debug: 2,
info: 3,
warn: 4,
error: 5,
silent: 10
}, R = x, l = g[R] || g.info, y = {
trace: /* @__PURE__ */ t((r, ...e) => {
l <= g.trace && console.trace(r, ...e);
}, "trace"),
debug: /* @__PURE__ */ t((r, ...e) => {
l <= g.debug && console.debug(r, ...e);
}, "debug"),
info: /* @__PURE__ */ t((r, ...e) => {
l <= g.info && console.info(r, ...e);
}, "info"),
warn: /* @__PURE__ */ t((r, ...e) => {
l <= g.warn && console.warn(r, ...e);
}, "warn"),
error: /* @__PURE__ */ t((r, ...e) => {
l <= g.error && console.error(r, ...e);
}, "error"),
log: /* @__PURE__ */ t((r, ...e) => {
l < g.silent && console.log(r, ...e);
}, "log")
}, d = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ t((r) => (e, ...n) => {
if (!d.has(e))
return d.add(e), y[r](e, ...n);
}, "once");
o.clear = () => d.clear();
o.trace = o("trace");
o.debug = o("debug");
o.info = o("info");
o.warn = o("warn");
o.error = o("error");
o.log = o("log");
var F = o("warn"), a = /* @__PURE__ */ t((r) => (...e) => {
let n = [];
if (e.length) {
let i = /<span\s+style=(['"])([^'"]*)\1\s*>/gi, c = /<\/span>/gi, u;
for (n.push(e[0].replace(i, "%c").replace(c, "%c")); u = i.exec(e[0]); )
n.push(u[2]), n.push("");
for (let f = 1; f < e.length; f++)
n.push(e[f]);
}
y[r].apply(y, n);
}, "pretty");
a.trace = a("trace");
a.debug = a("debug");
a.info = a("info");
a.warn = a("warn");
a.error = a("error");

View File

@@ -0,0 +1,30 @@
type LoggingFn = (message: any, ...args: any[]) => void;
declare const logger: {
readonly trace: (message: any, ...rest: any[]) => void;
readonly debug: (message: any, ...rest: any[]) => void;
readonly info: (message: any, ...rest: any[]) => void;
readonly warn: (message: any, ...rest: any[]) => void;
readonly error: (message: any, ...rest: any[]) => void;
readonly log: (message: any, ...rest: any[]) => void;
};
declare const once: {
(type: keyof typeof logger): (message: any, ...rest: any[]) => void;
clear(): void;
trace: (message: any, ...rest: any[]) => void;
debug: (message: any, ...rest: any[]) => void;
info: (message: any, ...rest: any[]) => void;
warn: (message: any, ...rest: any[]) => void;
error: (message: any, ...rest: any[]) => void;
log: (message: any, ...rest: any[]) => void;
};
declare const deprecate: (message: any, ...rest: any[]) => void;
declare const pretty: {
(type: keyof typeof logger): (...args: Parameters<LoggingFn>) => void;
trace: (message: any, ...args: any[]) => void;
debug: (message: any, ...args: any[]) => void;
info: (message: any, ...args: any[]) => void;
warn: (message: any, ...args: any[]) => void;
error: (message: any, ...args: any[]) => void;
};
export { deprecate, logger, once, pretty };

View File

@@ -0,0 +1,64 @@
var u = Object.defineProperty;
var a = (r, e) => u(r, "name", { value: e, configurable: !0 });
// src/client-logger/index.ts
import { global as p } from "@storybook/global";
var { LOGLEVEL: L } = p, t = {
trace: 1,
debug: 2,
info: 3,
warn: 4,
error: 5,
silent: 10
}, v = L, c = t[v] || t.info, i = {
trace: /* @__PURE__ */ a((r, ...e) => {
c <= t.trace && console.trace(r, ...e);
}, "trace"),
debug: /* @__PURE__ */ a((r, ...e) => {
c <= t.debug && console.debug(r, ...e);
}, "debug"),
info: /* @__PURE__ */ a((r, ...e) => {
c <= t.info && console.info(r, ...e);
}, "info"),
warn: /* @__PURE__ */ a((r, ...e) => {
c <= t.warn && console.warn(r, ...e);
}, "warn"),
error: /* @__PURE__ */ a((r, ...e) => {
c <= t.error && console.error(r, ...e);
}, "error"),
log: /* @__PURE__ */ a((r, ...e) => {
c < t.silent && console.log(r, ...e);
}, "log")
}, s = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ a((r) => (e, ...g) => {
if (!s.has(e))
return s.add(e), i[r](e, ...g);
}, "once");
o.clear = () => s.clear();
o.trace = o("trace");
o.debug = o("debug");
o.info = o("info");
o.warn = o("warn");
o.error = o("error");
o.log = o("log");
var h = o("warn"), n = /* @__PURE__ */ a((r) => (...e) => {
let g = [];
if (e.length) {
let y = /<span\s+style=(['"])([^'"]*)\1\s*>/gi, d = /<\/span>/gi, f;
for (g.push(e[0].replace(y, "%c").replace(d, "%c")); f = y.exec(e[0]); )
g.push(f[2]), g.push("");
for (let l = 1; l < e.length; l++)
g.push(e[l]);
}
i[r].apply(i, g);
}, "pretty");
n.trace = n("trace");
n.debug = n("debug");
n.info = n("info");
n.warn = n("warn");
n.error = n("error");
export {
h as deprecate,
i as logger,
o as once,
n as pretty
};

27826
frontend/node_modules/storybook/dist/common/index.cjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

1252
frontend/node_modules/storybook/dist/common/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

27924
frontend/node_modules/storybook/dist/common/index.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

23714
frontend/node_modules/storybook/dist/components/index.cjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

13083
frontend/node_modules/storybook/dist/components/index.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,5 @@
import { DecoratorFunction } from 'storybook/internal/types';
declare const withControls: DecoratorFunction;
export { withControls };

View File

@@ -0,0 +1,8 @@
var n = Object.defineProperty;
var r = (t, o) => n(t, "name", { value: o, configurable: !0 });
// src/controls/decorator.ts
var a = /* @__PURE__ */ r((t, o) => t(o), "withControls");
export {
a as withControls
};

View File

@@ -0,0 +1,26 @@
"use strict";
var n = Object.defineProperty;
var e = Object.getOwnPropertyDescriptor;
var p = Object.getOwnPropertyNames;
var x = Object.prototype.hasOwnProperty;
var a = (t, o) => {
for (var s in o)
n(t, s, { get: o[s], enumerable: !0 });
}, A = (t, o, s, c) => {
if (o && typeof o == "object" || typeof o == "function")
for (let r of p(o))
!x.call(t, r) && r !== s && n(t, r, { get: () => o[r], enumerable: !(c = e(o, r)) || c.enumerable });
return t;
};
var D = (t) => A(n({}, "__esModule", { value: !0 }), t);
// src/controls/index.ts
var l = {};
a(l, {
ADDON_ID: () => d,
PARAM_KEY: () => f
});
module.exports = D(l);
// src/controls/constants.ts
var d = "addon-controls", f = "controls";

View File

@@ -0,0 +1,39 @@
declare const ADDON_ID: "addon-controls";
declare const PARAM_KEY: "controls";
interface ControlsParameters {
/**
* Controls configuration
*
* @see https://storybook.js.org/docs/essentials/controls#parameters-1
*/
controls: {
/** Remove the addon panel and disable the addon's behavior */
disable?: boolean;
/** Disable the ability to create or edit stories from the Controls panel */
disableSaveFromUI?: boolean;
/** Exclude specific properties from the Controls panel */
exclude?: string[] | RegExp;
/**
* Show the full documentation for each property in the Controls addon panel, including the
* description and default value.
*/
expanded?: boolean;
/** Exclude only specific properties in the Controls panel */
include?: string[] | RegExp;
/**
* Preset color swatches for the color picker control
*
* @example PresetColors: [{ color: '#ff4785', title: 'Coral' }, 'rgba(0, 159, 183, 1)',
* '#fe4a49']
*/
presetColors?: Array<string | {
color: string;
title?: string;
}>;
/** Controls sorting order */
sort?: 'none' | 'alpha' | 'requiredFirst';
};
}
export { ADDON_ID, type ControlsParameters, PARAM_KEY };

View File

@@ -0,0 +1,6 @@
// src/controls/constants.ts
var o = "addon-controls", t = "controls";
export {
o as ADDON_ID,
t as PARAM_KEY
};

View File

@@ -0,0 +1,155 @@
"use strict";
var O = Object.defineProperty;
var r = Object.getOwnPropertyDescriptor;
var D = Object.getOwnPropertyNames;
var I = Object.prototype.hasOwnProperty;
var o = (S, R) => {
for (var T in R)
O(S, T, { get: R[T], enumerable: !0 });
}, C = (S, R, T, N) => {
if (R && typeof R == "object" || typeof R == "function")
for (let _ of D(R))
!I.call(S, _) && _ !== T && O(S, _, { get: () => R[_], enumerable: !(N = r(R, _)) || N.enumerable });
return S;
};
var P = (S) => C(O({}, "__esModule", { value: !0 }), S);
// src/core-events/index.ts
var HE = {};
o(HE, {
ARGTYPES_INFO_REQUEST: () => aE,
ARGTYPES_INFO_RESPONSE: () => UE,
CHANNEL_CREATED: () => a,
CHANNEL_WS_DISCONNECT: () => Y,
CONFIG_ERROR: () => U,
CREATE_NEW_STORYFILE_REQUEST: () => H,
CREATE_NEW_STORYFILE_RESPONSE: () => G,
CURRENT_STORY_WAS_SET: () => W,
DOCS_PREPARED: () => d,
DOCS_RENDERED: () => t,
FILE_COMPONENT_SEARCH_REQUEST: () => p,
FILE_COMPONENT_SEARCH_RESPONSE: () => i,
FORCE_REMOUNT: () => l,
FORCE_RE_RENDER: () => F,
GLOBALS_UPDATED: () => y,
NAVIGATE_URL: () => e,
PLAY_FUNCTION_THREW_EXCEPTION: () => c,
PRELOAD_ENTRIES: () => f,
PREVIEW_BUILDER_PROGRESS: () => g,
PREVIEW_KEYDOWN: () => u,
REGISTER_SUBSCRIPTION: () => s,
REQUEST_WHATS_NEW_DATA: () => DE,
RESET_STORY_ARGS: () => x,
RESULT_WHATS_NEW_DATA: () => IE,
SAVE_STORY_REQUEST: () => LE,
SAVE_STORY_RESPONSE: () => YE,
SELECT_STORY: () => m,
SET_CONFIG: () => M,
SET_CURRENT_STORY: () => Q,
SET_FILTER: () => V,
SET_GLOBALS: () => w,
SET_INDEX: () => B,
SET_STORIES: () => X,
SET_WHATS_NEW_CACHE: () => oE,
SHARED_STATE_CHANGED: () => b,
SHARED_STATE_SET: () => q,
STORIES_COLLAPSE_ALL: () => K,
STORIES_EXPAND_ALL: () => j,
STORY_ARGS_UPDATED: () => k,
STORY_CHANGED: () => z,
STORY_ERRORED: () => J,
STORY_FINISHED: () => RE,
STORY_HOT_UPDATED: () => OE,
STORY_INDEX_INVALIDATED: () => Z,
STORY_MISSING: () => $,
STORY_PREPARED: () => n,
STORY_RENDERED: () => EE,
STORY_RENDER_PHASE_CHANGED: () => v,
STORY_SPECIFIED: () => SE,
STORY_THREW_EXCEPTION: () => _E,
STORY_UNCHANGED: () => TE,
TELEMETRY_ERROR: () => PE,
TOGGLE_WHATS_NEW_NOTIFICATIONS: () => CE,
UNHANDLED_ERRORS_WHILE_PLAYING: () => h,
UPDATE_GLOBALS: () => AE,
UPDATE_QUERY_PARAMS: () => NE,
UPDATE_STORY_ARGS: () => rE,
default: () => L
});
module.exports = P(HE);
var A = /* @__PURE__ */ ((E) => (E.CHANNEL_WS_DISCONNECT = "channelWSDisconnect", E.CHANNEL_CREATED = "channelCreated", E.CONFIG_ERROR = "co\
nfigError", E.STORY_INDEX_INVALIDATED = "storyIndexInvalidated", E.STORY_SPECIFIED = "storySpecified", E.SET_CONFIG = "setConfig", E.SET_STORIES =
"setStories", E.SET_INDEX = "setIndex", E.SET_CURRENT_STORY = "setCurrentStory", E.CURRENT_STORY_WAS_SET = "currentStoryWasSet", E.FORCE_RE_RENDER =
"forceReRender", E.FORCE_REMOUNT = "forceRemount", E.PRELOAD_ENTRIES = "preloadStories", E.STORY_PREPARED = "storyPrepared", E.DOCS_PREPARED =
"docsPrepared", E.STORY_CHANGED = "storyChanged", E.STORY_UNCHANGED = "storyUnchanged", E.STORY_RENDERED = "storyRendered", E.STORY_FINISHED =
"storyFinished", E.STORY_MISSING = "storyMissing", E.STORY_ERRORED = "storyErrored", E.STORY_THREW_EXCEPTION = "storyThrewException", E.STORY_RENDER_PHASE_CHANGED =
"storyRenderPhaseChanged", E.STORY_HOT_UPDATED = "storyHotUpdated", E.PLAY_FUNCTION_THREW_EXCEPTION = "playFunctionThrewException", E.UNHANDLED_ERRORS_WHILE_PLAYING =
"unhandledErrorsWhilePlaying", E.UPDATE_STORY_ARGS = "updateStoryArgs", E.STORY_ARGS_UPDATED = "storyArgsUpdated", E.RESET_STORY_ARGS = "res\
etStoryArgs", E.SET_FILTER = "setFilter", E.SET_GLOBALS = "setGlobals", E.UPDATE_GLOBALS = "updateGlobals", E.GLOBALS_UPDATED = "globalsUpda\
ted", E.REGISTER_SUBSCRIPTION = "registerSubscription", E.PREVIEW_KEYDOWN = "previewKeydown", E.PREVIEW_BUILDER_PROGRESS = "preview_builder_\
progress", E.SELECT_STORY = "selectStory", E.STORIES_COLLAPSE_ALL = "storiesCollapseAll", E.STORIES_EXPAND_ALL = "storiesExpandAll", E.DOCS_RENDERED =
"docsRendered", E.SHARED_STATE_CHANGED = "sharedStateChanged", E.SHARED_STATE_SET = "sharedStateSet", E.NAVIGATE_URL = "navigateUrl", E.UPDATE_QUERY_PARAMS =
"updateQueryParams", E.REQUEST_WHATS_NEW_DATA = "requestWhatsNewData", E.RESULT_WHATS_NEW_DATA = "resultWhatsNewData", E.SET_WHATS_NEW_CACHE =
"setWhatsNewCache", E.TOGGLE_WHATS_NEW_NOTIFICATIONS = "toggleWhatsNewNotifications", E.TELEMETRY_ERROR = "telemetryError", E.FILE_COMPONENT_SEARCH_REQUEST =
"fileComponentSearchRequest", E.FILE_COMPONENT_SEARCH_RESPONSE = "fileComponentSearchResponse", E.SAVE_STORY_REQUEST = "saveStoryRequest", E.
SAVE_STORY_RESPONSE = "saveStoryResponse", E.ARGTYPES_INFO_REQUEST = "argtypesInfoRequest", E.ARGTYPES_INFO_RESPONSE = "argtypesInfoResponse",
E.CREATE_NEW_STORYFILE_REQUEST = "createNewStoryfileRequest", E.CREATE_NEW_STORYFILE_RESPONSE = "createNewStoryfileResponse", E))(A || {}), L = A,
{
CHANNEL_WS_DISCONNECT: Y,
CHANNEL_CREATED: a,
CONFIG_ERROR: U,
CREATE_NEW_STORYFILE_REQUEST: H,
CREATE_NEW_STORYFILE_RESPONSE: G,
CURRENT_STORY_WAS_SET: W,
DOCS_PREPARED: d,
DOCS_RENDERED: t,
FILE_COMPONENT_SEARCH_REQUEST: p,
FILE_COMPONENT_SEARCH_RESPONSE: i,
FORCE_RE_RENDER: F,
FORCE_REMOUNT: l,
GLOBALS_UPDATED: y,
NAVIGATE_URL: e,
PLAY_FUNCTION_THREW_EXCEPTION: c,
UNHANDLED_ERRORS_WHILE_PLAYING: h,
PRELOAD_ENTRIES: f,
PREVIEW_BUILDER_PROGRESS: g,
PREVIEW_KEYDOWN: u,
REGISTER_SUBSCRIPTION: s,
RESET_STORY_ARGS: x,
SELECT_STORY: m,
SET_CONFIG: M,
SET_CURRENT_STORY: Q,
SET_FILTER: V,
SET_GLOBALS: w,
SET_INDEX: B,
SET_STORIES: X,
SHARED_STATE_CHANGED: b,
SHARED_STATE_SET: q,
STORIES_COLLAPSE_ALL: K,
STORIES_EXPAND_ALL: j,
STORY_ARGS_UPDATED: k,
STORY_CHANGED: z,
STORY_ERRORED: J,
STORY_INDEX_INVALIDATED: Z,
STORY_MISSING: $,
STORY_PREPARED: n,
STORY_RENDER_PHASE_CHANGED: v,
STORY_RENDERED: EE,
STORY_FINISHED: RE,
STORY_SPECIFIED: SE,
STORY_THREW_EXCEPTION: _E,
STORY_UNCHANGED: TE,
STORY_HOT_UPDATED: OE,
UPDATE_GLOBALS: AE,
UPDATE_QUERY_PARAMS: NE,
UPDATE_STORY_ARGS: rE,
REQUEST_WHATS_NEW_DATA: DE,
RESULT_WHATS_NEW_DATA: IE,
SET_WHATS_NEW_CACHE: oE,
TOGGLE_WHATS_NEW_NOTIFICATIONS: CE,
TELEMETRY_ERROR: PE,
SAVE_STORY_REQUEST: LE,
SAVE_STORY_RESPONSE: YE,
ARGTYPES_INFO_REQUEST: aE,
ARGTYPES_INFO_RESPONSE: UE
} = A;

View File

@@ -0,0 +1,350 @@
import { Report } from 'storybook/preview-api';
interface CreateNewStoryRequestPayload {
componentFilePath: string;
componentExportName: string;
componentIsDefaultExport: boolean;
componentExportCount: number;
}
interface CreateNewStoryResponsePayload {
storyId: string;
storyFilePath: string;
exportedStoryName: string;
}
type CreateNewStoryErrorPayload = {
type: 'STORY_FILE_EXISTS';
kind: string;
};
interface FileComponentSearchRequestPayload {
}
interface FileComponentSearchResponsePayload {
files: Array<{
filepath: string;
storyFileExists: boolean;
exportedComponents: Array<{
name: string;
default: boolean;
}> | null;
}> | null;
}
declare global {
interface SymbolConstructor {
readonly observable: symbol;
}
}
interface SBBaseType {
required?: boolean;
raw?: string;
}
type SBScalarType = SBBaseType & {
name: 'boolean' | 'string' | 'number' | 'function' | 'symbol';
};
type SBArrayType = SBBaseType & {
name: 'array';
value: SBType;
};
type SBObjectType = SBBaseType & {
name: 'object';
value: Record<string, SBType>;
};
type SBEnumType = SBBaseType & {
name: 'enum';
value: (string | number)[];
};
type SBIntersectionType = SBBaseType & {
name: 'intersection';
value: SBType[];
};
type SBUnionType = SBBaseType & {
name: 'union';
value: SBType[];
};
type SBOtherType = SBBaseType & {
name: 'other';
value: string;
};
type SBType = SBScalarType | SBEnumType | SBArrayType | SBObjectType | SBIntersectionType | SBUnionType | SBOtherType;
type ControlType = 'object' | 'boolean' | 'check' | 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select' | 'number' | 'range' | 'file' | 'color' | 'date' | 'text';
type ConditionalTest = {
truthy?: boolean;
} | {
exists: boolean;
} | {
eq: any;
} | {
neq: any;
};
type ConditionalValue = {
arg: string;
} | {
global: string;
};
type Conditional = ConditionalValue & ConditionalTest;
interface ControlBase {
[key: string]: any;
/** @see https://storybook.js.org/docs/api/arg-types#controltype */
type?: ControlType;
disable?: boolean;
}
type Control = ControlType | false | (ControlBase & (ControlBase | {
type: 'color';
/** @see https://storybook.js.org/docs/api/arg-types#controlpresetcolors */
presetColors?: string[];
} | {
type: 'file';
/** @see https://storybook.js.org/docs/api/arg-types#controlaccept */
accept?: string;
} | {
type: 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select';
/** @see https://storybook.js.org/docs/api/arg-types#controllabels */
labels?: {
[options: string]: string;
};
} | {
type: 'number' | 'range';
/** @see https://storybook.js.org/docs/api/arg-types#controlmax */
max?: number;
/** @see https://storybook.js.org/docs/api/arg-types#controlmin */
min?: number;
/** @see https://storybook.js.org/docs/api/arg-types#controlstep */
step?: number;
}));
interface InputType {
/** @see https://storybook.js.org/docs/api/arg-types#control */
control?: Control;
/** @see https://storybook.js.org/docs/api/arg-types#description */
description?: string;
/** @see https://storybook.js.org/docs/api/arg-types#if */
if?: Conditional;
/** @see https://storybook.js.org/docs/api/arg-types#mapping */
mapping?: {
[key: string]: any;
};
/** @see https://storybook.js.org/docs/api/arg-types#name */
name?: string;
/** @see https://storybook.js.org/docs/api/arg-types#options */
options?: readonly any[];
/** @see https://storybook.js.org/docs/api/arg-types#table */
table?: {
[key: string]: unknown;
/** @see https://storybook.js.org/docs/api/arg-types#tablecategory */
category?: string;
/** @see https://storybook.js.org/docs/api/arg-types#tabledefaultvalue */
defaultValue?: {
summary?: string;
detail?: string;
};
/** @see https://storybook.js.org/docs/api/arg-types#tabledisable */
disable?: boolean;
/** @see https://storybook.js.org/docs/api/arg-types#tablesubcategory */
subcategory?: string;
/** @see https://storybook.js.org/docs/api/arg-types#tabletype */
type?: {
summary?: string;
detail?: string;
};
};
/** @see https://storybook.js.org/docs/api/arg-types#type */
type?: SBType | SBScalarType['name'];
/**
* @deprecated Use `table.defaultValue.summary` instead.
* @see https://storybook.js.org/docs/api/arg-types#defaultvalue
*/
defaultValue?: any;
[key: string]: any;
}
interface Args {
[name: string]: any;
}
/** @see https://storybook.js.org/docs/api/arg-types#argtypes */
type ArgTypes<TArgs = Args> = {
[name in keyof TArgs]: InputType;
};
interface ArgTypesRequestPayload {
storyId: string;
}
interface ArgTypesResponsePayload {
argTypes: ArgTypes;
}
type RequestData<Payload = void> = {
id: string;
payload: Payload;
};
type ResponseData<Payload = void, ErrorPayload extends Record<string, any> | void = void> = {
id: string;
success: true;
error: null;
payload: Payload;
} | {
id: string;
success: false;
error: string;
payload?: ErrorPayload;
};
interface SaveStoryRequestPayload {
args: string | undefined;
csfId: string;
importPath: string;
name?: string;
}
interface SaveStoryResponsePayload {
csfId: string;
newStoryId?: string;
newStoryName?: string;
newStoryExportName?: string;
sourceFileContent?: string;
sourceFileName?: string;
sourceStoryName?: string;
sourceStoryExportName?: string;
}
interface WhatsNewCache {
lastDismissedPost?: string;
lastReadPost?: string;
}
type WhatsNewData = {
status: 'SUCCESS';
title: string;
url: string;
blogUrl?: string;
publishedAt: string;
excerpt: string;
postIsRead: boolean;
showNotification: boolean;
disableWhatsNewNotifications: boolean;
} | {
status: 'ERROR';
};
interface StoryFinishedPayload {
storyId: string;
status: 'error' | 'success';
reporters: Report[];
}
declare enum events {
CHANNEL_WS_DISCONNECT = "channelWSDisconnect",
CHANNEL_CREATED = "channelCreated",
CONFIG_ERROR = "configError",
STORY_INDEX_INVALIDATED = "storyIndexInvalidated",
STORY_SPECIFIED = "storySpecified",
SET_CONFIG = "setConfig",
SET_STORIES = "setStories",
SET_INDEX = "setIndex",
SET_CURRENT_STORY = "setCurrentStory",
CURRENT_STORY_WAS_SET = "currentStoryWasSet",
FORCE_RE_RENDER = "forceReRender",
FORCE_REMOUNT = "forceRemount",
PRELOAD_ENTRIES = "preloadStories",
STORY_PREPARED = "storyPrepared",
DOCS_PREPARED = "docsPrepared",
STORY_CHANGED = "storyChanged",
STORY_UNCHANGED = "storyUnchanged",
STORY_RENDERED = "storyRendered",
STORY_FINISHED = "storyFinished",
STORY_MISSING = "storyMissing",
STORY_ERRORED = "storyErrored",
STORY_THREW_EXCEPTION = "storyThrewException",
STORY_RENDER_PHASE_CHANGED = "storyRenderPhaseChanged",
STORY_HOT_UPDATED = "storyHotUpdated",
PLAY_FUNCTION_THREW_EXCEPTION = "playFunctionThrewException",
UNHANDLED_ERRORS_WHILE_PLAYING = "unhandledErrorsWhilePlaying",
UPDATE_STORY_ARGS = "updateStoryArgs",
STORY_ARGS_UPDATED = "storyArgsUpdated",
RESET_STORY_ARGS = "resetStoryArgs",
SET_FILTER = "setFilter",
SET_GLOBALS = "setGlobals",
UPDATE_GLOBALS = "updateGlobals",
GLOBALS_UPDATED = "globalsUpdated",
REGISTER_SUBSCRIPTION = "registerSubscription",
PREVIEW_KEYDOWN = "previewKeydown",
PREVIEW_BUILDER_PROGRESS = "preview_builder_progress",
SELECT_STORY = "selectStory",
STORIES_COLLAPSE_ALL = "storiesCollapseAll",
STORIES_EXPAND_ALL = "storiesExpandAll",
DOCS_RENDERED = "docsRendered",
SHARED_STATE_CHANGED = "sharedStateChanged",
SHARED_STATE_SET = "sharedStateSet",
NAVIGATE_URL = "navigateUrl",
UPDATE_QUERY_PARAMS = "updateQueryParams",
REQUEST_WHATS_NEW_DATA = "requestWhatsNewData",
RESULT_WHATS_NEW_DATA = "resultWhatsNewData",
SET_WHATS_NEW_CACHE = "setWhatsNewCache",
TOGGLE_WHATS_NEW_NOTIFICATIONS = "toggleWhatsNewNotifications",
TELEMETRY_ERROR = "telemetryError",
FILE_COMPONENT_SEARCH_REQUEST = "fileComponentSearchRequest",
FILE_COMPONENT_SEARCH_RESPONSE = "fileComponentSearchResponse",
SAVE_STORY_REQUEST = "saveStoryRequest",
SAVE_STORY_RESPONSE = "saveStoryResponse",
ARGTYPES_INFO_REQUEST = "argtypesInfoRequest",
ARGTYPES_INFO_RESPONSE = "argtypesInfoResponse",
CREATE_NEW_STORYFILE_REQUEST = "createNewStoryfileRequest",
CREATE_NEW_STORYFILE_RESPONSE = "createNewStoryfileResponse"
}
declare const CHANNEL_WS_DISCONNECT: events;
declare const CHANNEL_CREATED: events;
declare const CONFIG_ERROR: events;
declare const CREATE_NEW_STORYFILE_REQUEST: events;
declare const CREATE_NEW_STORYFILE_RESPONSE: events;
declare const CURRENT_STORY_WAS_SET: events;
declare const DOCS_PREPARED: events;
declare const DOCS_RENDERED: events;
declare const FILE_COMPONENT_SEARCH_REQUEST: events;
declare const FILE_COMPONENT_SEARCH_RESPONSE: events;
declare const FORCE_RE_RENDER: events;
declare const FORCE_REMOUNT: events;
declare const GLOBALS_UPDATED: events;
declare const NAVIGATE_URL: events;
declare const PLAY_FUNCTION_THREW_EXCEPTION: events;
declare const UNHANDLED_ERRORS_WHILE_PLAYING: events;
declare const PRELOAD_ENTRIES: events;
declare const PREVIEW_BUILDER_PROGRESS: events;
declare const PREVIEW_KEYDOWN: events;
declare const REGISTER_SUBSCRIPTION: events;
declare const RESET_STORY_ARGS: events;
declare const SELECT_STORY: events;
declare const SET_CONFIG: events;
declare const SET_CURRENT_STORY: events;
declare const SET_FILTER: events;
declare const SET_GLOBALS: events;
declare const SET_INDEX: events;
declare const SET_STORIES: events;
declare const SHARED_STATE_CHANGED: events;
declare const SHARED_STATE_SET: events;
declare const STORIES_COLLAPSE_ALL: events;
declare const STORIES_EXPAND_ALL: events;
declare const STORY_ARGS_UPDATED: events;
declare const STORY_CHANGED: events;
declare const STORY_ERRORED: events;
declare const STORY_INDEX_INVALIDATED: events;
declare const STORY_MISSING: events;
declare const STORY_PREPARED: events;
declare const STORY_RENDER_PHASE_CHANGED: events;
declare const STORY_RENDERED: events;
declare const STORY_FINISHED: events;
declare const STORY_SPECIFIED: events;
declare const STORY_THREW_EXCEPTION: events;
declare const STORY_UNCHANGED: events;
declare const STORY_HOT_UPDATED: events;
declare const UPDATE_GLOBALS: events;
declare const UPDATE_QUERY_PARAMS: events;
declare const UPDATE_STORY_ARGS: events;
declare const REQUEST_WHATS_NEW_DATA: events;
declare const RESULT_WHATS_NEW_DATA: events;
declare const SET_WHATS_NEW_CACHE: events;
declare const TOGGLE_WHATS_NEW_NOTIFICATIONS: events;
declare const TELEMETRY_ERROR: events;
declare const SAVE_STORY_REQUEST: events;
declare const SAVE_STORY_RESPONSE: events;
declare const ARGTYPES_INFO_REQUEST: events;
declare const ARGTYPES_INFO_RESPONSE: events;
export { ARGTYPES_INFO_REQUEST, ARGTYPES_INFO_RESPONSE, type ArgTypesRequestPayload, type ArgTypesResponsePayload, CHANNEL_CREATED, CHANNEL_WS_DISCONNECT, CONFIG_ERROR, CREATE_NEW_STORYFILE_REQUEST, CREATE_NEW_STORYFILE_RESPONSE, CURRENT_STORY_WAS_SET, type CreateNewStoryErrorPayload, type CreateNewStoryRequestPayload, type CreateNewStoryResponsePayload, DOCS_PREPARED, DOCS_RENDERED, FILE_COMPONENT_SEARCH_REQUEST, FILE_COMPONENT_SEARCH_RESPONSE, FORCE_REMOUNT, FORCE_RE_RENDER, type FileComponentSearchRequestPayload, type FileComponentSearchResponsePayload, GLOBALS_UPDATED, NAVIGATE_URL, PLAY_FUNCTION_THREW_EXCEPTION, PRELOAD_ENTRIES, PREVIEW_BUILDER_PROGRESS, PREVIEW_KEYDOWN, REGISTER_SUBSCRIPTION, REQUEST_WHATS_NEW_DATA, RESET_STORY_ARGS, RESULT_WHATS_NEW_DATA, type RequestData, type ResponseData, SAVE_STORY_REQUEST, SAVE_STORY_RESPONSE, SELECT_STORY, SET_CONFIG, SET_CURRENT_STORY, SET_FILTER, SET_GLOBALS, SET_INDEX, SET_STORIES, SET_WHATS_NEW_CACHE, SHARED_STATE_CHANGED, SHARED_STATE_SET, STORIES_COLLAPSE_ALL, STORIES_EXPAND_ALL, STORY_ARGS_UPDATED, STORY_CHANGED, STORY_ERRORED, STORY_FINISHED, STORY_HOT_UPDATED, STORY_INDEX_INVALIDATED, STORY_MISSING, STORY_PREPARED, STORY_RENDERED, STORY_RENDER_PHASE_CHANGED, STORY_SPECIFIED, STORY_THREW_EXCEPTION, STORY_UNCHANGED, type SaveStoryRequestPayload, type SaveStoryResponsePayload, type StoryFinishedPayload, TELEMETRY_ERROR, TOGGLE_WHATS_NEW_NOTIFICATIONS, UNHANDLED_ERRORS_WHILE_PLAYING, UPDATE_GLOBALS, UPDATE_QUERY_PARAMS, UPDATE_STORY_ARGS, type WhatsNewCache, type WhatsNewData, events as default };

View File

@@ -0,0 +1,137 @@
// src/core-events/index.ts
var R = /* @__PURE__ */ ((E) => (E.CHANNEL_WS_DISCONNECT = "channelWSDisconnect", E.CHANNEL_CREATED = "channelCreated", E.CONFIG_ERROR = "co\
nfigError", E.STORY_INDEX_INVALIDATED = "storyIndexInvalidated", E.STORY_SPECIFIED = "storySpecified", E.SET_CONFIG = "setConfig", E.SET_STORIES =
"setStories", E.SET_INDEX = "setIndex", E.SET_CURRENT_STORY = "setCurrentStory", E.CURRENT_STORY_WAS_SET = "currentStoryWasSet", E.FORCE_RE_RENDER =
"forceReRender", E.FORCE_REMOUNT = "forceRemount", E.PRELOAD_ENTRIES = "preloadStories", E.STORY_PREPARED = "storyPrepared", E.DOCS_PREPARED =
"docsPrepared", E.STORY_CHANGED = "storyChanged", E.STORY_UNCHANGED = "storyUnchanged", E.STORY_RENDERED = "storyRendered", E.STORY_FINISHED =
"storyFinished", E.STORY_MISSING = "storyMissing", E.STORY_ERRORED = "storyErrored", E.STORY_THREW_EXCEPTION = "storyThrewException", E.STORY_RENDER_PHASE_CHANGED =
"storyRenderPhaseChanged", E.STORY_HOT_UPDATED = "storyHotUpdated", E.PLAY_FUNCTION_THREW_EXCEPTION = "playFunctionThrewException", E.UNHANDLED_ERRORS_WHILE_PLAYING =
"unhandledErrorsWhilePlaying", E.UPDATE_STORY_ARGS = "updateStoryArgs", E.STORY_ARGS_UPDATED = "storyArgsUpdated", E.RESET_STORY_ARGS = "res\
etStoryArgs", E.SET_FILTER = "setFilter", E.SET_GLOBALS = "setGlobals", E.UPDATE_GLOBALS = "updateGlobals", E.GLOBALS_UPDATED = "globalsUpda\
ted", E.REGISTER_SUBSCRIPTION = "registerSubscription", E.PREVIEW_KEYDOWN = "previewKeydown", E.PREVIEW_BUILDER_PROGRESS = "preview_builder_\
progress", E.SELECT_STORY = "selectStory", E.STORIES_COLLAPSE_ALL = "storiesCollapseAll", E.STORIES_EXPAND_ALL = "storiesExpandAll", E.DOCS_RENDERED =
"docsRendered", E.SHARED_STATE_CHANGED = "sharedStateChanged", E.SHARED_STATE_SET = "sharedStateSet", E.NAVIGATE_URL = "navigateUrl", E.UPDATE_QUERY_PARAMS =
"updateQueryParams", E.REQUEST_WHATS_NEW_DATA = "requestWhatsNewData", E.RESULT_WHATS_NEW_DATA = "resultWhatsNewData", E.SET_WHATS_NEW_CACHE =
"setWhatsNewCache", E.TOGGLE_WHATS_NEW_NOTIFICATIONS = "toggleWhatsNewNotifications", E.TELEMETRY_ERROR = "telemetryError", E.FILE_COMPONENT_SEARCH_REQUEST =
"fileComponentSearchRequest", E.FILE_COMPONENT_SEARCH_RESPONSE = "fileComponentSearchResponse", E.SAVE_STORY_REQUEST = "saveStoryRequest", E.
SAVE_STORY_RESPONSE = "saveStoryResponse", E.ARGTYPES_INFO_REQUEST = "argtypesInfoRequest", E.ARGTYPES_INFO_RESPONSE = "argtypesInfoResponse",
E.CREATE_NEW_STORYFILE_REQUEST = "createNewStoryfileRequest", E.CREATE_NEW_STORYFILE_RESPONSE = "createNewStoryfileResponse", E))(R || {}), S = R,
{
CHANNEL_WS_DISCONNECT: _,
CHANNEL_CREATED: T,
CONFIG_ERROR: O,
CREATE_NEW_STORYFILE_REQUEST: A,
CREATE_NEW_STORYFILE_RESPONSE: N,
CURRENT_STORY_WAS_SET: r,
DOCS_PREPARED: D,
DOCS_RENDERED: I,
FILE_COMPONENT_SEARCH_REQUEST: o,
FILE_COMPONENT_SEARCH_RESPONSE: C,
FORCE_RE_RENDER: P,
FORCE_REMOUNT: L,
GLOBALS_UPDATED: Y,
NAVIGATE_URL: a,
PLAY_FUNCTION_THREW_EXCEPTION: U,
UNHANDLED_ERRORS_WHILE_PLAYING: H,
PRELOAD_ENTRIES: G,
PREVIEW_BUILDER_PROGRESS: W,
PREVIEW_KEYDOWN: d,
REGISTER_SUBSCRIPTION: t,
RESET_STORY_ARGS: p,
SELECT_STORY: i,
SET_CONFIG: F,
SET_CURRENT_STORY: l,
SET_FILTER: y,
SET_GLOBALS: e,
SET_INDEX: c,
SET_STORIES: h,
SHARED_STATE_CHANGED: f,
SHARED_STATE_SET: g,
STORIES_COLLAPSE_ALL: u,
STORIES_EXPAND_ALL: s,
STORY_ARGS_UPDATED: x,
STORY_CHANGED: m,
STORY_ERRORED: M,
STORY_INDEX_INVALIDATED: Q,
STORY_MISSING: V,
STORY_PREPARED: w,
STORY_RENDER_PHASE_CHANGED: B,
STORY_RENDERED: X,
STORY_FINISHED: b,
STORY_SPECIFIED: q,
STORY_THREW_EXCEPTION: K,
STORY_UNCHANGED: j,
STORY_HOT_UPDATED: k,
UPDATE_GLOBALS: z,
UPDATE_QUERY_PARAMS: J,
UPDATE_STORY_ARGS: Z,
REQUEST_WHATS_NEW_DATA: $,
RESULT_WHATS_NEW_DATA: n,
SET_WHATS_NEW_CACHE: v,
TOGGLE_WHATS_NEW_NOTIFICATIONS: EE,
TELEMETRY_ERROR: RE,
SAVE_STORY_REQUEST: SE,
SAVE_STORY_RESPONSE: _E,
ARGTYPES_INFO_REQUEST: TE,
ARGTYPES_INFO_RESPONSE: OE
} = R;
export {
TE as ARGTYPES_INFO_REQUEST,
OE as ARGTYPES_INFO_RESPONSE,
T as CHANNEL_CREATED,
_ as CHANNEL_WS_DISCONNECT,
O as CONFIG_ERROR,
A as CREATE_NEW_STORYFILE_REQUEST,
N as CREATE_NEW_STORYFILE_RESPONSE,
r as CURRENT_STORY_WAS_SET,
D as DOCS_PREPARED,
I as DOCS_RENDERED,
o as FILE_COMPONENT_SEARCH_REQUEST,
C as FILE_COMPONENT_SEARCH_RESPONSE,
L as FORCE_REMOUNT,
P as FORCE_RE_RENDER,
Y as GLOBALS_UPDATED,
a as NAVIGATE_URL,
U as PLAY_FUNCTION_THREW_EXCEPTION,
G as PRELOAD_ENTRIES,
W as PREVIEW_BUILDER_PROGRESS,
d as PREVIEW_KEYDOWN,
t as REGISTER_SUBSCRIPTION,
$ as REQUEST_WHATS_NEW_DATA,
p as RESET_STORY_ARGS,
n as RESULT_WHATS_NEW_DATA,
SE as SAVE_STORY_REQUEST,
_E as SAVE_STORY_RESPONSE,
i as SELECT_STORY,
F as SET_CONFIG,
l as SET_CURRENT_STORY,
y as SET_FILTER,
e as SET_GLOBALS,
c as SET_INDEX,
h as SET_STORIES,
v as SET_WHATS_NEW_CACHE,
f as SHARED_STATE_CHANGED,
g as SHARED_STATE_SET,
u as STORIES_COLLAPSE_ALL,
s as STORIES_EXPAND_ALL,
x as STORY_ARGS_UPDATED,
m as STORY_CHANGED,
M as STORY_ERRORED,
b as STORY_FINISHED,
k as STORY_HOT_UPDATED,
Q as STORY_INDEX_INVALIDATED,
V as STORY_MISSING,
w as STORY_PREPARED,
X as STORY_RENDERED,
B as STORY_RENDER_PHASE_CHANGED,
q as STORY_SPECIFIED,
K as STORY_THREW_EXCEPTION,
j as STORY_UNCHANGED,
RE as TELEMETRY_ERROR,
EE as TOGGLE_WHATS_NEW_NOTIFICATIONS,
H as UNHANDLED_ERRORS_WHILE_PLAYING,
z as UPDATE_GLOBALS,
J as UPDATE_QUERY_PARAMS,
Z as UPDATE_STORY_ARGS,
S as default
};

38501
frontend/node_modules/storybook/dist/core-server/index.cjs generated vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

38596
frontend/node_modules/storybook/dist/core-server/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,170 @@
/* ../node_modules/@devtools-ds/tree/dist/main.css */
.Tree-tree-fbbbe38 {
width: 100%;
font-family: Menlo, monospace;
}
.Tree-item-353d6f3 {
list-style: none;
}
.Tree-group-d3c3d8a {
margin: 0;
padding: 0;
list-style: none;
}
.Tree-group-d3c3d8a .Tree-label-d819155 {
cursor: default;
line-height: 1.5;
width: 100%;
display: inline-block;
outline: 0;
padding-left: 5px;
}
.Tree-group-d3c3d8a .Tree-label-d819155:focus {
background-color: var(--focusColor,#007feb);
color: var(--focusTextColor,undefined);
}
.Tree-group-d3c3d8a .Tree-label-d819155:focus.Tree-focusWhite-f1e00c2 * {
color: #fff;
}
.Tree-group-d3c3d8a .Tree-label-d819155:focus.Tree-focusWhite-f1e00c2 .Tree-arrow-03ab2e7 {
border-color: transparent transparent transparent #fff;
}
.Tree-group-d3c3d8a .Tree-label-d819155.Tree-hover-3cc4e5d:hover:not(:focus) {
background-color: var(--hoverColor,#f2fafe);
border-radius: var(--hoverRadius,0);
}
.Tree-arrow-03ab2e7 {
margin: 0 .7em 0 .1em;
display: inline-block;
width: 0;
height: 0;
border-style: solid;
border-width: .4em 0 .4em .4em;
border-color: transparent transparent transparent var(--arrowColor,#bebec0);
vertical-align: baseline;
}
.Tree-arrow-03ab2e7.Tree-open-3f1a336 {
transform: rotate(90deg);
bottom: -.05em;
}
@media screen and (prefers-reduced-motion:reduce) {
.Tree-arrow-03ab2e7 {
transition: none;
}
}
.Tree-dark-1b4aa00 {
--focusColor:#235895;
--hoverColor:#27272C;
--arrowColor:#9D9D9E;
}
.Tree-chrome-bcbcac6.Tree-light-09174ee {
--focusColor:#CFE8FC;
--hoverColor:#EDF2FC;
--arrowColor:#8E8E8E;
--hoverRadius:6px;
}
.Tree-chrome-bcbcac6.Tree-dark-1b4aa00 {
--focusColor:#093D69;
--hoverColor:#192538;
--arrowColor:#B7B7B7;
}
/* ../node_modules/@devtools-ds/object-inspector/dist/main.css */
.ObjectInspector-object-inspector-0c33e82 {
width: 100%;
font-family: Menlo, monospace;
color: var(--textColor);
}
.ObjectInspector-object-label-b81482b {
color: var(--labelColor,#0a66e6);
}
.ObjectInspector-text-25f57f3 {
color: var(--textColor);
}
.ObjectInspector-key-4f712bb {
color: var(--keyColor,#0a66e6);
}
.ObjectInspector-value-f7ec2e5 {
color: var(--valueColor,#e51ebb);
}
.ObjectInspector-string-c496000 {
color: var(--stringColor,#e51ebb);
}
.ObjectInspector-regex-59d45a3 {
color: var(--regexColor,#0a66e6);
}
.ObjectInspector-error-b818698 {
color: var(--errorColor,#b30000);
}
.ObjectInspector-boolean-2dd1642 {
color: var(--booleanColor,#117c04);
}
.ObjectInspector-number-a6daabb {
color: var(--numberColor,#117c04);
}
.ObjectInspector-undefined-3a68263 {
color: var(--undefinedColor,#6a6a6a);
}
.ObjectInspector-null-74acb50 {
color: var(--nullColor,#6a6a6a);
}
.ObjectInspector-function-07bbdcd {
color: var(--functionColor,#0a66e6);
}
.ObjectInspector-function-decorator-3d22c24 {
color: var(--functionDecoratorColor,#0a66e6);
}
.ObjectInspector-prototype-f2449ee {
color: var(--prototypeColor,#6a6a6a);
}
:root {
--textColor:#6A6A6A;
}
.ObjectInspector-dark-0c96c97 {
--labelColor:#6FB9FF;
--textColor:#9D9D9E;
--keyColor:#6FB9FF;
--valueColor:#EB7ED9;
--stringColor:#EB7ED9;
--regexColor:#6FB9FF;
--errorColor:#FFAED3;
--booleanColor:#81DF6C;
--numberColor:#81DF6C;
--undefinedColor:#9D9D9E;
--nullColor:#9D9D9E;
--prototypeColor:#9D9D9E;
--functionColor:#6FB9FF;
--functionDecoratorColor:#6FB9FF;
}
.ObjectInspector-chrome-2f3ca98.ObjectInspector-light-78bef54 {
--labelColor:#444444;
--textColor:#8E8E8E;
--keyColor:#881280;
--valueColor:#8E8E8E;
--stringColor:#CF4B49;
--regexColor:#CF4B49;
--errorColor:#FF0000;
--booleanColor:#3646B6;
--numberColor:#2D0BC9;
--undefinedColor:#444444;
--nullColor:#444444;
--prototypeColor:#BD84C2;
--functionColor:#303942;
--functionDecoratorColor:#3646B6;
}
.ObjectInspector-chrome-2f3ca98.ObjectInspector-dark-0c96c97 {
--labelColor:#C8C8C8;
--textColor:#EDEEEE;
--keyColor:#F6D9F8;
--valueColor:#C8C8C8;
--stringColor:#EE8953;
--regexColor:#EE8953;
--errorColor:#FD7E7E;
--booleanColor:#987FFD;
--numberColor:#987FFD;
--undefinedColor:#848484;
--nullColor:#848484;
--prototypeColor:#AB98AC;
--functionColor:#EDEEEE;
--functionDecoratorColor:#D0D6FB;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1445
frontend/node_modules/storybook/dist/csf-tools/index.cjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,246 @@
import { types, NodePath, GeneratorOptions, generate, RecastOptions } from 'storybook/internal/babel';
export { babelParse } from 'storybook/internal/babel';
import { ComponentAnnotations, StoryAnnotations, IndexInputStats, IndexedCSFFile, IndexInput, StoriesEntry, Tag } from 'storybook/internal/types';
interface PrintResultType {
code: string;
map?: any;
toString(): string;
}
interface BabelFile {
ast: types.File;
opts: any;
hub: any;
metadata: object;
path: any;
scope: any;
inputMap: object | null;
code: string;
}
declare const isValidPreviewPath: (filepath: string) => boolean;
declare const isModuleMock: (importPath: string) => boolean;
interface CsfOptions {
fileName?: string;
makeTitle: (userTitle: string) => string;
/**
* If an inline meta is detected e.g. `export default { title: 'foo' }` it will be transformed
* into a constant format e.g. `export const _meta = { title: 'foo' }; export default _meta;`
*/
transformInlineMeta?: boolean;
}
declare class NoMetaError extends Error {
constructor(message: string, ast: types.Node, fileName?: string);
}
declare class MultipleMetaError extends Error {
constructor(message: string, ast: types.Node, fileName?: string);
}
declare class MixedFactoryError extends Error {
constructor(message: string, ast: types.Node, fileName?: string);
}
declare class BadMetaError extends Error {
constructor(message: string, ast: types.Node, fileName?: string);
}
interface StaticMeta extends Pick<ComponentAnnotations, 'id' | 'title' | 'includeStories' | 'excludeStories' | 'tags'> {
component?: string;
}
interface StaticStory extends Pick<StoryAnnotations, 'name' | 'parameters' | 'tags'> {
id: string;
localName?: string;
__stats: IndexInputStats;
}
declare class CsfFile {
_ast: types.File;
_file: BabelFile;
_options: CsfOptions;
_rawComponentPath?: string;
_meta?: StaticMeta;
_stories: Record<string, StaticStory>;
_metaAnnotations: Record<string, types.Node>;
_storyExports: Record<string, types.VariableDeclarator | types.FunctionDeclaration>;
_storyPaths: Record<string, NodePath<types.ExportNamedDeclaration>>;
_metaStatement: types.Statement | undefined;
_metaNode: types.Expression | undefined;
_metaPath: NodePath<types.ExportDefaultDeclaration> | undefined;
_metaVariableName: string | undefined;
_metaIsFactory: boolean | undefined;
_storyStatements: Record<string, types.ExportNamedDeclaration | types.Expression>;
_storyAnnotations: Record<string, Record<string, types.Node>>;
_templates: Record<string, types.Expression>;
_namedExportsOrder?: string[];
imports: string[];
constructor(ast: types.File, options: CsfOptions, file: BabelFile);
_parseTitle(value: types.Node): string;
_parseMeta(declaration: types.ObjectExpression, program: types.Program): void;
getStoryExport(key: string): types.Node;
parse(): CsfFile & IndexedCSFFile;
get meta(): StaticMeta | undefined;
get stories(): StaticStory[];
get indexInputs(): IndexInput[];
}
/** Using new babel.File is more powerful and give access to API such as buildCodeFrameError */
declare const babelParseFile: ({ code, filename, ast, }: {
code: string;
filename?: string;
ast?: types.File;
}) => BabelFile;
declare const loadCsf: (code: string, options: CsfOptions) => CsfFile;
declare const formatCsf: (csf: CsfFile, options?: GeneratorOptions & {
inputSourceMap?: any;
}, code?: string) => ReturnType<typeof generate> | string;
/** Use this function, if you want to preserve styles. Uses recast under the hood. */
declare const printCsf: (csf: CsfFile, options?: RecastOptions) => PrintResultType;
declare const readCsf: (fileName: string, options: CsfOptions) => Promise<CsfFile>;
declare const writeCsf: (csf: CsfFile, fileName?: string) => Promise<void>;
declare const _getPathProperties: (path: string[], node: types.Node) => types.ObjectProperty[] | undefined;
declare class ConfigFile {
_ast: types.File;
_code: string;
_exports: Record<string, types.Expression>;
_exportDecls: Record<string, types.VariableDeclarator | types.FunctionDeclaration>;
_exportsObject: types.ObjectExpression | undefined;
_quotes: 'single' | 'double' | undefined;
fileName?: string;
hasDefaultExport: boolean;
constructor(ast: types.File, code: string, fileName?: string);
_parseExportsObject(exportsObject: types.ObjectExpression): void;
parse(): this;
getFieldNode(path: string[]): types.Node | undefined;
getFieldProperties(path: string[]): ReturnType<typeof _getPathProperties>;
getFieldValue<T = any>(path: string[]): T | undefined;
getSafeFieldValue(path: string[]): any;
setFieldNode(path: string[], expr: types.Expression): void;
/**
* @example
*
* ```ts
* // 1. { framework: 'framework-name' }
* // 2. { framework: { name: 'framework-name', options: {} }
* getNameFromPath(['framework']); // => 'framework-name'
* ```
*
* @returns The name of a node in a given path, supporting the following formats:
*/
getNameFromPath(path: string[]): string | undefined;
/**
* Returns an array of names of a node in a given path, supporting the following formats:
*
* @example
*
* ```ts
* const config = {
* addons: ['first-addon', { name: 'second-addon', options: {} }],
* };
* // => ['first-addon', 'second-addon']
* getNamesFromPath(['addons']);
* ```
*/
getNamesFromPath(path: string[]): string[] | undefined;
_getPnpWrappedValue(node: types.Node): string | undefined;
/**
* Given a node and a fallback property, returns a **non-evaluated** string value of the node.
*
* 1. `{ node: 'value' }`
* 2. `{ node: { fallbackProperty: 'value' } }`
*/
_getPresetValue(node: types.Node, fallbackProperty: string): string;
removeField(path: string[]): void;
appendValueToArray(path: string[], value: any): void;
appendNodeToArray(path: string[], node: types.Expression): void;
/**
* Specialized helper to remove addons or other array entries that can either be strings or
* objects with a name property.
*/
removeEntryFromArray(path: string[], value: string): void;
_inferQuotes(): "single" | "double";
valueToNode(value: any): types.Expression | undefined;
setFieldValue(path: string[], value: any): void;
getBodyDeclarations(): types.Statement[];
setBodyDeclaration(declaration: types.Declaration): void;
/**
* Import specifiers for a specific require import
*
* @example
*
* ```ts
* // const { foo } = require('bar');
* setRequireImport(['foo'], 'bar');
*
* // const foo = require('bar');
* setRequireImport('foo', 'bar');
* ```
*
* @param importSpecifiers - The import specifiers to set. If a string is passed in, a default
* import will be set. Otherwise, an array of named imports will be set
* @param fromImport - The module to import from
*/
setRequireImport(importSpecifier: string[] | string, fromImport: string): void;
/**
* Set import specifiers for a given import statement.
*
* Does not support setting type imports (yet)
*
* @example
*
* ```ts
* // import { foo } from 'bar';
* setImport(['foo'], 'bar');
*
* // import foo from 'bar';
* setImport('foo', 'bar');
*
* // import * as foo from 'bar';
* setImport({ namespace: 'foo' }, 'bar');
*
* // import 'bar';
* setImport(null, 'bar');
* ```
*
* @param importSpecifiers - The import specifiers to set. If a string is passed in, a default
* import will be set. Otherwise, an array of named imports will be set
* @param fromImport - The module to import from
*/
setImport(importSpecifier: string[] | string | {
namespace: string;
} | null, fromImport: string): void;
}
declare const loadConfig: (code: string, fileName?: string) => ConfigFile;
declare const formatConfig: (config: ConfigFile) => string;
declare const printConfig: (config: ConfigFile, options?: RecastOptions) => PrintResultType;
declare const readConfig: (fileName: string) => Promise<ConfigFile>;
declare const writeConfig: (config: ConfigFile, fileName?: string) => Promise<void>;
declare const isCsfFactoryPreview: (previewConfig: ConfigFile) => boolean;
declare const getStorySortParameter: (previewCode: string) => any;
interface EnrichCsfOptions {
disableSource?: boolean;
disableDescription?: boolean;
}
declare const enrichCsfStory: (csf: CsfFile, csfSource: CsfFile, key: string, options?: EnrichCsfOptions) => void;
declare const enrichCsfMeta: (csf: CsfFile, csfSource: CsfFile, options?: EnrichCsfOptions) => void;
declare const enrichCsf: (csf: CsfFile, csfSource: CsfFile, options?: EnrichCsfOptions) => void;
declare const extractSource: (node: types.Node) => string;
declare const extractDescription: (node?: types.Node) => string;
type TagsFilter = {
include: string[];
exclude: string[];
skip: string[];
};
/**
* TODO: the functionality in this file can be moved back to the vitest plugin itself It can use
* `storybook/internal/babel` for all it's babel needs, without duplicating babel embedding in our
* bundles.
*/
declare function vitestTransform({ code, fileName, configDir, stories, tagsFilter, previewLevelTags, }: {
code: string;
fileName: string;
configDir: string;
tagsFilter: TagsFilter;
stories: StoriesEntry[];
previewLevelTags: Tag[];
}): Promise<ReturnType<typeof formatCsf>>;
export { BadMetaError, ConfigFile, CsfFile, type CsfOptions, type EnrichCsfOptions, MixedFactoryError, MultipleMetaError, NoMetaError, type StaticMeta, type StaticStory, babelParseFile, enrichCsf, enrichCsfMeta, enrichCsfStory, extractDescription, extractSource, formatConfig, formatCsf, getStorySortParameter, isCsfFactoryPreview, isModuleMock, isValidPreviewPath, loadConfig, loadCsf, printConfig, printCsf, readConfig, readCsf, vitestTransform, writeConfig, writeCsf };

1464
frontend/node_modules/storybook/dist/csf-tools/index.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

179
frontend/node_modules/storybook/dist/csf/index.cjs generated vendored Normal file
View File

@@ -0,0 +1,179 @@
"use strict";
var v = Object.create;
var d = Object.defineProperty;
var j = Object.getOwnPropertyDescriptor;
var _ = Object.getOwnPropertyNames;
var C = Object.getPrototypeOf, E = Object.prototype.hasOwnProperty;
var a = (e, r) => d(e, "name", { value: r, configurable: !0 });
var P = (e, r) => () => (r || e((r = { exports: {} }).exports, r), r.exports), z = (e, r) => {
for (var t in r)
d(e, t, { get: r[t], enumerable: !0 });
}, x = (e, r, t, n) => {
if (r && typeof r == "object" || typeof r == "function")
for (let s of _(r))
!E.call(e, s) && s !== t && d(e, s, { get: () => r[s], enumerable: !(n = j(r, s)) || n.enumerable });
return e;
};
var I = (e, r, t) => (t = e != null ? v(C(e)) : {}, x(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
r || !e || !e.__esModule ? d(t, "default", { value: e, enumerable: !0 }) : t,
e
)), M = (e) => x(d({}, "__esModule", { value: !0 }), e);
// ../node_modules/@ngard/tiny-isequal/index.js
var w = P((g) => {
Object.defineProperty(g, "__esModule", { value: !0 }), g.isEqual = /* @__PURE__ */ function() {
var e = Object.prototype.toString, r = Object.getPrototypeOf, t = Object.getOwnPropertySymbols ? function(n) {
return Object.keys(n).concat(Object.getOwnPropertySymbols(n));
} : Object.keys;
return function(n, s) {
return (/* @__PURE__ */ a(function l(o, i, p) {
var c, f, u, A = e.call(o), $ = e.call(i);
if (o === i) return !0;
if (o == null || i == null) return !1;
if (p.indexOf(o) > -1 && p.indexOf(i) > -1) return !0;
if (p.push(o, i), A != $ || (c = t(o), f = t(i), c.length != f.length || c.some(function(m) {
return !l(o[m], i[m], p);
}))) return !1;
switch (A.slice(8, -1)) {
case "Symbol":
return o.valueOf() == i.valueOf();
case "Date":
case "Number":
return +o == +i || +o != +o && +i != +i;
case "RegExp":
case "Function":
case "String":
case "Boolean":
return "" + o == "" + i;
case "Set":
case "Map":
c = o.entries(), f = i.entries();
do
if (!l((u = c.next()).value, f.next().value, p)) return !1;
while (!u.done);
return !0;
case "ArrayBuffer":
o = new Uint8Array(o), i = new Uint8Array(i);
case "DataView":
o = new Uint8Array(o.buffer), i = new Uint8Array(i.buffer);
case "Float32Array":
case "Float64Array":
case "Int8Array":
case "Int16Array":
case "Int32Array":
case "Uint8Array":
case "Uint16Array":
case "Uint32Array":
case "Uint8ClampedArray":
case "Arguments":
case "Array":
if (o.length != i.length) return !1;
for (u = 0; u < o.length; u++) if ((u in o || u in i) && (u in o != u in i || !l(o[u], i[u], p))) return !1;
return !0;
case "Object":
return l(r(o), r(i), p);
default:
return !1;
}
}, "n"))(n, s, []);
};
}();
});
// src/csf/index.ts
var V = {};
z(V, {
combineTags: () => J,
includeConditionalArg: () => T,
isExportStory: () => F,
isMeta: () => D,
isPreview: () => U,
isStory: () => B,
parseKind: () => G,
sanitize: () => O,
storyNameFromExport: () => q,
toId: () => k
});
module.exports = M(V);
// src/csf/toStartCaseStr.ts
function S(e) {
return e.replace(/_/g, " ").replace(/-/g, " ").replace(/\./g, " ").replace(/([^\n])([A-Z])([a-z])/g, (r, t, n, s) => `${t} ${n}${s}`).replace(
/([a-z])([A-Z])/g, (r, t, n) => `${t} ${n}`).replace(/([a-z])([0-9])/gi, (r, t, n) => `${t} ${n}`).replace(/([0-9])([a-z])/gi, (r, t, n) => `${t}\
${n}`).replace(/(\s|^)(\w)/g, (r, t, n) => `${t}${n.toUpperCase()}`).replace(/ +/g, " ").trim();
}
a(S, "toStartCaseStr");
// src/csf/includeConditionalArg.ts
var y = I(w(), 1);
var R = /* @__PURE__ */ a((e) => e.map((r) => typeof r < "u").filter(Boolean).length, "count"), N = /* @__PURE__ */ a((e, r) => {
let { exists: t, eq: n, neq: s, truthy: l } = e;
if (R([t, n, s, l]) > 1)
throw new Error(`Invalid conditional test ${JSON.stringify({ exists: t, eq: n, neq: s })}`);
if (typeof n < "u")
return (0, y.isEqual)(r, n);
if (typeof s < "u")
return !(0, y.isEqual)(r, s);
if (typeof t < "u") {
let i = typeof r < "u";
return t ? i : !i;
}
return (typeof l > "u" ? !0 : l) ? !!r : !r;
}, "testValue"), T = /* @__PURE__ */ a((e, r, t) => {
if (!e.if)
return !0;
let { arg: n, global: s } = e.if;
if (R([n, s]) !== 1)
throw new Error(`Invalid conditional value ${JSON.stringify({ arg: n, global: s })}`);
let l = n ? r[n] : t[s];
return N(e.if, l);
}, "includeConditionalArg");
// src/csf/csf-factories.ts
function U(e) {
return e != null && typeof e == "object" && "_tag" in e && e?._tag === "Preview";
}
a(U, "isPreview");
function D(e) {
return e != null && typeof e == "object" && "_tag" in e && e?._tag === "Meta";
}
a(D, "isMeta");
function B(e) {
return e != null && typeof e == "object" && "_tag" in e && e?._tag === "Story";
}
a(B, "isStory");
// src/csf/index.ts
var O = /* @__PURE__ */ a((e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "-").replace(/-+/g,
"-").replace(/^-+/, "").replace(/-+$/, ""), "sanitize"), b = /* @__PURE__ */ a((e, r) => {
let t = O(e);
if (t === "")
throw new Error(`Invalid ${r} '${e}', must include alphanumeric characters`);
return t;
}, "sanitizeSafe"), k = /* @__PURE__ */ a((e, r) => `${b(e, "kind")}${r ? `--${b(r, "name")}` : ""}`, "toId"), q = /* @__PURE__ */ a((e) => S(
e), "storyNameFromExport");
function h(e, r) {
return Array.isArray(r) ? r.includes(e) : e.match(r);
}
a(h, "matches");
function F(e, { includeStories: r, excludeStories: t }) {
return (
// https://babeljs.io/docs/en/babel-plugin-transform-modules-commonjs
e !== "__esModule" && (!r || h(e, r)) && (!t || !h(e, t))
);
}
a(F, "isExportStory");
var G = /* @__PURE__ */ a((e, { rootSeparator: r, groupSeparator: t }) => {
let [n, s] = e.split(r, 2), l = (s || e).split(t).filter((o) => !!o);
return {
root: s ? n : null,
groups: l
};
}, "parseKind"), J = /* @__PURE__ */ a((...e) => {
let r = e.reduce((t, n) => (n.startsWith("!") ? t.delete(n.slice(1)) : t.add(n), t), /* @__PURE__ */ new Set());
return Array.from(r);
}, "combineTags");

750
frontend/node_modules/storybook/dist/csf/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,750 @@
import { Renderer as Renderer$1, ProjectAnnotations as ProjectAnnotations$1, NormalizedProjectAnnotations, ComponentAnnotations as ComponentAnnotations$1, Args as Args$1, NormalizedComponentAnnotations, StoryAnnotations as StoryAnnotations$1, NormalizedStoryAnnotations } from 'storybook/internal/types';
declare global {
interface SymbolConstructor {
readonly observable: symbol;
}
}
/**
@see Simplify
*/
interface SimplifyOptions {
/**
Do the simplification recursively.
@default false
*/
deep?: boolean;
}
// Flatten a type without worrying about the result.
type Flatten<
AnyType,
Options extends SimplifyOptions = {},
> = Options['deep'] extends true
? {[KeyType in keyof AnyType]: Simplify<AnyType[KeyType], Options>}
: {[KeyType in keyof AnyType]: AnyType[KeyType]};
/**
Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
@example
```
import type {Simplify} from 'type-fest';
type PositionProps = {
top: number;
left: number;
};
type SizeProps = {
width: number;
height: number;
};
// In your editor, hovering over `Props` will show a flattened object with all the properties.
type Props = Simplify<PositionProps & SizeProps>;
```
Sometimes it is desired to pass a value as a function argument that has a different type. At first inspection it may seem assignable, and then you discover it is not because the `value`'s type definition was defined as an interface. In the following example, `fn` requires an argument of type `Record<string, unknown>`. If the value is defined as a literal, then it is assignable. And if the `value` is defined as type using the `Simplify` utility the value is assignable. But if the `value` is defined as an interface, it is not assignable because the interface is not sealed and elsewhere a non-string property could be added to the interface.
If the type definition must be an interface (perhaps it was defined in a third-party npm package), then the `value` can be defined as `const value: Simplify<SomeInterface> = ...`. Then `value` will be assignable to the `fn` argument. Or the `value` can be cast as `Simplify<SomeInterface>` if you can't re-declare the `value`.
@example
```
import type {Simplify} from 'type-fest';
interface SomeInterface {
foo: number;
bar?: string;
baz: number | undefined;
}
type SomeType = {
foo: number;
bar?: string;
baz: number | undefined;
};
const literal = {foo: 123, bar: 'hello', baz: 456};
const someType: SomeType = literal;
const someInterface: SomeInterface = literal;
function fn(object: Record<string, unknown>): void {}
fn(literal); // Good: literal object type is sealed
fn(someType); // Good: type is sealed
fn(someInterface); // Error: Index signature for type 'string' is missing in type 'someInterface'. Because `interface` can be re-opened
fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface` into a `type`
```
@link https://github.com/microsoft/TypeScript/issues/15300
@category Object
*/
type Simplify<
AnyType,
Options extends SimplifyOptions = {},
> = Flatten<AnyType> extends AnyType
? Flatten<AnyType, Options>
: AnyType;
/**
Remove any index signatures from the given object type, so that only explicitly defined properties remain.
Use-cases:
- Remove overly permissive signatures from third-party types.
This type was taken from this [StackOverflow answer](https://stackoverflow.com/a/68261113/420747).
It relies on the fact that an empty object (`{}`) is assignable to an object with just an index signature, like `Record<string, unknown>`, but not to an object with explicitly defined keys, like `Record<'foo' | 'bar', unknown>`.
(The actual value type, `unknown`, is irrelevant and could be any type. Only the key type matters.)
```
const indexed: Record<string, unknown> = {}; // Allowed
const keyed: Record<'foo', unknown> = {}; // Error
// => TS2739: Type '{}' is missing the following properties from type 'Record<"foo" | "bar", unknown>': foo, bar
```
Instead of causing a type error like the above, you can also use a [conditional type](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html) to test whether a type is assignable to another:
```
type Indexed = {} extends Record<string, unknown>
? '✅ `{}` is assignable to `Record<string, unknown>`'
: '❌ `{}` is NOT assignable to `Record<string, unknown>`';
// => '✅ `{}` is assignable to `Record<string, unknown>`'
type Keyed = {} extends Record<'foo' | 'bar', unknown>
? "✅ `{}` is assignable to `Record<'foo' | 'bar', unknown>`"
: "❌ `{}` is NOT assignable to `Record<'foo' | 'bar', unknown>`";
// => "❌ `{}` is NOT assignable to `Record<'foo' | 'bar', unknown>`"
```
Using a [mapped type](https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#further-exploration), you can then check for each `KeyType` of `ObjectType`...
```
import type {RemoveIndexSignature} from 'type-fest';
type RemoveIndexSignature<ObjectType> = {
[KeyType in keyof ObjectType // Map each key of `ObjectType`...
]: ObjectType[KeyType]; // ...to its original value, i.e. `RemoveIndexSignature<Foo> == Foo`.
};
```
...whether an empty object (`{}`) would be assignable to an object with that `KeyType` (`Record<KeyType, unknown>`)...
```
import type {RemoveIndexSignature} from 'type-fest';
type RemoveIndexSignature<ObjectType> = {
[KeyType in keyof ObjectType
// Is `{}` assignable to `Record<KeyType, unknown>`?
as {} extends Record<KeyType, unknown>
? ... // ✅ `{}` is assignable to `Record<KeyType, unknown>`
: ... // ❌ `{}` is NOT assignable to `Record<KeyType, unknown>`
]: ObjectType[KeyType];
};
```
If `{}` is assignable, it means that `KeyType` is an index signature and we want to remove it. If it is not assignable, `KeyType` is a "real" key and we want to keep it.
```
import type {RemoveIndexSignature} from 'type-fest';
type RemoveIndexSignature<ObjectType> = {
[KeyType in keyof ObjectType
as {} extends Record<KeyType, unknown>
? never // => Remove this `KeyType`.
: KeyType // => Keep this `KeyType` as it is.
]: ObjectType[KeyType];
};
```
@example
```
import type {RemoveIndexSignature} from 'type-fest';
interface Example {
// These index signatures will be removed.
[x: string]: any
[x: number]: any
[x: symbol]: any
[x: `head-${string}`]: string
[x: `${string}-tail`]: string
[x: `head-${string}-tail`]: string
[x: `${bigint}`]: string
[x: `embedded-${number}`]: string
// These explicitly defined keys will remain.
foo: 'bar';
qux?: 'baz';
}
type ExampleWithoutIndexSignatures = RemoveIndexSignature<Example>;
// => { foo: 'bar'; qux?: 'baz' | undefined; }
```
@category Object
*/
type RemoveIndexSignature<ObjectType> = {
[KeyType in keyof ObjectType as {} extends Record<KeyType, unknown>
? never
: KeyType]: ObjectType[KeyType];
};
/**
Convert a union type to an intersection type using [distributive conditional types](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
Inspired by [this Stack Overflow answer](https://stackoverflow.com/a/50375286/2172153).
@example
```
import type {UnionToIntersection} from 'type-fest';
type Union = {the(): void} | {great(arg: string): void} | {escape: boolean};
type Intersection = UnionToIntersection<Union>;
//=> {the(): void; great(arg: string): void; escape: boolean};
```
A more applicable example which could make its way into your library code follows.
@example
```
import type {UnionToIntersection} from 'type-fest';
class CommandOne {
commands: {
a1: () => undefined,
b1: () => undefined,
}
}
class CommandTwo {
commands: {
a2: (argA: string) => undefined,
b2: (argB: string) => undefined,
}
}
const union = [new CommandOne(), new CommandTwo()].map(instance => instance.commands);
type Union = typeof union;
//=> {a1(): void; b1(): void} | {a2(argA: string): void; b2(argB: string): void}
type Intersection = UnionToIntersection<Union>;
//=> {a1(): void; b1(): void; a2(argA: string): void; b2(argB: string): void}
```
@category Type
*/
type UnionToIntersection<Union> = (
// `extends unknown` is always going to be the case and is used to convert the
// `Union` into a [distributive conditional
// type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
Union extends unknown
// The union type is used as the only argument to a function since the union
// of function arguments is an intersection.
? (distributedUnion: Union) => void
// This won't happen.
: never
// Infer the `Intersection` type since TypeScript represents the positional
// arguments of unions of functions as an intersection of the union.
) extends ((mergedIntersection: infer Intersection) => void)
? Intersection
: never;
interface SBBaseType {
required?: boolean;
raw?: string;
}
type SBScalarType = SBBaseType & {
name: 'boolean' | 'string' | 'number' | 'function' | 'symbol';
};
type SBArrayType = SBBaseType & {
name: 'array';
value: SBType;
};
type SBObjectType = SBBaseType & {
name: 'object';
value: Record<string, SBType>;
};
type SBEnumType = SBBaseType & {
name: 'enum';
value: (string | number)[];
};
type SBIntersectionType = SBBaseType & {
name: 'intersection';
value: SBType[];
};
type SBUnionType = SBBaseType & {
name: 'union';
value: SBType[];
};
type SBOtherType = SBBaseType & {
name: 'other';
value: string;
};
type SBType = SBScalarType | SBEnumType | SBArrayType | SBObjectType | SBIntersectionType | SBUnionType | SBOtherType;
type StoryId = string;
type ComponentId = string;
type ComponentTitle = string;
type StoryName = string;
/** @deprecated */
type StoryKind = ComponentTitle;
type Tag = string;
interface StoryIdentifier {
componentId: ComponentId;
title: ComponentTitle;
/** @deprecated */
kind: ComponentTitle;
id: StoryId;
name: StoryName;
/** @deprecated */
story: StoryName;
tags: Tag[];
}
interface Parameters {
[name: string]: any;
}
interface StrictParameters {
[name: string]: unknown;
}
type ControlType = 'object' | 'boolean' | 'check' | 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select' | 'number' | 'range' | 'file' | 'color' | 'date' | 'text';
type ConditionalTest = {
truthy?: boolean;
} | {
exists: boolean;
} | {
eq: any;
} | {
neq: any;
};
type ConditionalValue = {
arg: string;
} | {
global: string;
};
type Conditional = ConditionalValue & ConditionalTest;
interface ControlBase {
[key: string]: any;
/** @see https://storybook.js.org/docs/api/arg-types#controltype */
type?: ControlType;
disable?: boolean;
}
interface Report {
type: string;
version?: number;
result: unknown;
status: 'failed' | 'passed' | 'warning';
}
interface ReportingAPI {
reports: Report[];
addReport: (report: Report) => void;
}
type Control = ControlType | false | (ControlBase & (ControlBase | {
type: 'color';
/** @see https://storybook.js.org/docs/api/arg-types#controlpresetcolors */
presetColors?: string[];
} | {
type: 'file';
/** @see https://storybook.js.org/docs/api/arg-types#controlaccept */
accept?: string;
} | {
type: 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select';
/** @see https://storybook.js.org/docs/api/arg-types#controllabels */
labels?: {
[options: string]: string;
};
} | {
type: 'number' | 'range';
/** @see https://storybook.js.org/docs/api/arg-types#controlmax */
max?: number;
/** @see https://storybook.js.org/docs/api/arg-types#controlmin */
min?: number;
/** @see https://storybook.js.org/docs/api/arg-types#controlstep */
step?: number;
}));
interface InputType {
/** @see https://storybook.js.org/docs/api/arg-types#control */
control?: Control;
/** @see https://storybook.js.org/docs/api/arg-types#description */
description?: string;
/** @see https://storybook.js.org/docs/api/arg-types#if */
if?: Conditional;
/** @see https://storybook.js.org/docs/api/arg-types#mapping */
mapping?: {
[key: string]: any;
};
/** @see https://storybook.js.org/docs/api/arg-types#name */
name?: string;
/** @see https://storybook.js.org/docs/api/arg-types#options */
options?: readonly any[];
/** @see https://storybook.js.org/docs/api/arg-types#table */
table?: {
[key: string]: unknown;
/** @see https://storybook.js.org/docs/api/arg-types#tablecategory */
category?: string;
/** @see https://storybook.js.org/docs/api/arg-types#tabledefaultvalue */
defaultValue?: {
summary?: string;
detail?: string;
};
/** @see https://storybook.js.org/docs/api/arg-types#tabledisable */
disable?: boolean;
/** @see https://storybook.js.org/docs/api/arg-types#tablesubcategory */
subcategory?: string;
/** @see https://storybook.js.org/docs/api/arg-types#tabletype */
type?: {
summary?: string;
detail?: string;
};
};
/** @see https://storybook.js.org/docs/api/arg-types#type */
type?: SBType | SBScalarType['name'];
/**
* @deprecated Use `table.defaultValue.summary` instead.
* @see https://storybook.js.org/docs/api/arg-types#defaultvalue
*/
defaultValue?: any;
[key: string]: any;
}
interface StrictInputType extends InputType {
name: string;
type?: SBType;
}
interface Args {
[name: string]: any;
}
interface StrictArgs {
[name: string]: unknown;
}
/** @see https://storybook.js.org/docs/api/arg-types#argtypes */
type ArgTypes<TArgs = Args> = {
[name in keyof TArgs]: InputType;
};
type StrictArgTypes<TArgs = Args> = {
[name in keyof TArgs]: StrictInputType;
};
interface Globals {
[name: string]: any;
}
interface GlobalTypes {
[name: string]: InputType;
}
interface StrictGlobalTypes {
[name: string]: StrictInputType;
}
interface Renderer {
/** What is the type of the `component` annotation in this renderer? */
component: any;
/** What does the story function return in this renderer? */
storyResult: any;
/** What type of element does this renderer render to? */
canvasElement: any;
mount(): Promise<Canvas>;
T?: unknown;
}
/** @deprecated - Use `Renderer` */
type AnyFramework = Renderer;
interface StoryContextForEnhancers<TRenderer extends Renderer = Renderer, TArgs = Args> extends StoryIdentifier {
component?: (TRenderer & {
T: any;
})['component'];
subcomponents?: Record<string, (TRenderer & {
T: any;
})['component']>;
parameters: Parameters;
initialArgs: TArgs;
argTypes: StrictArgTypes<TArgs>;
}
type ArgsEnhancer<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: StoryContextForEnhancers<TRenderer, TArgs>) => TArgs;
type ArgTypesEnhancer<TRenderer extends Renderer = Renderer, TArgs = Args> = ((context: StoryContextForEnhancers<TRenderer, TArgs>) => StrictArgTypes<TArgs>) & {
secondPass?: boolean;
};
interface StoryContextUpdate<TArgs = Args> {
args?: TArgs;
globals?: Globals;
[key: string]: any;
}
type ViewMode = 'story' | 'docs';
type LoaderFunction<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: StoryContextForLoaders<TRenderer, TArgs>) => Promise<Record<string, any> | void> | Record<string, any> | void;
type Awaitable<T> = T | PromiseLike<T>;
type CleanupCallback = () => Awaitable<unknown>;
type BeforeAll = () => Awaitable<CleanupCallback | void>;
type BeforeEach<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: StoryContext<TRenderer, TArgs>) => Awaitable<CleanupCallback | void>;
type AfterEach<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: StoryContext<TRenderer, TArgs>) => Awaitable<void>;
interface Canvas {
}
interface StoryContext<TRenderer extends Renderer = Renderer, TArgs = Args> extends StoryContextForEnhancers<TRenderer, TArgs>, Required<StoryContextUpdate<TArgs>> {
loaded: Record<string, any>;
abortSignal: AbortSignal;
canvasElement: TRenderer['canvasElement'];
hooks: unknown;
originalStoryFn: ArgsStoryFn<TRenderer>;
viewMode: ViewMode;
step: StepFunction<TRenderer, TArgs>;
context: this;
canvas: Canvas;
mount: TRenderer['mount'];
reporting: ReportingAPI;
}
/** @deprecated Use {@link StoryContext} instead. */
interface StoryContextForLoaders<TRenderer extends Renderer = Renderer, TArgs = Args> extends StoryContext<TRenderer, TArgs> {
}
/** @deprecated Use {@link StoryContext} instead. */
interface PlayFunctionContext<TRenderer extends Renderer = Renderer, TArgs = Args> extends StoryContext<TRenderer, TArgs> {
}
type StepLabel = string;
type StepFunction<TRenderer extends Renderer = Renderer, TArgs = Args> = (label: StepLabel, play: PlayFunction<TRenderer, TArgs>) => Promise<void> | void;
type PlayFunction<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: PlayFunctionContext<TRenderer, TArgs>) => Promise<void> | void;
type PartialStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = (update?: StoryContextUpdate<Partial<TArgs>>) => TRenderer['storyResult'];
type LegacyStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: StoryContext<TRenderer, TArgs>) => TRenderer['storyResult'];
type ArgsStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = (args: TArgs, context: StoryContext<TRenderer, TArgs>) => (TRenderer & {
T: TArgs;
})['storyResult'];
type StoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = LegacyStoryFn<TRenderer, TArgs> | ArgsStoryFn<TRenderer, TArgs>;
type DecoratorFunction<TRenderer extends Renderer = Renderer, TArgs = Args> = (fn: PartialStoryFn<TRenderer, TArgs>, c: StoryContext<TRenderer, TArgs>) => TRenderer['storyResult'];
type DecoratorApplicator<TRenderer extends Renderer = Renderer, TArgs = Args> = (storyFn: LegacyStoryFn<TRenderer, TArgs>, decorators: DecoratorFunction<TRenderer, TArgs>[]) => LegacyStoryFn<TRenderer, TArgs>;
type StepRunner<TRenderer extends Renderer = Renderer, TArgs = Args> = (label: StepLabel, play: PlayFunction<TRenderer, TArgs>, context: StoryContext<TRenderer, TArgs>) => Promise<void>;
interface BaseAnnotations<TRenderer extends Renderer = Renderer, TArgs = Args> {
/**
* Wrapper components or Storybook decorators that wrap a story.
*
* Decorators defined in Meta will be applied to every story variation.
*
* @see [Decorators](https://storybook.js.org/docs/writing-stories/decorators)
*/
decorators?: DecoratorFunction<TRenderer, Simplify<TArgs>>[] | DecoratorFunction<TRenderer, Simplify<TArgs>>;
/**
* Custom metadata for a story.
*
* @see [Parameters](https://storybook.js.org/docs/writing-stories/parameters)
*/
parameters?: Parameters;
/**
* Dynamic data that are provided (and possibly updated by) Storybook and its addons.
*
* @see [Args](https://storybook.js.org/docs/writing-stories/args)
*/
args?: Partial<TArgs>;
/**
* ArgTypes encode basic metadata for args, such as `name`, `description`, `defaultValue` for an
* arg. These get automatically filled in by Storybook Docs.
*
* @see [ArgTypes](https://storybook.js.org/docs/api/arg-types)
*/
argTypes?: Partial<ArgTypes<TArgs>>;
/**
* Asynchronous functions which provide data for a story.
*
* @see [Loaders](https://storybook.js.org/docs/writing-stories/loaders)
*/
loaders?: LoaderFunction<TRenderer, TArgs>[] | LoaderFunction<TRenderer, TArgs>;
/**
* Function to be called before each story. When the function is async, it will be awaited.
*
* `beforeEach` can be added to preview, the default export and to a specific story. They are run
* (and awaited) in the order: preview, default export, story
*
* A cleanup function can be returned.
*/
beforeEach?: BeforeEach<TRenderer, TArgs>[] | BeforeEach<TRenderer, TArgs>;
/**
* Function to be called after each play function for post-test assertions. Don't use this
* function for cleaning up state. You can use the return callback of `beforeEach` for that, which
* is run when switching stories. When the function is async, it will be awaited.
*
* `afterEach` can be added to preview, the default export and to a specific story. They are run
* (and awaited) reverse order: preview, default export, story
*/
afterEach?: AfterEach<TRenderer, TArgs>[] | AfterEach<TRenderer, TArgs>;
/**
* Define a custom render function for the story(ies). If not passed, a default render function by
* the renderer will be used.
*/
render?: ArgsStoryFn<TRenderer, TArgs>;
/** Named tags for a story, used to filter stories in different contexts. */
tags?: Tag[];
mount?: (context: StoryContext<TRenderer, TArgs>) => TRenderer['mount'];
}
interface ProjectAnnotations<TRenderer extends Renderer = Renderer, TArgs = Args> extends BaseAnnotations<TRenderer, TArgs> {
argsEnhancers?: ArgsEnhancer<TRenderer, Args>[];
argTypesEnhancers?: ArgTypesEnhancer<TRenderer, Args>[];
/**
* Lifecycle hook which runs once, before any loaders, decorators or stories, and may rerun when
* configuration changes or when reinitializing (e.g. between test runs). The function may be
* synchronous or asynchronous, and may return a cleanup function which may also be synchronous or
* asynchronous. The cleanup function is not guaranteed to run (e.g. when the browser closes), but
* runs when configuration changes or when reinitializing. This hook may only be defined globally
* (i.e. not on component or story level). When multiple hooks are specified, they are to be
* executed sequentially (and awaited) in the following order:
*
* - Addon hooks (in order of addons array in e.g. .storybook/main.js)
* - Annotation hooks (in order of previewAnnotations array in e.g. .storybook/main.js)
* - Preview hook (via e.g. .storybook/preview.js) Cleanup functions are executed sequentially in
* reverse order of initialization.
*/
beforeAll?: BeforeAll;
initialGlobals?: Globals;
globalTypes?: GlobalTypes;
applyDecorators?: DecoratorApplicator<TRenderer, Args>;
runStep?: StepRunner<TRenderer, TArgs>;
}
type StoryDescriptor$1 = string[] | RegExp;
interface ComponentAnnotations<TRenderer extends Renderer = Renderer, TArgs = Args> extends BaseAnnotations<TRenderer, TArgs> {
/**
* Title of the component which will be presented in the navigation. **Should be unique.**
*
* Components can be organized in a nested structure using "/" as a separator.
*
* Since CSF 3.0 this property is optional -- it can be inferred from the filesystem path
*
* @example Export default { ... title: 'Design System/Atoms/Button' }
*
* @see [Story Hierarchy](https://storybook.js.org/docs/writing-stories/naming-components-and-hierarchy#structure-and-hierarchy)
*/
title?: ComponentTitle;
/**
* Id of the component (prefix of the story id) which is used for URLs.
*
* By default is inferred from sanitizing the title
*
* @see [Permalink to stories](https://storybook.js.org/docs/configure/sidebar-and-urls#permalink-to-stories)
*/
id?: ComponentId;
/**
* Used to only include certain named exports as stories. Useful when you want to have non-story
* exports such as mock data or ignore a few stories.
*
* @example IncludeStories: ['SimpleStory', 'ComplexStory'] includeStories: /.*Story$/
*
* @see [Non-story exports](https://storybook.js.org/docs/api/csf#non-story-exports)
*/
includeStories?: StoryDescriptor$1;
/**
* Used to exclude certain named exports. Useful when you want to have non-story exports such as
* mock data or ignore a few stories.
*
* @example ExcludeStories: ['simpleData', 'complexData'] excludeStories: /.*Data$/
*
* @see [Non-story exports](https://storybook.js.org/docs/api/csf#non-story-exports)
*/
excludeStories?: StoryDescriptor$1;
/**
* The primary component for your story.
*
* Used by addons for automatic prop table generation and display of other component metadata.
*/
component?: (TRenderer & {
T: Record<string, unknown> extends Required<TArgs> ? any : TArgs;
})['component'];
/**
* Auxiliary subcomponents that are part of the stories.
*
* Used by addons for automatic prop table generation and display of other component metadata.
*
* @example Import { Button, ButtonGroup } from './components';
*
* Export default { ... subcomponents: { Button, ButtonGroup } }
*
* By defining them each component will have its tab in the args table.
*/
subcomponents?: Record<string, (TRenderer & {
T: any;
})['component']>;
/** Function that is executed after the story is rendered. */
play?: PlayFunction<TRenderer, TArgs>;
/** Override the globals values for all stories in this component */
globals?: Globals;
}
type StoryAnnotations<TRenderer extends Renderer = Renderer, TArgs = Args, TRequiredArgs = Partial<TArgs>> = BaseAnnotations<TRenderer, TArgs> & {
/** Override the display name in the UI (CSF v3) */
name?: StoryName;
/** Override the display name in the UI (CSF v2) */
storyName?: StoryName;
/** Function that is executed after the story is rendered. */
play?: PlayFunction<TRenderer, TArgs>;
/** Override the globals values for this story */
globals?: Globals;
/** @deprecated */
story?: Omit<StoryAnnotations<TRenderer, TArgs>, 'story'>;
} & ({} extends TRequiredArgs ? {
args?: TRequiredArgs;
} : {
args: TRequiredArgs;
});
type LegacyAnnotatedStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = StoryFn<TRenderer, TArgs> & StoryAnnotations<TRenderer, TArgs>;
type LegacyStoryAnnotationsOrFn<TRenderer extends Renderer = Renderer, TArgs = Args> = LegacyAnnotatedStoryFn<TRenderer, TArgs> | StoryAnnotations<TRenderer, TArgs>;
type AnnotatedStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = ArgsStoryFn<TRenderer, TArgs> & StoryAnnotations<TRenderer, TArgs>;
type StoryAnnotationsOrFn<TRenderer extends Renderer = Renderer, TArgs = Args> = AnnotatedStoryFn<TRenderer, TArgs> | StoryAnnotations<TRenderer, TArgs>;
type ArgsFromMeta<TRenderer extends Renderer, Meta> = Meta extends {
render?: ArgsStoryFn<TRenderer, infer RArgs>;
loaders?: (infer Loaders)[] | infer Loaders;
decorators?: (infer Decorators)[] | infer Decorators;
} ? Simplify<RemoveIndexSignature<RArgs & DecoratorsArgs<TRenderer, Decorators> & LoaderArgs<TRenderer, Loaders>>> : unknown;
type DecoratorsArgs<TRenderer extends Renderer, Decorators> = UnionToIntersection<Decorators extends DecoratorFunction<TRenderer, infer TArgs> ? TArgs : unknown>;
type LoaderArgs<TRenderer extends Renderer, Loaders> = UnionToIntersection<Loaders extends LoaderFunction<TRenderer, infer TArgs> ? TArgs : unknown>;
/**
* Helper function to include/exclude an arg based on the value of other other args aka "conditional
* args"
*/
declare const includeConditionalArg: (argType: InputType, args: Args, globals: Globals) => any;
interface Preview<TRenderer extends Renderer$1 = Renderer$1> {
readonly _tag: 'Preview';
input: ProjectAnnotations$1<TRenderer>;
composed: NormalizedProjectAnnotations<TRenderer>;
meta(input: ComponentAnnotations$1<TRenderer>): Meta<TRenderer>;
}
declare function isPreview(input: unknown): input is Preview<Renderer$1>;
interface Meta<TRenderer extends Renderer$1, TArgs extends Args$1 = Args$1> {
readonly _tag: 'Meta';
input: ComponentAnnotations$1<TRenderer, TArgs>;
composed: NormalizedComponentAnnotations<TRenderer>;
preview: Preview<TRenderer>;
story(input: StoryAnnotations$1<TRenderer, TArgs>): Story<TRenderer, TArgs>;
}
declare function isMeta(input: unknown): input is Meta<Renderer$1>;
interface Story<TRenderer extends Renderer$1, TArgs extends Args$1 = Args$1> {
readonly _tag: 'Story';
input: StoryAnnotations$1<TRenderer, TArgs>;
composed: NormalizedStoryAnnotations<TRenderer>;
meta: Meta<TRenderer, TArgs>;
}
declare function isStory<TRenderer extends Renderer$1>(input: unknown): input is Story<TRenderer>;
/**
* Remove punctuation and illegal characters from a story ID.
*
* See https://gist.github.com/davidjrice/9d2af51100e41c6c4b4a
*/
declare const sanitize: (string: string) => string;
/** Generate a storybook ID from a component/kind and story name. */
declare const toId: (kind: string, name?: string) => string;
/** Transform a CSF named export into a readable story name */
declare const storyNameFromExport: (key: string) => string;
type StoryDescriptor = string[] | RegExp;
interface IncludeExcludeOptions {
includeStories?: StoryDescriptor;
excludeStories?: StoryDescriptor;
}
/** Does a named export match CSF inclusion/exclusion options? */
declare function isExportStory(key: string, { includeStories, excludeStories }: IncludeExcludeOptions): boolean | null;
interface SeparatorOptions {
rootSeparator: string | RegExp;
groupSeparator: string | RegExp;
}
/** Parse out the component/kind name from a path, using the given separator config. */
declare const parseKind: (kind: string, { rootSeparator, groupSeparator }: SeparatorOptions) => {
root: string | null;
groups: string[];
};
/** Combine a set of project / meta / story tags, removing duplicates and handling negations. */
declare const combineTags: (...tags: string[]) => string[];
export { type AfterEach, type AnnotatedStoryFn, type AnyFramework, type ArgTypes, type ArgTypesEnhancer, type Args, type ArgsEnhancer, type ArgsFromMeta, type ArgsStoryFn, type BaseAnnotations, type BeforeAll, type BeforeEach, type Canvas, type CleanupCallback, type ComponentAnnotations, type ComponentId, type ComponentTitle, type Conditional, type DecoratorApplicator, type DecoratorFunction, type GlobalTypes, type Globals, type IncludeExcludeOptions, type InputType, type LegacyAnnotatedStoryFn, type LegacyStoryAnnotationsOrFn, type LegacyStoryFn, type LoaderFunction, type Meta, type Parameters, type PartialStoryFn, type PlayFunction, type PlayFunctionContext, type Preview, type ProjectAnnotations, type Renderer, type SBArrayType, type SBEnumType, type SBIntersectionType, type SBObjectType, type SBOtherType, type SBScalarType, type SBType, type SBUnionType, type SeparatorOptions, type StepFunction, type StepLabel, type StepRunner, type Story, type StoryAnnotations, type StoryAnnotationsOrFn, type StoryContext, type StoryContextForEnhancers, type StoryContextForLoaders, type StoryContextUpdate, type StoryFn, type StoryId, type StoryIdentifier, type StoryKind, type StoryName, type StrictArgTypes, type StrictArgs, type StrictGlobalTypes, type StrictInputType, type StrictParameters, type Tag, type ViewMode, combineTags, includeConditionalArg, isExportStory, isMeta, isPreview, isStory, parseKind, sanitize, storyNameFromExport, toId };

172
frontend/node_modules/storybook/dist/csf/index.js generated vendored Normal file
View File

@@ -0,0 +1,172 @@
var h = Object.create;
var f = Object.defineProperty;
var O = Object.getOwnPropertyDescriptor;
var $ = Object.getOwnPropertyNames;
var v = Object.getPrototypeOf, j = Object.prototype.hasOwnProperty;
var a = (e, r) => f(e, "name", { value: r, configurable: !0 });
var _ = (e, r) => () => (r || e((r = { exports: {} }).exports, r), r.exports);
var C = (e, r, t, n) => {
if (r && typeof r == "object" || typeof r == "function")
for (let s of $(r))
!j.call(e, s) && s !== t && f(e, s, { get: () => r[s], enumerable: !(n = O(r, s)) || n.enumerable });
return e;
};
var E = (e, r, t) => (t = e != null ? h(v(e)) : {}, C(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
r || !e || !e.__esModule ? f(t, "default", { value: e, enumerable: !0 }) : t,
e
));
// ../node_modules/@ngard/tiny-isequal/index.js
var S = _((g) => {
Object.defineProperty(g, "__esModule", { value: !0 }), g.isEqual = /* @__PURE__ */ function() {
var e = Object.prototype.toString, r = Object.getPrototypeOf, t = Object.getOwnPropertySymbols ? function(n) {
return Object.keys(n).concat(Object.getOwnPropertySymbols(n));
} : Object.keys;
return function(n, s) {
return (/* @__PURE__ */ a(function l(o, i, p) {
var c, d, u, A = e.call(o), b = e.call(i);
if (o === i) return !0;
if (o == null || i == null) return !1;
if (p.indexOf(o) > -1 && p.indexOf(i) > -1) return !0;
if (p.push(o, i), A != b || (c = t(o), d = t(i), c.length != d.length || c.some(function(m) {
return !l(o[m], i[m], p);
}))) return !1;
switch (A.slice(8, -1)) {
case "Symbol":
return o.valueOf() == i.valueOf();
case "Date":
case "Number":
return +o == +i || +o != +o && +i != +i;
case "RegExp":
case "Function":
case "String":
case "Boolean":
return "" + o == "" + i;
case "Set":
case "Map":
c = o.entries(), d = i.entries();
do
if (!l((u = c.next()).value, d.next().value, p)) return !1;
while (!u.done);
return !0;
case "ArrayBuffer":
o = new Uint8Array(o), i = new Uint8Array(i);
case "DataView":
o = new Uint8Array(o.buffer), i = new Uint8Array(i.buffer);
case "Float32Array":
case "Float64Array":
case "Int8Array":
case "Int16Array":
case "Int32Array":
case "Uint8Array":
case "Uint16Array":
case "Uint32Array":
case "Uint8ClampedArray":
case "Arguments":
case "Array":
if (o.length != i.length) return !1;
for (u = 0; u < o.length; u++) if ((u in o || u in i) && (u in o != u in i || !l(o[u], i[u], p))) return !1;
return !0;
case "Object":
return l(r(o), r(i), p);
default:
return !1;
}
}, "n"))(n, s, []);
};
}();
});
// src/csf/toStartCaseStr.ts
function x(e) {
return e.replace(/_/g, " ").replace(/-/g, " ").replace(/\./g, " ").replace(/([^\n])([A-Z])([a-z])/g, (r, t, n, s) => `${t} ${n}${s}`).replace(
/([a-z])([A-Z])/g, (r, t, n) => `${t} ${n}`).replace(/([a-z])([0-9])/gi, (r, t, n) => `${t} ${n}`).replace(/([0-9])([a-z])/gi, (r, t, n) => `${t}\
${n}`).replace(/(\s|^)(\w)/g, (r, t, n) => `${t}${n.toUpperCase()}`).replace(/ +/g, " ").trim();
}
a(x, "toStartCaseStr");
// src/csf/includeConditionalArg.ts
var y = E(S(), 1);
var w = /* @__PURE__ */ a((e) => e.map((r) => typeof r < "u").filter(Boolean).length, "count"), P = /* @__PURE__ */ a((e, r) => {
let { exists: t, eq: n, neq: s, truthy: l } = e;
if (w([t, n, s, l]) > 1)
throw new Error(`Invalid conditional test ${JSON.stringify({ exists: t, eq: n, neq: s })}`);
if (typeof n < "u")
return (0, y.isEqual)(r, n);
if (typeof s < "u")
return !(0, y.isEqual)(r, s);
if (typeof t < "u") {
let i = typeof r < "u";
return t ? i : !i;
}
return (typeof l > "u" ? !0 : l) ? !!r : !r;
}, "testValue"), z = /* @__PURE__ */ a((e, r, t) => {
if (!e.if)
return !0;
let { arg: n, global: s } = e.if;
if (w([n, s]) !== 1)
throw new Error(`Invalid conditional value ${JSON.stringify({ arg: n, global: s })}`);
let l = n ? r[n] : t[s];
return P(e.if, l);
}, "includeConditionalArg");
// src/csf/csf-factories.ts
function F(e) {
return e != null && typeof e == "object" && "_tag" in e && e?._tag === "Preview";
}
a(F, "isPreview");
function G(e) {
return e != null && typeof e == "object" && "_tag" in e && e?._tag === "Meta";
}
a(G, "isMeta");
function J(e) {
return e != null && typeof e == "object" && "_tag" in e && e?._tag === "Story";
}
a(J, "isStory");
// src/csf/index.ts
var I = /* @__PURE__ */ a((e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "-").replace(/-+/g,
"-").replace(/^-+/, "").replace(/-+$/, ""), "sanitize"), R = /* @__PURE__ */ a((e, r) => {
let t = I(e);
if (t === "")
throw new Error(`Invalid ${r} '${e}', must include alphanumeric characters`);
return t;
}, "sanitizeSafe"), W = /* @__PURE__ */ a((e, r) => `${R(e, "kind")}${r ? `--${R(r, "name")}` : ""}`, "toId"), H = /* @__PURE__ */ a((e) => x(
e), "storyNameFromExport");
function T(e, r) {
return Array.isArray(r) ? r.includes(e) : e.match(r);
}
a(T, "matches");
function K(e, { includeStories: r, excludeStories: t }) {
return (
// https://babeljs.io/docs/en/babel-plugin-transform-modules-commonjs
e !== "__esModule" && (!r || T(e, r)) && (!t || !T(e, t))
);
}
a(K, "isExportStory");
var Q = /* @__PURE__ */ a((e, { rootSeparator: r, groupSeparator: t }) => {
let [n, s] = e.split(r, 2), l = (s || e).split(t).filter((o) => !!o);
return {
root: s ? n : null,
groups: l
};
}, "parseKind"), X = /* @__PURE__ */ a((...e) => {
let r = e.reduce((t, n) => (n.startsWith("!") ? t.delete(n.slice(1)) : t.add(n), t), /* @__PURE__ */ new Set());
return Array.from(r);
}, "combineTags");
export {
X as combineTags,
z as includeConditionalArg,
K as isExportStory,
G as isMeta,
F as isPreview,
J as isStory,
Q as parseKind,
I as sanitize,
H as storyNameFromExport,
W as toId
};

2935
frontend/node_modules/storybook/dist/docs-tools/index.cjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,160 @@
import { StrictArgTypes, Renderer, StoryContextForEnhancers } from 'storybook/internal/types';
import * as storybook_internal_csf from 'storybook/internal/csf';
type Component = any;
interface JsDocParam {
name: string | undefined | null;
description?: string | null;
}
interface JsDocReturns {
description?: string | null;
}
interface JsDocTags {
params?: JsDocParam[] | null;
returns?: JsDocReturns | null;
}
interface PropSummaryValue {
summary?: string;
detail?: string;
}
type PropType = PropSummaryValue;
type PropDefaultValue = PropSummaryValue;
interface PropDef {
name: string;
type: PropType | null;
sbType?: any;
required: boolean;
description?: string;
defaultValue?: PropDefaultValue | null;
jsDocTags?: JsDocTags;
}
type PropsExtractor = (component: Component) => {
rows?: PropDef[];
} | null;
type ArgTypesExtractor = (component: Component) => StrictArgTypes | null;
interface DocgenType {
name: string;
description?: string;
required?: boolean;
value?: any;
}
interface DocgenPropType extends DocgenType {
value?: any;
raw?: string;
computed?: boolean;
}
interface DocgenFlowType extends DocgenType {
type?: string;
raw?: string;
signature?: any;
elements?: any[];
}
interface DocgenTypeScriptType extends DocgenType {
raw?: string;
}
interface DocgenPropDefaultValue {
value: string;
computed?: boolean;
func?: boolean;
}
interface DocgenInfo {
type: DocgenPropType;
flowType?: DocgenFlowType;
tsType?: DocgenTypeScriptType;
required: boolean;
description: string;
defaultValue: DocgenPropDefaultValue;
}
declare enum TypeSystem {
JAVASCRIPT = "JavaScript",
FLOW = "Flow",
TYPESCRIPT = "TypeScript",
UNKNOWN = "Unknown"
}
declare const convert: (docgenInfo: DocgenInfo) => any;
declare function isDefaultValueBlacklisted(value: string): boolean;
declare const str: (obj: any) => string;
declare function hasDocgen<T = any>(component: Component): component is object & {
__docgenInfo: T;
};
declare function isValidDocgenSection(docgenSection: any): boolean;
declare function getDocgenSection(component: Component, section: string): any;
declare function getDocgenDescription(component: Component): string;
interface ExtractedJsDocParam extends JsDocParam {
type?: any;
getPrettyName: () => string | undefined;
getTypeName: () => string | null;
}
interface ExtractedJsDocReturns extends JsDocReturns {
type?: any;
getTypeName: () => string | null;
}
interface ExtractedJsDoc {
params?: ExtractedJsDocParam[] | null;
deprecated?: string | null;
returns?: ExtractedJsDocReturns | null;
ignore: boolean;
}
interface JsDocParsingOptions {
tags?: string[];
}
interface JsDocParsingResult {
includesJsDoc: boolean;
ignore: boolean;
description?: string;
extractedTags?: ExtractedJsDoc;
}
type ParseJsDoc = (value: string | null, options?: JsDocParsingOptions) => JsDocParsingResult;
declare const parseJsDoc: ParseJsDoc;
interface ExtractedProp {
propDef: PropDef;
docgenInfo: DocgenInfo;
jsDocTags?: ExtractedJsDoc;
typeSystem: TypeSystem;
}
type ExtractProps = (component: Component, section: string) => ExtractedProp[];
declare const extractComponentSectionArray: (docgenSection: any) => any;
declare const extractComponentSectionObject: (docgenSection: any) => (ExtractedProp | null)[];
declare const extractComponentProps: ExtractProps;
declare function extractComponentDescription(component?: Component): string;
declare const MAX_TYPE_SUMMARY_LENGTH = 90;
declare const MAX_DEFAULT_VALUE_SUMMARY_LENGTH = 50;
declare function isTooLongForTypeSummary(value: string): boolean;
declare function isTooLongForDefaultValueSummary(value: string): boolean;
declare function createSummaryValue(summary?: string, detail?: string): PropSummaryValue;
declare const normalizeNewlines: (string: string) => string;
declare const enhanceArgTypes: <TRenderer extends Renderer>(context: StoryContextForEnhancers<TRenderer>) => storybook_internal_csf.Parameters;
declare const ADDON_ID = "storybook/docs";
declare const PANEL_ID = "storybook/docs/panel";
declare const PARAM_KEY = "docs";
declare const SNIPPET_RENDERED = "storybook/docs/snippet-rendered";
declare enum SourceType {
/**
* AUTO is the default
*
* Use the CODE logic if:
*
* - The user has set a custom source snippet in `docs.source.code` story parameter
* - The story is not an args-based story
*
* Use the DYNAMIC rendered snippet if the story is an args story
*/
AUTO = "auto",
/** Render the code extracted by csf-plugin */
CODE = "code",
/** Render dynamically-rendered source snippet from the story's virtual DOM (currently React only) */
DYNAMIC = "dynamic"
}
export { ADDON_ID, type ArgTypesExtractor, type Component, type DocgenFlowType, type DocgenInfo, type DocgenPropDefaultValue, type DocgenPropType, type DocgenType, type DocgenTypeScriptType, type ExtractProps, type ExtractedJsDoc, type ExtractedJsDocParam, type ExtractedJsDocReturns, type ExtractedProp, type JsDocParam, type JsDocParsingOptions, type JsDocParsingResult, type JsDocReturns, type JsDocTags, MAX_DEFAULT_VALUE_SUMMARY_LENGTH, MAX_TYPE_SUMMARY_LENGTH, PANEL_ID, PARAM_KEY, type ParseJsDoc, type PropDef, type PropDefaultValue, type PropSummaryValue, type PropType, type PropsExtractor, SNIPPET_RENDERED, SourceType, TypeSystem, convert, createSummaryValue, enhanceArgTypes, extractComponentDescription, extractComponentProps, extractComponentSectionArray, extractComponentSectionObject, getDocgenDescription, getDocgenSection, hasDocgen, isDefaultValueBlacklisted, isTooLongForDefaultValueSummary, isTooLongForTypeSummary, isValidDocgenSection, normalizeNewlines, parseJsDoc, str };

2921
frontend/node_modules/storybook/dist/docs-tools/index.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,28 @@
"use strict";
var r = Object.defineProperty;
var G = Object.getOwnPropertyDescriptor;
var n = Object.getOwnPropertyNames;
var T = Object.prototype.hasOwnProperty;
var L = (o, t) => {
for (var H in t)
r(o, H, { get: t[H], enumerable: !0 });
}, c = (o, t, H, s) => {
if (t && typeof t == "object" || typeof t == "function")
for (let e of n(t))
!T.call(o, e) && e !== H && r(o, e, { get: () => t[e], enumerable: !(s = G(t, e)) || s.enumerable });
return o;
};
var h = (o) => c(r({}, "__esModule", { value: !0 }), o);
// src/highlight/index.ts
var x = {};
L(x, {
HIGHLIGHT: () => E,
REMOVE_HIGHLIGHT: () => _,
RESET_HIGHLIGHT: () => i,
SCROLL_INTO_VIEW: () => p
});
module.exports = h(x);
// src/highlight/constants.ts
var I = "storybook/highlight", E = `${I}/add`, _ = `${I}/remove`, i = `${I}/reset`, p = `${I}/scroll-into-view`;

View File

@@ -0,0 +1,73 @@
declare const HIGHLIGHT = "storybook/highlight/add";
declare const REMOVE_HIGHLIGHT = "storybook/highlight/remove";
declare const RESET_HIGHLIGHT = "storybook/highlight/reset";
declare const SCROLL_INTO_VIEW = "storybook/highlight/scroll-into-view";
declare const iconPaths: {
chevronLeft: string[];
chevronRight: string[];
info: string[];
shareAlt: string[];
};
type IconName = keyof typeof iconPaths;
interface HighlightParameters {
/**
* Highlight configuration
*
* @see https://storybook.js.org/docs/essentials/highlight#parameters
*/
highlight: {
/** Remove the addon panel and disable the addon's behavior */
disable?: boolean;
};
}
interface HighlightMenuItem {
/** Unique identifier for the menu item */
id: string;
/** Title of the menu item */
title: string;
/** Description of the menu item */
description?: string;
/** Icon for the menu item, left side */
iconLeft?: IconName;
/** Icon for the menu item, right side */
iconRight?: IconName;
/** Name for a channel event to trigger when the menu item is clicked */
clickEvent?: string;
/** HTML selectors for which this menu item should show (subset of `selectors`) */
selectors?: HighlightOptions['selectors'];
}
interface HighlightOptions {
/** Unique identifier for the highlight, required if you want to remove the highlight later */
id?: string;
/** HTML selectors of the elements */
selectors: string[];
/** Priority of the highlight, higher takes precedence, defaults to 0 */
priority?: number;
/** CSS styles to apply to the highlight */
styles?: Record<string, string>;
/** CSS styles to apply to the highlight when it is hovered */
hoverStyles?: Record<string, string>;
/** CSS styles to apply to the highlight when it is focused or selected */
focusStyles?: Record<string, string>;
/** Keyframes required for animations */
keyframes?: string;
/** Groups of menu items to show when the highlight is selected */
menu?: HighlightMenuItem[][];
}
interface ClickEventDetails {
top: number;
left: number;
width: number;
height: number;
selectors: string[];
element: {
attributes: Record<string, string>;
localName: string;
tagName: string;
outerHTML: string;
};
}
export { type ClickEventDetails, HIGHLIGHT, type HighlightMenuItem, type HighlightOptions, type HighlightParameters, REMOVE_HIGHLIGHT, RESET_HIGHLIGHT, SCROLL_INTO_VIEW };

View File

@@ -0,0 +1,8 @@
// src/highlight/constants.ts
var t = "storybook/highlight", o = `${t}/add`, e = `${t}/remove`, H = `${t}/reset`, I = `${t}/scroll-into-view`;
export {
o as HIGHLIGHT,
e as REMOVE_HIGHLIGHT,
H as RESET_HIGHLIGHT,
I as SCROLL_INTO_VIEW
};

17
frontend/node_modules/storybook/dist/index.cjs generated vendored Normal file
View File

@@ -0,0 +1,17 @@
"use strict";
var l = Object.defineProperty;
var t = Object.getOwnPropertyDescriptor;
var h = Object.getOwnPropertyNames;
var n = Object.prototype.hasOwnProperty;
var d = (o, e, s, i) => {
if (e && typeof e == "object" || typeof e == "function")
for (let u of h(e))
!n.call(o, u) && u !== s && l(o, u, { get: () => e[u], enumerable: !(i = t(e, u)) || i.enumerable });
return o;
};
var r = (o) => d(l({}, "__esModule", { value: !0 }), o);
// src/index.ts
var a = {};
module.exports = r(a);
console.log("This file should remain unused until we have figured out the best API");

2
frontend/node_modules/storybook/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export { }

2
frontend/node_modules/storybook/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
// src/index.ts
console.log("This file should remain unused until we have figured out the best API");

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,106 @@
import { StoryId } from 'storybook/internal/types';
interface Call {
id: string;
cursor: number;
storyId: StoryId;
ancestors: Call['id'][];
path: Array<string | CallRef>;
method: string;
args: any[];
interceptable: boolean;
retain: boolean;
status?: CallStates.DONE | CallStates.ERROR | CallStates.ACTIVE | CallStates.WAITING;
exception?: {
name: Error['name'];
message: Error['message'];
stack: Error['stack'];
callId: Call['id'];
showDiff?: boolean;
diff?: string;
actual?: unknown;
expected?: unknown;
};
}
declare enum CallStates {
DONE = "done",
ERROR = "error",
ACTIVE = "active",
WAITING = "waiting"
}
interface CallRef {
__callId__: Call['id'];
}
interface ElementRef {
__element__: {
prefix?: string;
localName: string;
id?: string;
classNames?: string[];
innerText?: string;
};
}
interface ControlStates {
detached: boolean;
start: boolean;
back: boolean;
goto: boolean;
next: boolean;
end: boolean;
}
interface LogItem {
callId: Call['id'];
status: Call['status'];
ancestors: Call['id'][];
}
interface SyncPayload {
controlStates: ControlStates;
logItems: LogItem[];
pausedAt?: Call['id'];
}
interface State {
renderPhase?: 'loading' | 'rendering' | 'playing' | 'played' | 'completed' | 'aborted' | 'errored';
isDebugging: boolean;
isPlaying: boolean;
isLocked: boolean;
cursor: number;
calls: Call[];
shadowCalls: Call[];
callRefsByResult: Map<any, CallRef & {
retain: boolean;
}>;
chainedCallIds: Set<Call['id']>;
ancestors: Call['id'][];
playUntil?: Call['id'];
resolvers: Record<Call['id'], Function>;
syncTimeout?: ReturnType<typeof setTimeout>;
forwardedException?: Error;
}
interface Options {
intercept?: boolean | ((method: string, path: Array<string | CallRef>) => boolean);
retain?: boolean;
mutate?: boolean;
path?: Array<string | CallRef>;
getArgs?: (call: Call, state: State) => Call['args'];
getKeys?: (originalObject: Record<string, unknown>, depth: number) => string[];
}
/**
* Instruments an object or module by traversing its properties, patching any functions (methods) to
* enable debugging. Patched functions will emit a `call` event when invoked. When intercept = true,
* patched functions will return a Promise when the debugger stops before this function. As such,
* "interceptable" functions will have to be `await`-ed.
*/
declare function instrument<TObj extends Record<string, any>>(obj: TObj, options?: Options): TObj;
declare const EVENTS: {
CALL: string;
SYNC: string;
START: string;
BACK: string;
GOTO: string;
NEXT: string;
END: string;
};
export { type Call, type CallRef, CallStates, type ControlStates, EVENTS, type ElementRef, type LogItem, type Options, type State, type SyncPayload, instrument };

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

5015
frontend/node_modules/storybook/dist/manager-api/index.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,89 @@
import { StoryId } from 'storybook/internal/csf';
type StatusValue = 'status-value:pending' | 'status-value:success' | 'status-value:error' | 'status-value:warning' | 'status-value:unknown';
type StatusTypeId = string;
interface Status {
value: StatusValue;
typeId: StatusTypeId;
storyId: StoryId;
title: string;
description: string;
data?: any;
sidebarContextMenu?: boolean;
}
declare abstract class StorybookError extends Error {
/** Category of the error. Used to classify the type of error, e.g., 'PREVIEW_API'. */
readonly category: string;
/** Code representing the error. Used to uniquely identify the error, e.g., 1. */
readonly code: number;
/**
* Data associated with the error. Used to provide additional information in the error message or
* to be passed to telemetry.
*/
readonly 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.
*/
readonly documentation: boolean | string | string[];
/** Flag used to easily determine if the error originates from Storybook. */
readonly fromStorybook: true;
get fullErrorCode(): `SB_${string}_${string}`;
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
get name(): string;
constructor(props: {
category: string;
code: number;
message: string;
documentation?: boolean | string | string[];
});
/** Generates the error message along with additional documentation link (if applicable). */
static getFullMessage({ documentation, code, category, message, }: ConstructorParameters<typeof StorybookError>[0]): string;
}
/**
* If you can't find a suitable category for your error, create one based on the package name/file
* path of which the error is thrown. For instance: If it's from `storybook/internal/client-logger`,
* then MANAGER_CLIENT-LOGGER
*
* Categories are prefixed by a logical grouping, e.g. MANAGER_ to prevent manager and preview
* errors from having the same category and error code.
*/
declare enum Category {
MANAGER_UNCAUGHT = "MANAGER_UNCAUGHT",
MANAGER_UI = "MANAGER_UI",
MANAGER_API = "MANAGER_API",
MANAGER_CLIENT_LOGGER = "MANAGER_CLIENT-LOGGER",
MANAGER_CHANNELS = "MANAGER_CHANNELS",
MANAGER_CORE_EVENTS = "MANAGER_CORE-EVENTS",
MANAGER_ROUTER = "MANAGER_ROUTER",
MANAGER_THEMING = "MANAGER_THEMING"
}
declare class ProviderDoesNotExtendBaseProviderError extends StorybookError {
constructor();
}
declare class UncaughtManagerError extends StorybookError {
data: {
error: Error;
};
constructor(data: {
error: Error;
});
}
declare class StatusTypeIdMismatchError extends StorybookError {
data: {
status: Status;
typeId: StatusTypeId;
};
constructor(data: {
status: Status;
typeId: StatusTypeId;
});
}
export { Category, ProviderDoesNotExtendBaseProviderError, StatusTypeIdMismatchError, UncaughtManagerError };

99
frontend/node_modules/storybook/dist/manager-errors.js generated vendored Normal file
View File

@@ -0,0 +1,99 @@
var R = Object.defineProperty;
var r = (A, s) => R(A, "name", { value: s, configurable: !0 });
// src/storybook-error.ts
function l({
code: A,
category: s
}) {
let e = String(A).padStart(4, "0");
return `SB_${s}_${e}`;
}
r(l, "parseErrorCode");
var c = class c extends Error {
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() {
return l({ 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})`;
}
/** Generates the error message along with additional documentation link (if applicable). */
static getFullMessage({
documentation: e,
code: p,
category: y,
message: G
}) {
let n;
return e === !0 ? n = `https://storybook.js.org/error/${l({ code: p, category: y })}` : typeof e == "string" ? n = e : Array.isArray(e) &&
(n = `
${e.map((g) => ` - ${g}`).join(`
`)}`), `${G}${n != null ? `
More info: ${n}
` : ""}`;
}
};
r(c, "StorybookError");
var o = c;
// src/manager-errors.ts
var M = /* @__PURE__ */ ((t) => (t.MANAGER_UNCAUGHT = "MANAGER_UNCAUGHT", t.MANAGER_UI = "MANAGER_UI", t.MANAGER_API = "MANAGER_API", t.MANAGER_CLIENT_LOGGER =
"MANAGER_CLIENT-LOGGER", t.MANAGER_CHANNELS = "MANAGER_CHANNELS", t.MANAGER_CORE_EVENTS = "MANAGER_CORE-EVENTS", t.MANAGER_ROUTER = "MANAGER\
_ROUTER", t.MANAGER_THEMING = "MANAGER_THEMING", t))(M || {}), a = class a extends o {
constructor() {
super({
category: "MANAGER_UI",
code: 1,
message: "The Provider passed into Storybook's UI is not extended from the base Provider. Please check your Provider implementation."
});
}
};
r(a, "ProviderDoesNotExtendBaseProviderError");
var d = a, u = class u extends o {
constructor(e) {
super({
category: "MANAGER_UNCAUGHT",
code: 1,
message: e.error.message
});
this.data = e;
this.stack = e.error.stack;
}
};
r(u, "UncaughtManagerError");
var E = u, i = class i extends o {
constructor(e) {
super({
category: "MANAGER_API",
code: 1,
message: `Status has typeId "${e.status.typeId}" but was added to store with typeId "${e.typeId}". Full status: ${JSON.stringify(
e.status,
null,
2
)}`
});
this.data = e;
}
};
r(i, "StatusTypeIdMismatchError");
var N = i;
export {
M as Category,
d as ProviderDoesNotExtendBaseProviderError,
N as StatusTypeIdMismatchError,
E as UncaughtManagerError
};

View File

@@ -0,0 +1,810 @@
"use strict";
var r = Object.defineProperty;
var E = Object.getOwnPropertyDescriptor;
var _ = Object.getOwnPropertyNames;
var s = Object.prototype.hasOwnProperty;
var S = (o, e) => {
for (var n in e)
r(o, n, { get: e[n], enumerable: !0 });
}, i = (o, e, n, c) => {
if (e && typeof e == "object" || typeof e == "function")
for (let t of _(e))
!s.call(o, t) && t !== n && r(o, t, { get: () => e[t], enumerable: !(c = E(e, t)) || c.enumerable });
return o;
};
var T = (o) => i(r({}, "__esModule", { value: !0 }), o);
// src/manager/globals-module-info.ts
var A = {};
S(A, {
globalsModuleInfoMap: () => R
});
module.exports = T(A);
// src/manager/globals/exports.ts
var l = {
react: [
"Children",
"Component",
"Fragment",
"Profiler",
"PureComponent",
"StrictMode",
"Suspense",
"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",
"act",
"cloneElement",
"createContext",
"createElement",
"createFactory",
"createRef",
"forwardRef",
"isValidElement",
"lazy",
"memo",
"startTransition",
"unstable_act",
"useCallback",
"useContext",
"useDebugValue",
"useDeferredValue",
"useEffect",
"useId",
"useImperativeHandle",
"useInsertionEffect",
"useLayoutEffect",
"useMemo",
"useReducer",
"useRef",
"useState",
"useSyncExternalStore",
"useTransition",
"version"
],
"react-dom": [
"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",
"createPortal",
"createRoot",
"findDOMNode",
"flushSync",
"hydrate",
"hydrateRoot",
"render",
"unmountComponentAtNode",
"unstable_batchedUpdates",
"unstable_renderSubtreeIntoContainer",
"version"
],
"react-dom/client": ["createRoot", "hydrateRoot"],
"@storybook/icons": [
"AccessibilityAltIcon",
"AccessibilityIcon",
"AccessibilityIgnoredIcon",
"AddIcon",
"AdminIcon",
"AlertAltIcon",
"AlertIcon",
"AlignLeftIcon",
"AlignRightIcon",
"AppleIcon",
"ArrowBottomLeftIcon",
"ArrowBottomRightIcon",
"ArrowDownIcon",
"ArrowLeftIcon",
"ArrowRightIcon",
"ArrowSolidDownIcon",
"ArrowSolidLeftIcon",
"ArrowSolidRightIcon",
"ArrowSolidUpIcon",
"ArrowTopLeftIcon",
"ArrowTopRightIcon",
"ArrowUpIcon",
"AzureDevOpsIcon",
"BackIcon",
"BasketIcon",
"BatchAcceptIcon",
"BatchDenyIcon",
"BeakerIcon",
"BellIcon",
"BitbucketIcon",
"BoldIcon",
"BookIcon",
"BookmarkHollowIcon",
"BookmarkIcon",
"BottomBarIcon",
"BottomBarToggleIcon",
"BoxIcon",
"BranchIcon",
"BrowserIcon",
"ButtonIcon",
"CPUIcon",
"CalendarIcon",
"CameraIcon",
"CameraStabilizeIcon",
"CategoryIcon",
"CertificateIcon",
"ChangedIcon",
"ChatIcon",
"CheckIcon",
"ChevronDownIcon",
"ChevronLeftIcon",
"ChevronRightIcon",
"ChevronSmallDownIcon",
"ChevronSmallLeftIcon",
"ChevronSmallRightIcon",
"ChevronSmallUpIcon",
"ChevronUpIcon",
"ChromaticIcon",
"ChromeIcon",
"CircleHollowIcon",
"CircleIcon",
"ClearIcon",
"CloseAltIcon",
"CloseIcon",
"CloudHollowIcon",
"CloudIcon",
"CogIcon",
"CollapseIcon",
"CommandIcon",
"CommentAddIcon",
"CommentIcon",
"CommentsIcon",
"CommitIcon",
"CompassIcon",
"ComponentDrivenIcon",
"ComponentIcon",
"ContrastIcon",
"ContrastIgnoredIcon",
"ControlsIcon",
"CopyIcon",
"CreditIcon",
"CrossIcon",
"DashboardIcon",
"DatabaseIcon",
"DeleteIcon",
"DiamondIcon",
"DirectionIcon",
"DiscordIcon",
"DocChartIcon",
"DocListIcon",
"DocumentIcon",
"DownloadIcon",
"DragIcon",
"EditIcon",
"EllipsisIcon",
"EmailIcon",
"ExpandAltIcon",
"ExpandIcon",
"EyeCloseIcon",
"EyeIcon",
"FaceHappyIcon",
"FaceNeutralIcon",
"FaceSadIcon",
"FacebookIcon",
"FailedIcon",
"FastForwardIcon",
"FigmaIcon",
"FilterIcon",
"FlagIcon",
"FolderIcon",
"FormIcon",
"GDriveIcon",
"GithubIcon",
"GitlabIcon",
"GlobeIcon",
"GoogleIcon",
"GraphBarIcon",
"GraphLineIcon",
"GraphqlIcon",
"GridAltIcon",
"GridIcon",
"GrowIcon",
"HeartHollowIcon",
"HeartIcon",
"HomeIcon",
"HourglassIcon",
"InfoIcon",
"ItalicIcon",
"JumpToIcon",
"KeyIcon",
"LightningIcon",
"LightningOffIcon",
"LinkBrokenIcon",
"LinkIcon",
"LinkedinIcon",
"LinuxIcon",
"ListOrderedIcon",
"ListUnorderedIcon",
"LocationIcon",
"LockIcon",
"MarkdownIcon",
"MarkupIcon",
"MediumIcon",
"MemoryIcon",
"MenuIcon",
"MergeIcon",
"MirrorIcon",
"MobileIcon",
"MoonIcon",
"NutIcon",
"OutboxIcon",
"OutlineIcon",
"PaintBrushIcon",
"PaperClipIcon",
"ParagraphIcon",
"PassedIcon",
"PhoneIcon",
"PhotoDragIcon",
"PhotoIcon",
"PhotoStabilizeIcon",
"PinAltIcon",
"PinIcon",
"PlayAllHollowIcon",
"PlayBackIcon",
"PlayHollowIcon",
"PlayIcon",
"PlayNextIcon",
"PlusIcon",
"PointerDefaultIcon",
"PointerHandIcon",
"PowerIcon",
"PrintIcon",
"ProceedIcon",
"ProfileIcon",
"PullRequestIcon",
"QuestionIcon",
"RSSIcon",
"RedirectIcon",
"ReduxIcon",
"RefreshIcon",
"ReplyIcon",
"RepoIcon",
"RequestChangeIcon",
"RewindIcon",
"RulerIcon",
"SaveIcon",
"SearchIcon",
"ShareAltIcon",
"ShareIcon",
"ShieldIcon",
"SideBySideIcon",
"SidebarAltIcon",
"SidebarAltToggleIcon",
"SidebarIcon",
"SidebarToggleIcon",
"SpeakerIcon",
"StackedIcon",
"StarHollowIcon",
"StarIcon",
"StatusFailIcon",
"StatusIcon",
"StatusPassIcon",
"StatusWarnIcon",
"StickerIcon",
"StopAltHollowIcon",
"StopAltIcon",
"StopIcon",
"StorybookIcon",
"StructureIcon",
"SubtractIcon",
"SunIcon",
"SupportIcon",
"SweepIcon",
"SwitchAltIcon",
"SyncIcon",
"TabletIcon",
"ThumbsUpIcon",
"TimeIcon",
"TimerIcon",
"TransferIcon",
"TrashIcon",
"TwitterIcon",
"TypeIcon",
"UbuntuIcon",
"UndoIcon",
"UnfoldIcon",
"UnlockIcon",
"UnpinIcon",
"UploadIcon",
"UserAddIcon",
"UserAltIcon",
"UserIcon",
"UsersIcon",
"VSCodeIcon",
"VerifiedIcon",
"VideoIcon",
"WandIcon",
"WatchIcon",
"WindowsIcon",
"WrenchIcon",
"XIcon",
"YoutubeIcon",
"ZoomIcon",
"ZoomOutIcon",
"ZoomResetIcon",
"iconList"
],
"storybook/manager-api": [
"ActiveTabs",
"Consumer",
"ManagerContext",
"Provider",
"RequestResponseError",
"addons",
"combineParameters",
"controlOrMetaKey",
"controlOrMetaSymbol",
"eventMatchesShortcut",
"eventToShortcut",
"experimental_MockUniversalStore",
"experimental_UniversalStore",
"experimental_getStatusStore",
"experimental_getTestProviderStore",
"experimental_requestResponse",
"experimental_useStatusStore",
"experimental_useTestProviderStore",
"experimental_useUniversalStore",
"internal_fullStatusStore",
"internal_fullTestProviderStore",
"internal_universalStatusStore",
"internal_universalTestProviderStore",
"isMacLike",
"isShortcutTaken",
"keyToSymbol",
"merge",
"mockChannel",
"optionOrAltSymbol",
"shortcutMatchesShortcut",
"shortcutToHumanString",
"types",
"useAddonState",
"useArgTypes",
"useArgs",
"useChannel",
"useGlobalTypes",
"useGlobals",
"useParameter",
"useSharedState",
"useStoryPrepared",
"useStorybookApi",
"useStorybookState"
],
"storybook/theming": [
"CacheProvider",
"ClassNames",
"Global",
"ThemeProvider",
"background",
"color",
"convert",
"create",
"createCache",
"createGlobal",
"createReset",
"css",
"darken",
"ensure",
"ignoreSsrWarning",
"isPropValid",
"jsx",
"keyframes",
"lighten",
"styled",
"themes",
"typography",
"useTheme",
"withTheme"
],
"storybook/theming/create": ["create", "themes"],
"storybook/test": [
"buildQueries",
"clearAllMocks",
"configure",
"createEvent",
"expect",
"findAllByAltText",
"findAllByDisplayValue",
"findAllByLabelText",
"findAllByPlaceholderText",
"findAllByRole",
"findAllByTestId",
"findAllByText",
"findAllByTitle",
"findByAltText",
"findByDisplayValue",
"findByLabelText",
"findByPlaceholderText",
"findByRole",
"findByTestId",
"findByText",
"findByTitle",
"fireEvent",
"fn",
"getAllByAltText",
"getAllByDisplayValue",
"getAllByLabelText",
"getAllByPlaceholderText",
"getAllByRole",
"getAllByTestId",
"getAllByText",
"getAllByTitle",
"getByAltText",
"getByDisplayValue",
"getByLabelText",
"getByPlaceholderText",
"getByRole",
"getByTestId",
"getByText",
"getByTitle",
"getConfig",
"getDefaultNormalizer",
"getElementError",
"getNodeText",
"getQueriesForElement",
"getRoles",
"getSuggestedQuery",
"isInaccessible",
"isMockFunction",
"logDOM",
"logRoles",
"mocked",
"mocks",
"onMockCall",
"prettyDOM",
"prettyFormat",
"queries",
"queryAllByAltText",
"queryAllByAttribute",
"queryAllByDisplayValue",
"queryAllByLabelText",
"queryAllByPlaceholderText",
"queryAllByRole",
"queryAllByTestId",
"queryAllByText",
"queryAllByTitle",
"queryByAltText",
"queryByAttribute",
"queryByDisplayValue",
"queryByLabelText",
"queryByPlaceholderText",
"queryByRole",
"queryByTestId",
"queryByText",
"queryByTitle",
"queryHelpers",
"resetAllMocks",
"restoreAllMocks",
"screen",
"spyOn",
"uninstrumentedUserEvent",
"userEvent",
"waitFor",
"waitForElementToBeRemoved",
"within"
],
"storybook/internal/channels": [
"Channel",
"HEARTBEAT_INTERVAL",
"HEARTBEAT_MAX_LATENCY",
"PostMessageTransport",
"WebsocketTransport",
"createBrowserChannel"
],
"storybook/internal/client-logger": ["deprecate", "logger", "once", "pretty"],
"storybook/internal/components": [
"A",
"ActionBar",
"AddonPanel",
"Badge",
"Bar",
"Blockquote",
"Button",
"Checkbox",
"ClipboardCode",
"Code",
"DL",
"Div",
"DocumentWrapper",
"EmptyTabContent",
"ErrorFormatter",
"FlexBar",
"Form",
"H1",
"H2",
"H3",
"H4",
"H5",
"H6",
"HR",
"IconButton",
"Img",
"LI",
"Link",
"ListItem",
"Loader",
"Modal",
"OL",
"P",
"Placeholder",
"Pre",
"ProgressSpinner",
"ResetWrapper",
"ScrollArea",
"Separator",
"Spaced",
"Span",
"StorybookIcon",
"StorybookLogo",
"SyntaxHighlighter",
"TT",
"TabBar",
"TabButton",
"TabWrapper",
"Table",
"Tabs",
"TabsState",
"TooltipLinkList",
"TooltipMessage",
"TooltipNote",
"UL",
"WithTooltip",
"WithTooltipPure",
"Zoom",
"codeCommon",
"components",
"createCopyToClipboardFunction",
"getStoryHref",
"interleaveSeparators",
"nameSpaceClassNames",
"resetComponents",
"withReset"
],
"storybook/internal/core-errors": [
"ARGTYPES_INFO_REQUEST",
"ARGTYPES_INFO_RESPONSE",
"CHANNEL_CREATED",
"CHANNEL_WS_DISCONNECT",
"CONFIG_ERROR",
"CREATE_NEW_STORYFILE_REQUEST",
"CREATE_NEW_STORYFILE_RESPONSE",
"CURRENT_STORY_WAS_SET",
"DOCS_PREPARED",
"DOCS_RENDERED",
"FILE_COMPONENT_SEARCH_REQUEST",
"FILE_COMPONENT_SEARCH_RESPONSE",
"FORCE_REMOUNT",
"FORCE_RE_RENDER",
"GLOBALS_UPDATED",
"NAVIGATE_URL",
"PLAY_FUNCTION_THREW_EXCEPTION",
"PRELOAD_ENTRIES",
"PREVIEW_BUILDER_PROGRESS",
"PREVIEW_KEYDOWN",
"REGISTER_SUBSCRIPTION",
"REQUEST_WHATS_NEW_DATA",
"RESET_STORY_ARGS",
"RESULT_WHATS_NEW_DATA",
"SAVE_STORY_REQUEST",
"SAVE_STORY_RESPONSE",
"SELECT_STORY",
"SET_CONFIG",
"SET_CURRENT_STORY",
"SET_FILTER",
"SET_GLOBALS",
"SET_INDEX",
"SET_STORIES",
"SET_WHATS_NEW_CACHE",
"SHARED_STATE_CHANGED",
"SHARED_STATE_SET",
"STORIES_COLLAPSE_ALL",
"STORIES_EXPAND_ALL",
"STORY_ARGS_UPDATED",
"STORY_CHANGED",
"STORY_ERRORED",
"STORY_FINISHED",
"STORY_HOT_UPDATED",
"STORY_INDEX_INVALIDATED",
"STORY_MISSING",
"STORY_PREPARED",
"STORY_RENDERED",
"STORY_RENDER_PHASE_CHANGED",
"STORY_SPECIFIED",
"STORY_THREW_EXCEPTION",
"STORY_UNCHANGED",
"TELEMETRY_ERROR",
"TOGGLE_WHATS_NEW_NOTIFICATIONS",
"UNHANDLED_ERRORS_WHILE_PLAYING",
"UPDATE_GLOBALS",
"UPDATE_QUERY_PARAMS",
"UPDATE_STORY_ARGS"
],
"storybook/internal/core-events": [
"ARGTYPES_INFO_REQUEST",
"ARGTYPES_INFO_RESPONSE",
"CHANNEL_CREATED",
"CHANNEL_WS_DISCONNECT",
"CONFIG_ERROR",
"CREATE_NEW_STORYFILE_REQUEST",
"CREATE_NEW_STORYFILE_RESPONSE",
"CURRENT_STORY_WAS_SET",
"DOCS_PREPARED",
"DOCS_RENDERED",
"FILE_COMPONENT_SEARCH_REQUEST",
"FILE_COMPONENT_SEARCH_RESPONSE",
"FORCE_REMOUNT",
"FORCE_RE_RENDER",
"GLOBALS_UPDATED",
"NAVIGATE_URL",
"PLAY_FUNCTION_THREW_EXCEPTION",
"PRELOAD_ENTRIES",
"PREVIEW_BUILDER_PROGRESS",
"PREVIEW_KEYDOWN",
"REGISTER_SUBSCRIPTION",
"REQUEST_WHATS_NEW_DATA",
"RESET_STORY_ARGS",
"RESULT_WHATS_NEW_DATA",
"SAVE_STORY_REQUEST",
"SAVE_STORY_RESPONSE",
"SELECT_STORY",
"SET_CONFIG",
"SET_CURRENT_STORY",
"SET_FILTER",
"SET_GLOBALS",
"SET_INDEX",
"SET_STORIES",
"SET_WHATS_NEW_CACHE",
"SHARED_STATE_CHANGED",
"SHARED_STATE_SET",
"STORIES_COLLAPSE_ALL",
"STORIES_EXPAND_ALL",
"STORY_ARGS_UPDATED",
"STORY_CHANGED",
"STORY_ERRORED",
"STORY_FINISHED",
"STORY_HOT_UPDATED",
"STORY_INDEX_INVALIDATED",
"STORY_MISSING",
"STORY_PREPARED",
"STORY_RENDERED",
"STORY_RENDER_PHASE_CHANGED",
"STORY_SPECIFIED",
"STORY_THREW_EXCEPTION",
"STORY_UNCHANGED",
"TELEMETRY_ERROR",
"TOGGLE_WHATS_NEW_NOTIFICATIONS",
"UNHANDLED_ERRORS_WHILE_PLAYING",
"UPDATE_GLOBALS",
"UPDATE_QUERY_PARAMS",
"UPDATE_STORY_ARGS"
],
"storybook/internal/manager-errors": [
"Category",
"ProviderDoesNotExtendBaseProviderError",
"StatusTypeIdMismatchError",
"UncaughtManagerError"
],
"storybook/internal/router": [
"BaseLocationProvider",
"DEEPLY_EQUAL",
"Link",
"Location",
"LocationProvider",
"Match",
"Route",
"buildArgsParam",
"deepDiff",
"getMatch",
"parsePath",
"queryFromLocation",
"stringifyQuery",
"useNavigate"
],
"storybook/internal/types": ["Addon_TypesEnum"],
"storybook/internal/manager-api": [
"ActiveTabs",
"Consumer",
"ManagerContext",
"Provider",
"RequestResponseError",
"addons",
"combineParameters",
"controlOrMetaKey",
"controlOrMetaSymbol",
"eventMatchesShortcut",
"eventToShortcut",
"experimental_MockUniversalStore",
"experimental_UniversalStore",
"experimental_getStatusStore",
"experimental_getTestProviderStore",
"experimental_requestResponse",
"experimental_useStatusStore",
"experimental_useTestProviderStore",
"experimental_useUniversalStore",
"internal_fullStatusStore",
"internal_fullTestProviderStore",
"internal_universalStatusStore",
"internal_universalTestProviderStore",
"isMacLike",
"isShortcutTaken",
"keyToSymbol",
"merge",
"mockChannel",
"optionOrAltSymbol",
"shortcutMatchesShortcut",
"shortcutToHumanString",
"types",
"useAddonState",
"useArgTypes",
"useArgs",
"useChannel",
"useGlobalTypes",
"useGlobals",
"useParameter",
"useSharedState",
"useStoryPrepared",
"useStorybookApi",
"useStorybookState"
],
"storybook/internal/theming": [
"CacheProvider",
"ClassNames",
"Global",
"ThemeProvider",
"background",
"color",
"convert",
"create",
"createCache",
"createGlobal",
"createReset",
"css",
"darken",
"ensure",
"ignoreSsrWarning",
"isPropValid",
"jsx",
"keyframes",
"lighten",
"styled",
"themes",
"typography",
"useTheme",
"withTheme"
],
"storybook/internal/theming/create": ["create", "themes"]
};
// src/manager/globals/globals.ts
var a = {
react: "__REACT__",
"react-dom": "__REACT_DOM__",
"react-dom/client": "__REACT_DOM_CLIENT__",
"@storybook/icons": "__STORYBOOK_ICONS__",
"storybook/manager-api": "__STORYBOOK_API__",
"storybook/test": "__STORYBOOK_TEST__",
"storybook/theming": "__STORYBOOK_THEMING__",
"storybook/theming/create": "__STORYBOOK_THEMING_CREATE__",
"storybook/internal/channels": "__STORYBOOK_CHANNELS__",
"storybook/internal/client-logger": "__STORYBOOK_CLIENT_LOGGER__",
"storybook/internal/components": "__STORYBOOK_COMPONENTS__",
"storybook/internal/core-errors": "__STORYBOOK_CORE_EVENTS__",
"storybook/internal/core-events": "__STORYBOOK_CORE_EVENTS__",
"storybook/internal/manager-errors": "__STORYBOOK_CORE_EVENTS_MANAGER_ERRORS__",
"storybook/internal/router": "__STORYBOOK_ROUTER__",
"storybook/internal/types": "__STORYBOOK_TYPES__",
// @deprecated TODO: delete in 9.1
"storybook/internal/manager-api": "__STORYBOOK_API__",
"storybook/internal/theming": "__STORYBOOK_THEMING__",
"storybook/internal/theming/create": "__STORYBOOK_THEMING_CREATE__"
}, I = Object.keys(a);
// src/manager/globals/globals-module-info.ts
var R = I.reduce(
(o, e) => (o[e] = {
type: "esm",
varName: a[e],
namedExports: l[e],
defaultExport: !0
}, o),
{}
);

View File

@@ -0,0 +1,36 @@
declare type ModuleType = "esm" | "cjs";
/**
* Information that discribes a module to be imported.
*/
declare type ModuleInfo = {
/**
* Global variable name with which the import statements of the module
* should be replaced.
*/
varName: string;
/**
* Type (either `"esm"` or `"cjs"`) that determines the internal behavior of
* this plugin. Defaults to `"esm"`.
*/
type?: ModuleType;
/**
* Names of variables that are exported from the module and may be imported
* from another module.
* No effect if `type` is `"cjs"`.
*/
namedExports?: readonly string[];
/**
* Set to `false` to prevent emitting code for default import/export
* (which you won't need to unless you are finicky).
* Defaults to `true`. No effect if `type` is `"cjs"`.
*/
defaultExport?: boolean;
};
declare const globalsModuleInfoMap: Required<Record<"react" | "react-dom" | "react-dom/client" | "@storybook/icons" | "storybook/manager-api" | "storybook/test" | "storybook/theming" | "storybook/theming/create" | "storybook/internal/channels" | "storybook/internal/client-logger" | "storybook/internal/components" | "storybook/internal/core-errors" | "storybook/internal/core-events" | "storybook/internal/manager-errors" | "storybook/internal/router" | "storybook/internal/types" | "storybook/internal/manager-api" | "storybook/internal/theming" | "storybook/internal/theming/create", Required<ModuleInfo>>>;
export { globalsModuleInfoMap };

View File

@@ -0,0 +1,797 @@
import ESM_COMPAT_Module from "node:module";
import { fileURLToPath as ESM_COMPAT_fileURLToPath } from 'node:url';
import { dirname as ESM_COMPAT_dirname } from 'node:path';
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
const __dirname = ESM_COMPAT_dirname(__filename);
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
// src/manager/globals/exports.ts
var n = {
react: [
"Children",
"Component",
"Fragment",
"Profiler",
"PureComponent",
"StrictMode",
"Suspense",
"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",
"act",
"cloneElement",
"createContext",
"createElement",
"createFactory",
"createRef",
"forwardRef",
"isValidElement",
"lazy",
"memo",
"startTransition",
"unstable_act",
"useCallback",
"useContext",
"useDebugValue",
"useDeferredValue",
"useEffect",
"useId",
"useImperativeHandle",
"useInsertionEffect",
"useLayoutEffect",
"useMemo",
"useReducer",
"useRef",
"useState",
"useSyncExternalStore",
"useTransition",
"version"
],
"react-dom": [
"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",
"createPortal",
"createRoot",
"findDOMNode",
"flushSync",
"hydrate",
"hydrateRoot",
"render",
"unmountComponentAtNode",
"unstable_batchedUpdates",
"unstable_renderSubtreeIntoContainer",
"version"
],
"react-dom/client": ["createRoot", "hydrateRoot"],
"@storybook/icons": [
"AccessibilityAltIcon",
"AccessibilityIcon",
"AccessibilityIgnoredIcon",
"AddIcon",
"AdminIcon",
"AlertAltIcon",
"AlertIcon",
"AlignLeftIcon",
"AlignRightIcon",
"AppleIcon",
"ArrowBottomLeftIcon",
"ArrowBottomRightIcon",
"ArrowDownIcon",
"ArrowLeftIcon",
"ArrowRightIcon",
"ArrowSolidDownIcon",
"ArrowSolidLeftIcon",
"ArrowSolidRightIcon",
"ArrowSolidUpIcon",
"ArrowTopLeftIcon",
"ArrowTopRightIcon",
"ArrowUpIcon",
"AzureDevOpsIcon",
"BackIcon",
"BasketIcon",
"BatchAcceptIcon",
"BatchDenyIcon",
"BeakerIcon",
"BellIcon",
"BitbucketIcon",
"BoldIcon",
"BookIcon",
"BookmarkHollowIcon",
"BookmarkIcon",
"BottomBarIcon",
"BottomBarToggleIcon",
"BoxIcon",
"BranchIcon",
"BrowserIcon",
"ButtonIcon",
"CPUIcon",
"CalendarIcon",
"CameraIcon",
"CameraStabilizeIcon",
"CategoryIcon",
"CertificateIcon",
"ChangedIcon",
"ChatIcon",
"CheckIcon",
"ChevronDownIcon",
"ChevronLeftIcon",
"ChevronRightIcon",
"ChevronSmallDownIcon",
"ChevronSmallLeftIcon",
"ChevronSmallRightIcon",
"ChevronSmallUpIcon",
"ChevronUpIcon",
"ChromaticIcon",
"ChromeIcon",
"CircleHollowIcon",
"CircleIcon",
"ClearIcon",
"CloseAltIcon",
"CloseIcon",
"CloudHollowIcon",
"CloudIcon",
"CogIcon",
"CollapseIcon",
"CommandIcon",
"CommentAddIcon",
"CommentIcon",
"CommentsIcon",
"CommitIcon",
"CompassIcon",
"ComponentDrivenIcon",
"ComponentIcon",
"ContrastIcon",
"ContrastIgnoredIcon",
"ControlsIcon",
"CopyIcon",
"CreditIcon",
"CrossIcon",
"DashboardIcon",
"DatabaseIcon",
"DeleteIcon",
"DiamondIcon",
"DirectionIcon",
"DiscordIcon",
"DocChartIcon",
"DocListIcon",
"DocumentIcon",
"DownloadIcon",
"DragIcon",
"EditIcon",
"EllipsisIcon",
"EmailIcon",
"ExpandAltIcon",
"ExpandIcon",
"EyeCloseIcon",
"EyeIcon",
"FaceHappyIcon",
"FaceNeutralIcon",
"FaceSadIcon",
"FacebookIcon",
"FailedIcon",
"FastForwardIcon",
"FigmaIcon",
"FilterIcon",
"FlagIcon",
"FolderIcon",
"FormIcon",
"GDriveIcon",
"GithubIcon",
"GitlabIcon",
"GlobeIcon",
"GoogleIcon",
"GraphBarIcon",
"GraphLineIcon",
"GraphqlIcon",
"GridAltIcon",
"GridIcon",
"GrowIcon",
"HeartHollowIcon",
"HeartIcon",
"HomeIcon",
"HourglassIcon",
"InfoIcon",
"ItalicIcon",
"JumpToIcon",
"KeyIcon",
"LightningIcon",
"LightningOffIcon",
"LinkBrokenIcon",
"LinkIcon",
"LinkedinIcon",
"LinuxIcon",
"ListOrderedIcon",
"ListUnorderedIcon",
"LocationIcon",
"LockIcon",
"MarkdownIcon",
"MarkupIcon",
"MediumIcon",
"MemoryIcon",
"MenuIcon",
"MergeIcon",
"MirrorIcon",
"MobileIcon",
"MoonIcon",
"NutIcon",
"OutboxIcon",
"OutlineIcon",
"PaintBrushIcon",
"PaperClipIcon",
"ParagraphIcon",
"PassedIcon",
"PhoneIcon",
"PhotoDragIcon",
"PhotoIcon",
"PhotoStabilizeIcon",
"PinAltIcon",
"PinIcon",
"PlayAllHollowIcon",
"PlayBackIcon",
"PlayHollowIcon",
"PlayIcon",
"PlayNextIcon",
"PlusIcon",
"PointerDefaultIcon",
"PointerHandIcon",
"PowerIcon",
"PrintIcon",
"ProceedIcon",
"ProfileIcon",
"PullRequestIcon",
"QuestionIcon",
"RSSIcon",
"RedirectIcon",
"ReduxIcon",
"RefreshIcon",
"ReplyIcon",
"RepoIcon",
"RequestChangeIcon",
"RewindIcon",
"RulerIcon",
"SaveIcon",
"SearchIcon",
"ShareAltIcon",
"ShareIcon",
"ShieldIcon",
"SideBySideIcon",
"SidebarAltIcon",
"SidebarAltToggleIcon",
"SidebarIcon",
"SidebarToggleIcon",
"SpeakerIcon",
"StackedIcon",
"StarHollowIcon",
"StarIcon",
"StatusFailIcon",
"StatusIcon",
"StatusPassIcon",
"StatusWarnIcon",
"StickerIcon",
"StopAltHollowIcon",
"StopAltIcon",
"StopIcon",
"StorybookIcon",
"StructureIcon",
"SubtractIcon",
"SunIcon",
"SupportIcon",
"SweepIcon",
"SwitchAltIcon",
"SyncIcon",
"TabletIcon",
"ThumbsUpIcon",
"TimeIcon",
"TimerIcon",
"TransferIcon",
"TrashIcon",
"TwitterIcon",
"TypeIcon",
"UbuntuIcon",
"UndoIcon",
"UnfoldIcon",
"UnlockIcon",
"UnpinIcon",
"UploadIcon",
"UserAddIcon",
"UserAltIcon",
"UserIcon",
"UsersIcon",
"VSCodeIcon",
"VerifiedIcon",
"VideoIcon",
"WandIcon",
"WatchIcon",
"WindowsIcon",
"WrenchIcon",
"XIcon",
"YoutubeIcon",
"ZoomIcon",
"ZoomOutIcon",
"ZoomResetIcon",
"iconList"
],
"storybook/manager-api": [
"ActiveTabs",
"Consumer",
"ManagerContext",
"Provider",
"RequestResponseError",
"addons",
"combineParameters",
"controlOrMetaKey",
"controlOrMetaSymbol",
"eventMatchesShortcut",
"eventToShortcut",
"experimental_MockUniversalStore",
"experimental_UniversalStore",
"experimental_getStatusStore",
"experimental_getTestProviderStore",
"experimental_requestResponse",
"experimental_useStatusStore",
"experimental_useTestProviderStore",
"experimental_useUniversalStore",
"internal_fullStatusStore",
"internal_fullTestProviderStore",
"internal_universalStatusStore",
"internal_universalTestProviderStore",
"isMacLike",
"isShortcutTaken",
"keyToSymbol",
"merge",
"mockChannel",
"optionOrAltSymbol",
"shortcutMatchesShortcut",
"shortcutToHumanString",
"types",
"useAddonState",
"useArgTypes",
"useArgs",
"useChannel",
"useGlobalTypes",
"useGlobals",
"useParameter",
"useSharedState",
"useStoryPrepared",
"useStorybookApi",
"useStorybookState"
],
"storybook/theming": [
"CacheProvider",
"ClassNames",
"Global",
"ThemeProvider",
"background",
"color",
"convert",
"create",
"createCache",
"createGlobal",
"createReset",
"css",
"darken",
"ensure",
"ignoreSsrWarning",
"isPropValid",
"jsx",
"keyframes",
"lighten",
"styled",
"themes",
"typography",
"useTheme",
"withTheme"
],
"storybook/theming/create": ["create", "themes"],
"storybook/test": [
"buildQueries",
"clearAllMocks",
"configure",
"createEvent",
"expect",
"findAllByAltText",
"findAllByDisplayValue",
"findAllByLabelText",
"findAllByPlaceholderText",
"findAllByRole",
"findAllByTestId",
"findAllByText",
"findAllByTitle",
"findByAltText",
"findByDisplayValue",
"findByLabelText",
"findByPlaceholderText",
"findByRole",
"findByTestId",
"findByText",
"findByTitle",
"fireEvent",
"fn",
"getAllByAltText",
"getAllByDisplayValue",
"getAllByLabelText",
"getAllByPlaceholderText",
"getAllByRole",
"getAllByTestId",
"getAllByText",
"getAllByTitle",
"getByAltText",
"getByDisplayValue",
"getByLabelText",
"getByPlaceholderText",
"getByRole",
"getByTestId",
"getByText",
"getByTitle",
"getConfig",
"getDefaultNormalizer",
"getElementError",
"getNodeText",
"getQueriesForElement",
"getRoles",
"getSuggestedQuery",
"isInaccessible",
"isMockFunction",
"logDOM",
"logRoles",
"mocked",
"mocks",
"onMockCall",
"prettyDOM",
"prettyFormat",
"queries",
"queryAllByAltText",
"queryAllByAttribute",
"queryAllByDisplayValue",
"queryAllByLabelText",
"queryAllByPlaceholderText",
"queryAllByRole",
"queryAllByTestId",
"queryAllByText",
"queryAllByTitle",
"queryByAltText",
"queryByAttribute",
"queryByDisplayValue",
"queryByLabelText",
"queryByPlaceholderText",
"queryByRole",
"queryByTestId",
"queryByText",
"queryByTitle",
"queryHelpers",
"resetAllMocks",
"restoreAllMocks",
"screen",
"spyOn",
"uninstrumentedUserEvent",
"userEvent",
"waitFor",
"waitForElementToBeRemoved",
"within"
],
"storybook/internal/channels": [
"Channel",
"HEARTBEAT_INTERVAL",
"HEARTBEAT_MAX_LATENCY",
"PostMessageTransport",
"WebsocketTransport",
"createBrowserChannel"
],
"storybook/internal/client-logger": ["deprecate", "logger", "once", "pretty"],
"storybook/internal/components": [
"A",
"ActionBar",
"AddonPanel",
"Badge",
"Bar",
"Blockquote",
"Button",
"Checkbox",
"ClipboardCode",
"Code",
"DL",
"Div",
"DocumentWrapper",
"EmptyTabContent",
"ErrorFormatter",
"FlexBar",
"Form",
"H1",
"H2",
"H3",
"H4",
"H5",
"H6",
"HR",
"IconButton",
"Img",
"LI",
"Link",
"ListItem",
"Loader",
"Modal",
"OL",
"P",
"Placeholder",
"Pre",
"ProgressSpinner",
"ResetWrapper",
"ScrollArea",
"Separator",
"Spaced",
"Span",
"StorybookIcon",
"StorybookLogo",
"SyntaxHighlighter",
"TT",
"TabBar",
"TabButton",
"TabWrapper",
"Table",
"Tabs",
"TabsState",
"TooltipLinkList",
"TooltipMessage",
"TooltipNote",
"UL",
"WithTooltip",
"WithTooltipPure",
"Zoom",
"codeCommon",
"components",
"createCopyToClipboardFunction",
"getStoryHref",
"interleaveSeparators",
"nameSpaceClassNames",
"resetComponents",
"withReset"
],
"storybook/internal/core-errors": [
"ARGTYPES_INFO_REQUEST",
"ARGTYPES_INFO_RESPONSE",
"CHANNEL_CREATED",
"CHANNEL_WS_DISCONNECT",
"CONFIG_ERROR",
"CREATE_NEW_STORYFILE_REQUEST",
"CREATE_NEW_STORYFILE_RESPONSE",
"CURRENT_STORY_WAS_SET",
"DOCS_PREPARED",
"DOCS_RENDERED",
"FILE_COMPONENT_SEARCH_REQUEST",
"FILE_COMPONENT_SEARCH_RESPONSE",
"FORCE_REMOUNT",
"FORCE_RE_RENDER",
"GLOBALS_UPDATED",
"NAVIGATE_URL",
"PLAY_FUNCTION_THREW_EXCEPTION",
"PRELOAD_ENTRIES",
"PREVIEW_BUILDER_PROGRESS",
"PREVIEW_KEYDOWN",
"REGISTER_SUBSCRIPTION",
"REQUEST_WHATS_NEW_DATA",
"RESET_STORY_ARGS",
"RESULT_WHATS_NEW_DATA",
"SAVE_STORY_REQUEST",
"SAVE_STORY_RESPONSE",
"SELECT_STORY",
"SET_CONFIG",
"SET_CURRENT_STORY",
"SET_FILTER",
"SET_GLOBALS",
"SET_INDEX",
"SET_STORIES",
"SET_WHATS_NEW_CACHE",
"SHARED_STATE_CHANGED",
"SHARED_STATE_SET",
"STORIES_COLLAPSE_ALL",
"STORIES_EXPAND_ALL",
"STORY_ARGS_UPDATED",
"STORY_CHANGED",
"STORY_ERRORED",
"STORY_FINISHED",
"STORY_HOT_UPDATED",
"STORY_INDEX_INVALIDATED",
"STORY_MISSING",
"STORY_PREPARED",
"STORY_RENDERED",
"STORY_RENDER_PHASE_CHANGED",
"STORY_SPECIFIED",
"STORY_THREW_EXCEPTION",
"STORY_UNCHANGED",
"TELEMETRY_ERROR",
"TOGGLE_WHATS_NEW_NOTIFICATIONS",
"UNHANDLED_ERRORS_WHILE_PLAYING",
"UPDATE_GLOBALS",
"UPDATE_QUERY_PARAMS",
"UPDATE_STORY_ARGS"
],
"storybook/internal/core-events": [
"ARGTYPES_INFO_REQUEST",
"ARGTYPES_INFO_RESPONSE",
"CHANNEL_CREATED",
"CHANNEL_WS_DISCONNECT",
"CONFIG_ERROR",
"CREATE_NEW_STORYFILE_REQUEST",
"CREATE_NEW_STORYFILE_RESPONSE",
"CURRENT_STORY_WAS_SET",
"DOCS_PREPARED",
"DOCS_RENDERED",
"FILE_COMPONENT_SEARCH_REQUEST",
"FILE_COMPONENT_SEARCH_RESPONSE",
"FORCE_REMOUNT",
"FORCE_RE_RENDER",
"GLOBALS_UPDATED",
"NAVIGATE_URL",
"PLAY_FUNCTION_THREW_EXCEPTION",
"PRELOAD_ENTRIES",
"PREVIEW_BUILDER_PROGRESS",
"PREVIEW_KEYDOWN",
"REGISTER_SUBSCRIPTION",
"REQUEST_WHATS_NEW_DATA",
"RESET_STORY_ARGS",
"RESULT_WHATS_NEW_DATA",
"SAVE_STORY_REQUEST",
"SAVE_STORY_RESPONSE",
"SELECT_STORY",
"SET_CONFIG",
"SET_CURRENT_STORY",
"SET_FILTER",
"SET_GLOBALS",
"SET_INDEX",
"SET_STORIES",
"SET_WHATS_NEW_CACHE",
"SHARED_STATE_CHANGED",
"SHARED_STATE_SET",
"STORIES_COLLAPSE_ALL",
"STORIES_EXPAND_ALL",
"STORY_ARGS_UPDATED",
"STORY_CHANGED",
"STORY_ERRORED",
"STORY_FINISHED",
"STORY_HOT_UPDATED",
"STORY_INDEX_INVALIDATED",
"STORY_MISSING",
"STORY_PREPARED",
"STORY_RENDERED",
"STORY_RENDER_PHASE_CHANGED",
"STORY_SPECIFIED",
"STORY_THREW_EXCEPTION",
"STORY_UNCHANGED",
"TELEMETRY_ERROR",
"TOGGLE_WHATS_NEW_NOTIFICATIONS",
"UNHANDLED_ERRORS_WHILE_PLAYING",
"UPDATE_GLOBALS",
"UPDATE_QUERY_PARAMS",
"UPDATE_STORY_ARGS"
],
"storybook/internal/manager-errors": [
"Category",
"ProviderDoesNotExtendBaseProviderError",
"StatusTypeIdMismatchError",
"UncaughtManagerError"
],
"storybook/internal/router": [
"BaseLocationProvider",
"DEEPLY_EQUAL",
"Link",
"Location",
"LocationProvider",
"Match",
"Route",
"buildArgsParam",
"deepDiff",
"getMatch",
"parsePath",
"queryFromLocation",
"stringifyQuery",
"useNavigate"
],
"storybook/internal/types": ["Addon_TypesEnum"],
"storybook/internal/manager-api": [
"ActiveTabs",
"Consumer",
"ManagerContext",
"Provider",
"RequestResponseError",
"addons",
"combineParameters",
"controlOrMetaKey",
"controlOrMetaSymbol",
"eventMatchesShortcut",
"eventToShortcut",
"experimental_MockUniversalStore",
"experimental_UniversalStore",
"experimental_getStatusStore",
"experimental_getTestProviderStore",
"experimental_requestResponse",
"experimental_useStatusStore",
"experimental_useTestProviderStore",
"experimental_useUniversalStore",
"internal_fullStatusStore",
"internal_fullTestProviderStore",
"internal_universalStatusStore",
"internal_universalTestProviderStore",
"isMacLike",
"isShortcutTaken",
"keyToSymbol",
"merge",
"mockChannel",
"optionOrAltSymbol",
"shortcutMatchesShortcut",
"shortcutToHumanString",
"types",
"useAddonState",
"useArgTypes",
"useArgs",
"useChannel",
"useGlobalTypes",
"useGlobals",
"useParameter",
"useSharedState",
"useStoryPrepared",
"useStorybookApi",
"useStorybookState"
],
"storybook/internal/theming": [
"CacheProvider",
"ClassNames",
"Global",
"ThemeProvider",
"background",
"color",
"convert",
"create",
"createCache",
"createGlobal",
"createReset",
"css",
"darken",
"ensure",
"ignoreSsrWarning",
"isPropValid",
"jsx",
"keyframes",
"lighten",
"styled",
"themes",
"typography",
"useTheme",
"withTheme"
],
"storybook/internal/theming/create": ["create", "themes"]
};
// src/manager/globals/globals.ts
var o = {
react: "__REACT__",
"react-dom": "__REACT_DOM__",
"react-dom/client": "__REACT_DOM_CLIENT__",
"@storybook/icons": "__STORYBOOK_ICONS__",
"storybook/manager-api": "__STORYBOOK_API__",
"storybook/test": "__STORYBOOK_TEST__",
"storybook/theming": "__STORYBOOK_THEMING__",
"storybook/theming/create": "__STORYBOOK_THEMING_CREATE__",
"storybook/internal/channels": "__STORYBOOK_CHANNELS__",
"storybook/internal/client-logger": "__STORYBOOK_CLIENT_LOGGER__",
"storybook/internal/components": "__STORYBOOK_COMPONENTS__",
"storybook/internal/core-errors": "__STORYBOOK_CORE_EVENTS__",
"storybook/internal/core-events": "__STORYBOOK_CORE_EVENTS__",
"storybook/internal/manager-errors": "__STORYBOOK_CORE_EVENTS_MANAGER_ERRORS__",
"storybook/internal/router": "__STORYBOOK_ROUTER__",
"storybook/internal/types": "__STORYBOOK_TYPES__",
// @deprecated TODO: delete in 9.1
"storybook/internal/manager-api": "__STORYBOOK_API__",
"storybook/internal/theming": "__STORYBOOK_THEMING__",
"storybook/internal/theming/create": "__STORYBOOK_THEMING_CREATE__"
}, r = Object.keys(o);
// src/manager/globals/globals-module-info.ts
var E = r.reduce(
(t, e) => (t[e] = {
type: "esm",
varName: o[e],
namedExports: n[e],
defaultExport: !0
}, t),
{}
);
export {
E as globalsModuleInfoMap
};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,47 @@
"use strict";
var r = Object.defineProperty;
var a = Object.getOwnPropertyDescriptor;
var T = Object.getOwnPropertyNames;
var s = Object.prototype.hasOwnProperty;
var R = (o, _) => {
for (var e in _)
r(o, e, { get: _[e], enumerable: !0 });
}, E = (o, _, e, t) => {
if (_ && typeof _ == "object" || typeof _ == "function")
for (let O of T(_))
!s.call(o, O) && O !== e && r(o, O, { get: () => _[O], enumerable: !(t = a(_, O)) || t.enumerable });
return o;
};
var S = (o) => E(r({}, "__esModule", { value: !0 }), o);
// src/manager/globals.ts
var y = {};
R(y, {
globalPackages: () => l,
globalsNameReferenceMap: () => n
});
module.exports = S(y);
// src/manager/globals/globals.ts
var n = {
react: "__REACT__",
"react-dom": "__REACT_DOM__",
"react-dom/client": "__REACT_DOM_CLIENT__",
"@storybook/icons": "__STORYBOOK_ICONS__",
"storybook/manager-api": "__STORYBOOK_API__",
"storybook/test": "__STORYBOOK_TEST__",
"storybook/theming": "__STORYBOOK_THEMING__",
"storybook/theming/create": "__STORYBOOK_THEMING_CREATE__",
"storybook/internal/channels": "__STORYBOOK_CHANNELS__",
"storybook/internal/client-logger": "__STORYBOOK_CLIENT_LOGGER__",
"storybook/internal/components": "__STORYBOOK_COMPONENTS__",
"storybook/internal/core-errors": "__STORYBOOK_CORE_EVENTS__",
"storybook/internal/core-events": "__STORYBOOK_CORE_EVENTS__",
"storybook/internal/manager-errors": "__STORYBOOK_CORE_EVENTS_MANAGER_ERRORS__",
"storybook/internal/router": "__STORYBOOK_ROUTER__",
"storybook/internal/types": "__STORYBOOK_TYPES__",
// @deprecated TODO: delete in 9.1
"storybook/internal/manager-api": "__STORYBOOK_API__",
"storybook/internal/theming": "__STORYBOOK_THEMING__",
"storybook/internal/theming/create": "__STORYBOOK_THEMING_CREATE__"
}, l = Object.keys(n);

View File

@@ -0,0 +1,24 @@
declare const globalsNameReferenceMap: {
readonly react: "__REACT__";
readonly 'react-dom': "__REACT_DOM__";
readonly 'react-dom/client': "__REACT_DOM_CLIENT__";
readonly '@storybook/icons': "__STORYBOOK_ICONS__";
readonly 'storybook/manager-api': "__STORYBOOK_API__";
readonly 'storybook/test': "__STORYBOOK_TEST__";
readonly 'storybook/theming': "__STORYBOOK_THEMING__";
readonly 'storybook/theming/create': "__STORYBOOK_THEMING_CREATE__";
readonly 'storybook/internal/channels': "__STORYBOOK_CHANNELS__";
readonly 'storybook/internal/client-logger': "__STORYBOOK_CLIENT_LOGGER__";
readonly 'storybook/internal/components': "__STORYBOOK_COMPONENTS__";
readonly 'storybook/internal/core-errors': "__STORYBOOK_CORE_EVENTS__";
readonly 'storybook/internal/core-events': "__STORYBOOK_CORE_EVENTS__";
readonly 'storybook/internal/manager-errors': "__STORYBOOK_CORE_EVENTS_MANAGER_ERRORS__";
readonly 'storybook/internal/router': "__STORYBOOK_ROUTER__";
readonly 'storybook/internal/types': "__STORYBOOK_TYPES__";
readonly 'storybook/internal/manager-api': "__STORYBOOK_API__";
readonly 'storybook/internal/theming': "__STORYBOOK_THEMING__";
readonly 'storybook/internal/theming/create': "__STORYBOOK_THEMING_CREATE__";
};
declare const globalPackages: Array<keyof typeof globalsNameReferenceMap>;
export { globalPackages, globalsNameReferenceMap };

View File

@@ -0,0 +1,34 @@
import ESM_COMPAT_Module from "node:module";
import { fileURLToPath as ESM_COMPAT_fileURLToPath } from 'node:url';
import { dirname as ESM_COMPAT_dirname } from 'node:path';
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
const __dirname = ESM_COMPAT_dirname(__filename);
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
// src/manager/globals/globals.ts
var _ = {
react: "__REACT__",
"react-dom": "__REACT_DOM__",
"react-dom/client": "__REACT_DOM_CLIENT__",
"@storybook/icons": "__STORYBOOK_ICONS__",
"storybook/manager-api": "__STORYBOOK_API__",
"storybook/test": "__STORYBOOK_TEST__",
"storybook/theming": "__STORYBOOK_THEMING__",
"storybook/theming/create": "__STORYBOOK_THEMING_CREATE__",
"storybook/internal/channels": "__STORYBOOK_CHANNELS__",
"storybook/internal/client-logger": "__STORYBOOK_CLIENT_LOGGER__",
"storybook/internal/components": "__STORYBOOK_COMPONENTS__",
"storybook/internal/core-errors": "__STORYBOOK_CORE_EVENTS__",
"storybook/internal/core-events": "__STORYBOOK_CORE_EVENTS__",
"storybook/internal/manager-errors": "__STORYBOOK_CORE_EVENTS_MANAGER_ERRORS__",
"storybook/internal/router": "__STORYBOOK_ROUTER__",
"storybook/internal/types": "__STORYBOOK_TYPES__",
// @deprecated TODO: delete in 9.1
"storybook/internal/manager-api": "__STORYBOOK_API__",
"storybook/internal/theming": "__STORYBOOK_THEMING__",
"storybook/internal/theming/create": "__STORYBOOK_THEMING_CREATE__"
}, o = Object.keys(_);
export {
o as globalPackages,
_ as globalsNameReferenceMap
};

13008
frontend/node_modules/storybook/dist/manager/runtime.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,510 @@
/// <reference types="node" />
import { EventEmitter } from 'events';
import { Buffer } from 'node:buffer';
import { ChildProcess } from 'node:child_process';
import { Readable, Writable } from 'node:stream';
declare namespace npmlog {
// TODO: newStream, newGroup, setGaugeTemplate and setGaugeTemplateSet need to be added
interface Logger extends EventEmitter {
(): any;
level: string;
record: MessageObject[];
maxRecordSize: number;
prefixStyle: StyleObject;
headingStyle: StyleObject;
heading: string;
stream: any; // Defaults to process.stderr
/**
* Creates a log message
* @param level
* @param prefix
* @param message message of the log which will be formatted using utils.format()
* @param args additional arguments appended to the log message also formatted using utils.format()
*/
log(level: LogLevels | string, prefix: string, message: any, ...args: any[]): void;
/**
* @param prefix
* @param message message of the log which will be formatted using utils.format()
* @param args additional arguments appended to the log message also formatted using utils.format()
*/
silly(prefix: string, message: any, ...args: any[]): void;
verbose(prefix: string, message: any, ...args: any[]): void;
info(prefix: string, message: any, ...args: any[]): void;
timing(prefix: string, message: any, ...args: any[]): void;
http(prefix: string, message: any, ...args: any[]): void;
notice(prefix: string, message: any, ...args: any[]): void;
warn(prefix: string, message: any, ...args: any[]): void;
error(prefix: string, message: any, ...args: any[]): void;
silent(prefix: string, message: any, ...args: any[]): void;
enableColor(): void;
disableColor(): void;
enableProgress(): void;
disableProgress(): void;
progressEnabled(): boolean;
enableUnicode(): void;
disableUnicode(): void;
pause(): void;
resume(): void;
addLevel(level: string, n: number, style?: StyleObject, disp?: string): void;
// Allows for custom log levels
// npmlog.addLevel("custom", level)
// npmlog.custom(prefix, message)
[key: string]: any;
}
type LogLevels = "silly" | "verbose" | "info" | "timing" | "http" | "notice" | "warn" | "error" | "silent";
interface StyleObject {
fg?: string | undefined;
bg?: string | undefined;
bold?: boolean | undefined;
inverse?: boolean | undefined;
underline?: boolean | undefined;
bell?: boolean | undefined;
}
interface MessageObject {
id: number;
level: string;
prefix: string;
message: string;
messageRaw: string;
}
}
declare var npmlog: npmlog.Logger;
/** Detects URLs in text and prevents them from being broken across lines */
declare function protectUrls(text: string, options?: {
maxUrlLength?: number;
maxLineWidth?: number;
}): string;
/**
* Creates a hyperlink with custom title text if supported, otherwise falls back to "title: url"
* format
*/
declare function createHyperlink(title: string, url: string): string;
declare function wrapTextForClack(text: string, width?: number): string;
type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent';
type Primitive = Readonly<string | boolean | number>;
type Option<T> = T extends Primitive ? {
value: T;
label?: string;
hint?: string;
} : {
value: T;
label: string;
hint?: string;
};
interface BasePromptOptions {
message: string;
}
interface TextPromptOptions extends BasePromptOptions {
placeholder?: string;
initialValue?: string;
validate?: (value: string) => string | Error | undefined;
}
interface ConfirmPromptOptions extends BasePromptOptions {
initialValue?: boolean;
active?: string;
inactive?: string;
}
interface SelectPromptOptions<T> extends BasePromptOptions {
options: Option<T>[];
initialValue?: T;
}
interface MultiSelectPromptOptions<T> extends BasePromptOptions {
options: Option<T>[];
initialValues?: T[];
required?: boolean;
}
interface PromptOptions {
onCancel?: () => void;
}
interface SpinnerInstance {
start: (message?: string) => void;
stop: (message?: string) => void;
message: (text: string) => void;
}
interface TaskLogInstance {
message: (text: string) => void;
success: (message: string, options?: {
showLog?: boolean;
}) => void;
error: (message: string) => void;
}
interface SpinnerOptions {
/** The id of the task, to be used by the log tracker. */
id: string;
}
interface TaskLogOptions {
/** The id of the task, to be used by the log tracker. */
id: string;
title: string;
retainLog?: boolean;
limit?: number;
}
declare abstract class PromptProvider {
abstract text(options: TextPromptOptions, promptOptions?: PromptOptions): Promise<string>;
abstract confirm(options: ConfirmPromptOptions, promptOptions?: PromptOptions): Promise<boolean>;
abstract select<T>(options: SelectPromptOptions<T>, promptOptions?: PromptOptions): Promise<T>;
abstract multiselect<T>(options: MultiSelectPromptOptions<T>, promptOptions?: PromptOptions): Promise<T[]>;
abstract spinner(options: SpinnerOptions): SpinnerInstance;
abstract taskLog(options: TaskLogOptions): TaskLogInstance;
}
type StdoutStderrAll = string | Buffer | undefined;
type ExecaReturnBase<StdoutStderrType extends StdoutStderrAll> = {
/**
The file and arguments that were run, for logging purposes.
This is not escaped and should not be executed directly as a process, including using `execa()` or `execaCommand()`.
*/
command: string;
/**
Same as `command` but escaped.
This is meant to be copy and pasted into a shell, for debugging purposes.
Since the escaping is fairly basic, this should not be executed directly as a process, including using `execa()` or `execaCommand()`.
*/
escapedCommand: string;
/**
The numeric exit code of the process that was run.
*/
exitCode: number;
/**
The output of the process on stdout.
*/
stdout: StdoutStderrType;
/**
The output of the process on stderr.
*/
stderr: StdoutStderrType;
/**
Whether the process failed to run.
*/
failed: boolean;
/**
Whether the process timed out.
*/
timedOut: boolean;
/**
Whether the process was killed.
*/
killed: boolean;
/**
The name of the signal that was used to terminate the process. For example, `SIGFPE`.
If a signal terminated the process, this property is defined and included in the error message. Otherwise it is `undefined`.
*/
signal?: string;
/**
A human-friendly description of the signal that was used to terminate the process. For example, `Floating point arithmetic error`.
If a signal terminated the process, this property is defined and included in the error message. Otherwise it is `undefined`. It is also `undefined` when the signal is very uncommon which should seldomly happen.
*/
signalDescription?: string;
/**
The `cwd` of the command if provided in the command options. Otherwise it is `process.cwd()`.
*/
cwd: string;
};
type ExecaSyncReturnValue<StdoutStderrType extends StdoutStderrAll = string> = {
} & ExecaReturnBase<StdoutStderrType>;
/**
Result of a child process execution. On success this is a plain object. On failure this is also an `Error` instance.
The child process fails when:
- its exit code is not `0`
- it was killed with a signal
- timing out
- being canceled
- there's not enough memory or there are already too many child processes
*/
type ExecaReturnValue<StdoutStderrType extends StdoutStderrAll = string> = {
/**
The output of the process with `stdout` and `stderr` interleaved.
This is `undefined` if either:
- the `all` option is `false` (default value)
- `execaSync()` was used
*/
all?: StdoutStderrType;
/**
Whether the process was canceled.
You can cancel the spawned process using the [`signal`](https://github.com/sindresorhus/execa#signal-1) option.
*/
isCanceled: boolean;
} & ExecaSyncReturnValue<StdoutStderrType>;
type ExecaSyncError<StdoutStderrType extends StdoutStderrAll = string> = {
/**
Error message when the child process failed to run. In addition to the underlying error message, it also contains some information related to why the child process errored.
The child process stderr then stdout are appended to the end, separated with newlines and not interleaved.
*/
message: string;
/**
This is the same as the `message` property except it does not include the child process stdout/stderr.
*/
shortMessage: string;
/**
Original error message. This is the same as the `message` property except it includes neither the child process stdout/stderr nor some additional information added by Execa.
This is `undefined` unless the child process exited due to an `error` event or a timeout.
*/
originalMessage?: string;
} & Error & ExecaReturnBase<StdoutStderrType>;
type ExecaError<StdoutStderrType extends StdoutStderrAll = string> = {
/**
The output of the process with `stdout` and `stderr` interleaved.
This is `undefined` if either:
- the `all` option is `false` (default value)
- `execaSync()` was used
*/
all?: StdoutStderrType;
/**
Whether the process was canceled.
*/
isCanceled: boolean;
} & ExecaSyncError<StdoutStderrType>;
type KillOptions = {
/**
Milliseconds to wait for the child process to terminate before sending `SIGKILL`.
Can be disabled with `false`.
@default 5000
*/
forceKillAfterTimeout?: number | false;
};
type ExecaChildPromise<StdoutStderrType extends StdoutStderrAll> = {
/**
Stream combining/interleaving [`stdout`](https://nodejs.org/api/child_process.html#child_process_subprocess_stdout) and [`stderr`](https://nodejs.org/api/child_process.html#child_process_subprocess_stderr).
This is `undefined` if either:
- the `all` option is `false` (the default value)
- both `stdout` and `stderr` options are set to [`'inherit'`, `'ipc'`, `Stream` or `integer`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio)
*/
all?: Readable;
catch<ResultType = never>(
onRejected?: (reason: ExecaError<StdoutStderrType>) => ResultType | PromiseLike<ResultType>
): Promise<ExecaReturnValue<StdoutStderrType> | ResultType>;
/**
Same as the original [`child_process#kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal), except if `signal` is `SIGTERM` (the default value) and the child process is not terminated after 5 seconds, force it by sending `SIGKILL`. Note that this graceful termination does not work on Windows, because Windows [doesn't support signals](https://nodejs.org/api/process.html#process_signal_events) (`SIGKILL` and `SIGTERM` has the same effect of force-killing the process immediately.) If you want to achieve graceful termination on Windows, you have to use other means, such as [`taskkill`](https://github.com/sindresorhus/taskkill).
*/
kill(signal?: string, options?: KillOptions): void;
/**
Similar to [`childProcess.kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal). This used to be preferred when cancelling the child process execution as the error is more descriptive and [`childProcessResult.isCanceled`](#iscanceled) is set to `true`. But now this is deprecated and you should either use `.kill()` or the `signal` option when creating the child process.
*/
cancel(): void;
/**
[Pipe](https://nodejs.org/api/stream.html#readablepipedestination-options) the child process's `stdout` to `target`, which can be:
- Another `execa()` return value
- A writable stream
- A file path string
If the `target` is another `execa()` return value, it is returned. Otherwise, the original `execa()` return value is returned. This allows chaining `pipeStdout()` then `await`ing the final result.
The `stdout` option] must be kept as `pipe`, its default value.
*/
pipeStdout?<Target extends ExecaChildPromise<StdoutStderrAll>>(target: Target): Target;
pipeStdout?(target: Writable | string): ExecaChildProcess<StdoutStderrType>;
/**
Like `pipeStdout()` but piping the child process's `stderr` instead.
The `stderr` option must be kept as `pipe`, its default value.
*/
pipeStderr?<Target extends ExecaChildPromise<StdoutStderrAll>>(target: Target): Target;
pipeStderr?(target: Writable | string): ExecaChildProcess<StdoutStderrType>;
/**
Combines both `pipeStdout()` and `pipeStderr()`.
Either the `stdout` option or the `stderr` option must be kept as `pipe`, their default value. Also, the `all` option must be set to `true`.
*/
pipeAll?<Target extends ExecaChildPromise<StdoutStderrAll>>(target: Target): Target;
pipeAll?(target: Writable | string): ExecaChildProcess<StdoutStderrType>;
};
type ExecaChildProcess<StdoutStderrType extends StdoutStderrAll = string> = ChildProcess &
ExecaChildPromise<StdoutStderrType> &
Promise<ExecaReturnValue<StdoutStderrType>>;
declare const prompt: {
executeTask: (childProcessFactories: (() => ExecaChildProcess) | (() => ExecaChildProcess)[], { id, intro, error, success, limitLines, }: {
id: string;
intro: string;
error: string;
success: string;
limitLines?: number;
}) => Promise<void>;
executeTaskWithSpinner: (childProcessFactories: (() => ExecaChildProcess) | (() => ExecaChildProcess)[], { id, intro, error, success }: {
id: string;
intro: string;
error: string;
success: string;
}) => Promise<void>;
setPromptLibrary: (library: "clack" | "prompts") => void;
getPromptLibrary: () => "clack" | "prompts";
getPromptProvider: () => PromptProvider;
isClackEnabled: () => boolean;
isPromptsEnabled: () => boolean;
getPreferredStdio: () => "inherit" | "pipe";
text: (options: TextPromptOptions, promptOptions?: PromptOptions) => Promise<string>;
confirm: (options: ConfirmPromptOptions, promptOptions?: PromptOptions) => Promise<boolean>;
select: <T>(options: SelectPromptOptions<T>, promptOptions?: PromptOptions) => Promise<T>;
multiselect: <T>(options: MultiSelectPromptOptions<T>, promptOptions?: PromptOptions) => Promise<T[]>;
spinner: (options: SpinnerOptions) => SpinnerInstance;
taskLog: (options: TaskLogOptions) => TaskLogInstance;
};
type Metadata = Record<string, any>;
interface LogEntry {
timestamp: Date;
level: LogLevel | 'prompt';
message: string;
metadata?: Metadata;
}
/**
* Tracks and manages logs for Storybook CLI operations. Provides functionality to collect, store
* and write logs to a file.
*/
declare class LogTracker {
#private;
constructor();
/** Enables writing logs to file. */
enableLogWriting(): void;
/** Returns whether logs should be written to file. */
get shouldWriteLogsToFile(): boolean;
/** Returns the configured log file path. */
get logFilePath(): string;
/** Returns a copy of all stored logs. */
get logs(): LogEntry[];
/**
* Adds a new log entry.
*
* @param level - The log level
* @param message - The log message
* @param metadata - Optional metadata to attach to the log, can be any JSON serializable value
*/
addLog(level: LogEntry['level'], message: string, metadata?: Metadata): void;
/** Clears all stored logs. */
clear(): void;
/**
* Writes all stored logs to a file and clears the log store.
*
* @param filePath - Optional custom file path to write logs to
* @returns The path where logs were written, by default is debug-storybook.log in current working
* directory
*/
writeToFile(filePath?: string): Promise<string>;
}
declare const logTracker: LogTracker;
type Formatter = (input: string | number | null | undefined) => string
declare const CLI_COLORS: {
success: Formatter;
error: Formatter;
warning: Formatter;
info: Formatter;
debug: Formatter;
cta: Formatter;
};
/** @deprecated Use CLI_COLORS instead */
declare const colors: {
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;
};
declare const logger: {
verbose: (message: string) => void;
info: (message: string) => void;
plain: (message: string) => void;
line: (count?: number) => void;
warn: (message: string) => void;
trace: ({ message, time }: {
message: string;
time: [number, number];
}) => void;
setLevel: (level?: LogLevel) => void;
error: (message: Error | string) => void;
setLogLevel: (level: LogLevel) => void;
getLogLevel: () => LogLevel;
shouldLog: (level: LogLevel) => boolean;
debug: (...args: any[]) => void;
log: (...args: any[]) => void;
logBox: (message: string, options?: {
borderStyle?: "round" | "none";
padding?: number;
title?: string;
titleAlignment?: "left" | "center" | "right";
borderColor?: string;
backgroundColor?: string;
}) => void;
intro: (message: string) => void;
outro: (message: string) => void;
step: (message: string) => void;
SYMBOLS: {
success: string;
error: string;
};
wrapTextForClack: typeof wrapTextForClack;
};
declare const once: {
(type: "verbose" | "info" | "warn" | "error"): (message: string) => void;
clear(): void;
verbose: (message: string) => void;
info: (message: string) => void;
warn: (message: string) => void;
error: (message: string) => void;
};
declare const deprecate: (message: string) => void;
export { CLI_COLORS, type SpinnerInstance, type TaskLogInstance, colors, createHyperlink, deprecate, npmlog as instance, logTracker, logger, once, prompt, protectUrls };

9192
frontend/node_modules/storybook/dist/node-logger/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

7093
frontend/node_modules/storybook/dist/preview-api/index.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

517
frontend/node_modules/storybook/dist/preview-errors.cjs generated vendored Normal file
View File

@@ -0,0 +1,517 @@
"use strict";
var U = Object.create;
var g = Object.defineProperty;
var K = Object.getOwnPropertyDescriptor;
var X = Object.getOwnPropertyNames;
var J = Object.getPrototypeOf, B = Object.prototype.hasOwnProperty;
var s = (t, o) => g(t, "name", { value: o, configurable: !0 });
var z = (t, o) => () => (o || t((o = { exports: {} }).exports, o), o.exports), q = (t, o) => {
for (var e in o)
g(t, e, { get: o[e], enumerable: !0 });
}, M = (t, o, e, i) => {
if (o && typeof o == "object" || typeof o == "function")
for (let u of X(o))
!B.call(t, u) && u !== e && g(t, u, { get: () => o[u], enumerable: !(i = K(o, u)) || i.enumerable });
return t;
};
var Q = (t, o, e) => (e = t != null ? U(J(t)) : {}, M(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
o || !t || !t.__esModule ? g(e, "default", { value: t, enumerable: !0 }) : e,
t
)), Z = (t) => M(g({}, "__esModule", { value: !0 }), t);
// ../node_modules/ts-dedent/dist/index.js
var F = z((h) => {
"use strict";
Object.defineProperty(h, "__esModule", { value: !0 });
h.dedent = void 0;
function L(t) {
for (var o = [], e = 1; e < arguments.length; e++)
o[e - 1] = arguments[e];
var i = Array.from(typeof t == "string" ? [t] : t);
i[i.length - 1] = i[i.length - 1].replace(/\r?\n([\t ]*)$/, "");
var u = i.reduce(function(c, E) {
var p = E.match(/\n([\t ]+|(?!\s).)/g);
return p ? c.concat(p.map(function(f) {
var l, y;
return (y = (l = f.match(/[\t ]/g)) === null || l === void 0 ? void 0 : l.length) !== null && y !== void 0 ? y : 0;
})) : c;
}, []);
if (u.length) {
var m = new RegExp(`
[ ]{` + Math.min.apply(Math, u) + "}", "g");
i = i.map(function(c) {
return c.replace(m, `
`);
});
}
i[0] = i[0].replace(/^\r?\n/, "");
var d = i[0];
return o.forEach(function(c, E) {
var p = d.match(/(?:^|\n)( *)$/), f = p ? p[1] : "", l = c;
typeof c == "string" && c.includes(`
`) && (l = String(c).split(`
`).map(function(y, H) {
return H === 0 ? y : "" + f + y;
}).join(`
`)), d += l + i[E + 1];
}), d;
}
s(L, "dedent");
h.dedent = L;
h.default = L;
});
// src/preview-errors.ts
var ee = {};
q(ee, {
CalledExtractOnStoreError: () => I,
CalledPreviewMethodBeforeInitializationError: () => x,
Category: () => G,
ElementA11yParameterError: () => j,
EmptyIndexError: () => w,
ImplicitActionsDuringRendering: () => b,
MdxFileWithNoCsfReferencesError: () => S,
MissingRenderToCanvasError: () => _,
MissingStoryAfterHmrError: () => R,
MissingStoryFromCsfFileError: () => k,
MountMustBeDestructuredError: () => N,
NextJsSharpError: () => W,
NextjsRouterMocksNotAvailable: () => $,
NoRenderFunctionError: () => A,
NoStoryMatchError: () => T,
NoStoryMountedError: () => V,
StatusTypeIdMismatchError: () => O,
StoryIndexFetchError: () => P,
StoryStoreAccessedBeforeInitializationError: () => v,
UnknownArgTypesError: () => D,
UnsupportedViewportDimensionError: () => C
});
module.exports = Z(ee);
var a = Q(F(), 1);
// src/storybook-error.ts
function Y({
code: t,
category: o
}) {
let e = String(t).padStart(4, "0");
return `SB_${o}_${e}`;
}
s(Y, "parseErrorCode");
var r = 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 {
s(this, "StorybookError");
}
get fullErrorCode() {
return Y({ 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})`;
}
/** Generates the error message along with additional documentation link (if applicable). */
static getFullMessage({
documentation: e,
code: i,
category: u,
message: m
}) {
let d;
return e === !0 ? d = `https://storybook.js.org/error/${Y({ code: i, category: u })}` : typeof e == "string" ? d = e : Array.isArray(e) &&
(d = `
${e.map((c) => ` - ${c}`).join(`
`)}`), `${m}${d != null ? `
More info: ${d}
` : ""}`;
}
};
// src/preview-errors.ts
var G = /* @__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.ADDON_VITEST = "ADDON_VITEST", n.ADDON_A11Y = "ADDON_A11Y", n))(G || {}), R = class extends r {
constructor(e) {
super({
category: "PREVIEW_API",
code: 1,
message: a.dedent`
Couldn't find story matching id '${e.storyId}' after HMR.
- Did you just rename a story?
- Did you remove it from your CSF file?
- Are you sure a story with the id '${e.storyId}' exists?
- Please check the values in the stories field of your main.js config and see if they would match your CSF File.
- Also check the browser console and terminal for potential error messages.`
});
this.data = e;
}
static {
s(this, "MissingStoryAfterHmrError");
}
}, b = class extends r {
constructor(e) {
super({
category: "PREVIEW_API",
code: 2,
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#using-implicit-actions-during-rendering-is-deprecated-\
for-example-in-the-play-function",
message: a.dedent`
We detected that you use an implicit action arg while ${e.phase} of your story.
${e.deprecated ? `
This is deprecated and won't work in Storybook 8 anymore.
` : ""}
Please provide an explicit spy to your args like this:
import { fn } from 'storybook/test';
...
args: {
${e.name}: fn()
}`
});
this.data = e;
}
static {
s(this, "ImplicitActionsDuringRendering");
}
}, I = class extends r {
static {
s(this, "CalledExtractOnStoreError");
}
constructor() {
super({
category: "PREVIEW_API",
code: 3,
message: a.dedent`
Cannot call \`storyStore.extract()\` without calling \`storyStore.cacheAllCsfFiles()\` first.
You probably meant to call \`await preview.extract()\` which does the above for you.`
});
}
}, _ = class extends r {
static {
s(this, "MissingRenderToCanvasError");
}
constructor() {
super({
category: "PREVIEW_API",
code: 4,
message: a.dedent`
Expected your framework's preset to export a \`renderToCanvas\` field.
Perhaps it needs to be upgraded for Storybook 7.0?`,
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field"
});
}
}, x = class extends r {
constructor(e) {
super({
category: "PREVIEW_API",
code: 5,
message: a.dedent`
Called \`Preview.${e.methodName}()\` before initialization.
The preview needs to load the story index before most methods can be called. If you want
to call \`${e.methodName}\`, try \`await preview.initializationPromise;\` first.
If you didn't call the above code, then likely it was called by an addon that needs to
do the above.`
});
this.data = e;
}
static {
s(this, "CalledPreviewMethodBeforeInitializationError");
}
}, P = class extends r {
constructor(e) {
super({
category: "PREVIEW_API",
code: 6,
message: a.dedent`
Error fetching \`/index.json\`:
${e.text}
If you are in development, this likely indicates a problem with your Storybook process,
check the terminal for errors.
If you are in a deployed Storybook, there may have been an issue deploying the full Storybook
build.`
});
this.data = e;
}
static {
s(this, "StoryIndexFetchError");
}
}, S = class extends r {
constructor(e) {
super({
category: "PREVIEW_API",
code: 7,
message: a.dedent`
Tried to render docs entry ${e.storyId} but it is a MDX file that has no CSF
references, or autodocs for a CSF file that some doesn't refer to itself.
This likely is an internal error in Storybook's indexing, or you've attached the
\`attached-mdx\` tag to an MDX file that is not attached.`
});
this.data = e;
}
static {
s(this, "MdxFileWithNoCsfReferencesError");
}
}, w = class extends r {
static {
s(this, "EmptyIndexError");
}
constructor() {
super({
category: "PREVIEW_API",
code: 8,
message: a.dedent`
Couldn't find any stories in your Storybook.
- Please check your stories field of your main.js config: does it match correctly?
- Also check the browser console and terminal for error messages.`
});
}
}, T = class extends r {
constructor(e) {
super({
category: "PREVIEW_API",
code: 9,
message: a.dedent`
Couldn't find story matching '${e.storySpecifier}'.
- Are you sure a story with that id exists?
- Please check your stories field of your main.js config.
- Also check the browser console and terminal for error messages.`
});
this.data = e;
}
static {
s(this, "NoStoryMatchError");
}
}, k = class extends r {
constructor(e) {
super({
category: "PREVIEW_API",
code: 10,
message: a.dedent`
Couldn't find story matching id '${e.storyId}' after importing a CSF file.
The file was indexed as if the story was there, but then after importing the file in the browser
we didn't find the story. Possible reasons:
- You are using a custom story indexer that is misbehaving.
- You have a custom file loader that is removing or renaming exports.
Please check your browser console and terminal for errors that may explain the issue.`
});
this.data = e;
}
static {
s(this, "MissingStoryFromCsfFileError");
}
}, v = class extends r {
static {
s(this, "StoryStoreAccessedBeforeInitializationError");
}
constructor() {
super({
category: "PREVIEW_API",
code: 11,
message: a.dedent`
Cannot access the Story Store until the index is ready.
It is not recommended to use methods directly on the Story Store anyway, in Storybook 9 we will
remove access to the store entirely`
});
}
}, N = class extends r {
constructor(e) {
super({
category: "PREVIEW_API",
code: 12,
message: a.dedent`
Incorrect use of mount in the play function.
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:
${e.playFunction}`
});
this.data = e;
}
static {
s(this, "MountMustBeDestructuredError");
}
}, A = class extends r {
constructor(e) {
super({
category: "PREVIEW_API",
code: 14,
message: a.dedent`
No render function available for storyId '${e.id}'
`
});
this.data = e;
}
static {
s(this, "NoRenderFunctionError");
}
}, V = class extends r {
static {
s(this, "NoStoryMountedError");
}
constructor() {
super({
category: "PREVIEW_API",
code: 15,
message: a.dedent`
No component is mounted in your story.
This usually occurs when you destructure mount in the play function, but forget to call it.
For example:
async play({ mount, canvasElement }) {
// 👈 mount should be called: await mount();
const canvas = within(canvasElement);
const button = await canvas.findByRole('button');
await userEvent.click(button);
};
Make sure to either remove it or call mount in your play function.
`
});
}
}, O = class extends r {
constructor(e) {
super({
category: "PREVIEW_API",
code: 16,
message: `Status has typeId "${e.status.typeId}" but was added to store with typeId "${e.typeId}". Full status: ${JSON.stringify(
e.status,
null,
2
)}`
});
this.data = e;
}
static {
s(this, "StatusTypeIdMismatchError");
}
}, W = class extends r {
static {
s(this, "NextJsSharpError");
}
constructor() {
super({
category: "FRAMEWORK_NEXTJS",
code: 1,
documentation: "https://storybook.js.org/docs/get-started/nextjs#faq",
message: a.dedent`
You are importing avif images, but you don't have sharp installed.
You have to install sharp in order to use image optimization features in Next.js.
`
});
}
}, $ = class extends r {
constructor(e) {
super({
category: "FRAMEWORK_NEXTJS",
code: 2,
message: a.dedent`
Tried to access router mocks from "${e.importType}" but they were not created yet. You might be running code in an unsupported environment.
`
});
this.data = e;
}
static {
s(this, "NextjsRouterMocksNotAvailable");
}
}, D = class extends r {
constructor(e) {
super({
category: "DOCS-TOOLS",
code: 1,
documentation: "https://github.com/storybookjs/storybook/issues/26606",
message: a.dedent`
There was a failure when generating detailed ArgTypes in ${e.language} for:
${JSON.stringify(e.type, null, 2)}
Storybook will fall back to use a generic type description instead.
This type is either not supported or it is a bug in the docgen generation in Storybook.
If you think this is a bug, please detail it as much as possible in the Github issue.
`
});
this.data = e;
}
static {
s(this, "UnknownArgTypesError");
}
}, C = class extends r {
constructor(e) {
super({
category: "ADDON_VITEST",
code: 1,
// TODO: Add documentation about viewports support
// documentation: '',
message: a.dedent`
Encountered an unsupported value "${e.value}" when setting the viewport ${e.dimension} dimension.
The Storybook plugin only supports values in the following units:
- px, vh, vw, em, rem and %.
You can either change the viewport for this story to use one of the supported units or skip the test by adding '!test' to the story's tags per https://storybook.js.org/docs/writing-stories/tags
`
});
this.data = e;
}
static {
s(this, "UnsupportedViewportDimensionError");
}
}, j = class extends r {
static {
s(this, "ElementA11yParameterError");
}
constructor() {
super({
category: "ADDON_A11Y",
code: 1,
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#a11y-addon-replace-element-parameter-with-context-para\
meter",
message: 'The "element" parameter in parameters.a11y has been removed. Use "context" instead.'
});
}
};

View File

@@ -0,0 +1,216 @@
import { StoryId } from 'storybook/internal/csf';
type StatusValue = 'status-value:pending' | 'status-value:success' | 'status-value:error' | 'status-value:warning' | 'status-value:unknown';
type StatusTypeId = string;
interface Status {
value: StatusValue;
typeId: StatusTypeId;
storyId: StoryId;
title: string;
description: string;
data?: any;
sidebarContextMenu?: boolean;
}
declare abstract class StorybookError extends Error {
/** Category of the error. Used to classify the type of error, e.g., 'PREVIEW_API'. */
readonly category: string;
/** Code representing the error. Used to uniquely identify the error, e.g., 1. */
readonly code: number;
/**
* Data associated with the error. Used to provide additional information in the error message or
* to be passed to telemetry.
*/
readonly 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.
*/
readonly documentation: boolean | string | string[];
/** Flag used to easily determine if the error originates from Storybook. */
readonly fromStorybook: true;
get fullErrorCode(): `SB_${string}_${string}`;
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
get name(): string;
constructor(props: {
category: string;
code: number;
message: string;
documentation?: boolean | string | string[];
});
/** Generates the error message along with additional documentation link (if applicable). */
static getFullMessage({ documentation, code, category, message, }: ConstructorParameters<typeof StorybookError>[0]): string;
}
/**
* If you can't find a suitable category for your error, create one based on the package name/file
* path of which the error is thrown. For instance: If it's from `storybook/internal/client-logger`,
* then CLIENT-LOGGER
*
* Categories are prefixed by a logical grouping, e.g. PREVIEW_ or FRAMEWORK_ to prevent manager and
* preview errors from having the same category and error code.
*/
declare enum Category {
BLOCKS = "BLOCKS",
DOCS_TOOLS = "DOCS-TOOLS",
PREVIEW_CLIENT_LOGGER = "PREVIEW_CLIENT-LOGGER",
PREVIEW_CHANNELS = "PREVIEW_CHANNELS",
PREVIEW_CORE_EVENTS = "PREVIEW_CORE-EVENTS",
PREVIEW_INSTRUMENTER = "PREVIEW_INSTRUMENTER",
PREVIEW_API = "PREVIEW_API",
PREVIEW_REACT_DOM_SHIM = "PREVIEW_REACT-DOM-SHIM",
PREVIEW_ROUTER = "PREVIEW_ROUTER",
PREVIEW_THEMING = "PREVIEW_THEMING",
RENDERER_HTML = "RENDERER_HTML",
RENDERER_PREACT = "RENDERER_PREACT",
RENDERER_REACT = "RENDERER_REACT",
RENDERER_SERVER = "RENDERER_SERVER",
RENDERER_SVELTE = "RENDERER_SVELTE",
RENDERER_VUE = "RENDERER_VUE",
RENDERER_VUE3 = "RENDERER_VUE3",
RENDERER_WEB_COMPONENTS = "RENDERER_WEB-COMPONENTS",
FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS",
ADDON_VITEST = "ADDON_VITEST",
ADDON_A11Y = "ADDON_A11Y"
}
declare class MissingStoryAfterHmrError extends StorybookError {
data: {
storyId: string;
};
constructor(data: {
storyId: string;
});
}
declare class ImplicitActionsDuringRendering extends StorybookError {
data: {
phase: string;
name: string;
deprecated: boolean;
};
constructor(data: {
phase: string;
name: string;
deprecated: boolean;
});
}
declare class CalledExtractOnStoreError extends StorybookError {
constructor();
}
declare class MissingRenderToCanvasError extends StorybookError {
constructor();
}
declare class CalledPreviewMethodBeforeInitializationError extends StorybookError {
data: {
methodName: string;
};
constructor(data: {
methodName: string;
});
}
declare class StoryIndexFetchError extends StorybookError {
data: {
text: string;
};
constructor(data: {
text: string;
});
}
declare class MdxFileWithNoCsfReferencesError extends StorybookError {
data: {
storyId: string;
};
constructor(data: {
storyId: string;
});
}
declare class EmptyIndexError extends StorybookError {
constructor();
}
declare class NoStoryMatchError extends StorybookError {
data: {
storySpecifier: string;
};
constructor(data: {
storySpecifier: string;
});
}
declare class MissingStoryFromCsfFileError extends StorybookError {
data: {
storyId: string;
};
constructor(data: {
storyId: string;
});
}
declare class StoryStoreAccessedBeforeInitializationError extends StorybookError {
constructor();
}
declare class MountMustBeDestructuredError extends StorybookError {
data: {
playFunction: string;
};
constructor(data: {
playFunction: string;
});
}
declare class NoRenderFunctionError extends StorybookError {
data: {
id: string;
};
constructor(data: {
id: string;
});
}
declare class NoStoryMountedError extends StorybookError {
constructor();
}
declare class StatusTypeIdMismatchError extends StorybookError {
data: {
status: Status;
typeId: StatusTypeId;
};
constructor(data: {
status: Status;
typeId: StatusTypeId;
});
}
declare class NextJsSharpError extends StorybookError {
constructor();
}
declare class NextjsRouterMocksNotAvailable extends StorybookError {
data: {
importType: string;
};
constructor(data: {
importType: string;
});
}
declare class UnknownArgTypesError extends StorybookError {
data: {
type: object;
language: string;
};
constructor(data: {
type: object;
language: string;
});
}
declare class UnsupportedViewportDimensionError extends StorybookError {
data: {
dimension: string;
value: string;
};
constructor(data: {
dimension: string;
value: string;
});
}
declare class ElementA11yParameterError extends StorybookError {
constructor();
}
export { CalledExtractOnStoreError, CalledPreviewMethodBeforeInitializationError, Category, ElementA11yParameterError, EmptyIndexError, ImplicitActionsDuringRendering, MdxFileWithNoCsfReferencesError, MissingRenderToCanvasError, MissingStoryAfterHmrError, MissingStoryFromCsfFileError, MountMustBeDestructuredError, NextJsSharpError, NextjsRouterMocksNotAvailable, NoRenderFunctionError, NoStoryMatchError, NoStoryMountedError, StatusTypeIdMismatchError, StoryIndexFetchError, StoryStoreAccessedBeforeInitializationError, UnknownArgTypesError, UnsupportedViewportDimensionError };

462
frontend/node_modules/storybook/dist/preview-errors.js generated vendored Normal file
View File

@@ -0,0 +1,462 @@
var ae = Object.defineProperty;
var t = (u, r) => ae(u, "name", { value: r, configurable: !0 });
// ../node_modules/ts-dedent/esm/index.js
function n(u) {
for (var r = [], e = 1; e < arguments.length; e++)
r[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 y = a.reduce(function(i, m) {
var p = m.match(/\n([\t ]+|(?!\s).)/g);
return p ? i.concat(p.map(function(E) {
var d, l;
return (l = (d = E.match(/[\t ]/g)) === null || d === void 0 ? void 0 : d.length) !== null && l !== void 0 ? l : 0;
})) : i;
}, []);
if (y.length) {
var h = new RegExp(`
[ ]{` + Math.min.apply(Math, y) + "}", "g");
a = a.map(function(i) {
return i.replace(h, `
`);
});
}
a[0] = a[0].replace(/^\r?\n/, "");
var c = a[0];
return r.forEach(function(i, m) {
var p = c.match(/(?:^|\n)( *)$/), E = p ? p[1] : "", d = i;
typeof i == "string" && i.includes(`
`) && (d = String(i).split(`
`).map(function(l, ne) {
return ne === 0 ? l : "" + E + l;
}).join(`
`)), c += d + a[m + 1];
}), c;
}
t(n, "dedent");
// src/storybook-error.ts
function j({
code: u,
category: r
}) {
let e = String(u).padStart(4, "0");
return `SB_${r}_${e}`;
}
t(j, "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() {
return j({ 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})`;
}
/** Generates the error message along with additional documentation link (if applicable). */
static getFullMessage({
documentation: e,
code: a,
category: y,
message: h
}) {
let c;
return e === !0 ? c = `https://storybook.js.org/error/${j({ code: a, category: y })}` : typeof e == "string" ? c = e : Array.isArray(e) &&
(c = `
${e.map((i) => ` - ${i}`).join(`
`)}`), `${h}${c != null ? `
More info: ${c}
` : ""}`;
}
};
t(g, "StorybookError");
var o = g;
// src/preview-errors.ts
var ie = /* @__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.ADDON_VITEST = "ADDON_VITEST", s.ADDON_A11Y = "ADDON_A11Y", s))(ie || {}), f = class f extends o {
constructor(e) {
super({
category: "PREVIEW_API",
code: 1,
message: n`
Couldn't find story matching id '${e.storyId}' after HMR.
- Did you just rename a story?
- Did you remove it from your CSF file?
- Are you sure a story with the id '${e.storyId}' exists?
- Please check the values in the stories field of your main.js config and see if they would match your CSF File.
- Also check the browser console and terminal for potential error messages.`
});
this.data = e;
}
};
t(f, "MissingStoryAfterHmrError");
var L = f, b = class b extends o {
constructor(e) {
super({
category: "PREVIEW_API",
code: 2,
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#using-implicit-actions-during-rendering-is-deprecated-\
for-example-in-the-play-function",
message: n`
We detected that you use an implicit action arg while ${e.phase} of your story.
${e.deprecated ? `
This is deprecated and won't work in Storybook 8 anymore.
` : ""}
Please provide an explicit spy to your args like this:
import { fn } from 'storybook/test';
...
args: {
${e.name}: fn()
}`
});
this.data = e;
}
};
t(b, "ImplicitActionsDuringRendering");
var Y = b, R = class R extends o {
constructor() {
super({
category: "PREVIEW_API",
code: 3,
message: n`
Cannot call \`storyStore.extract()\` without calling \`storyStore.cacheAllCsfFiles()\` first.
You probably meant to call \`await preview.extract()\` which does the above for you.`
});
}
};
t(R, "CalledExtractOnStoreError");
var G = R, I = class I extends o {
constructor() {
super({
category: "PREVIEW_API",
code: 4,
message: n`
Expected your framework's preset to export a \`renderToCanvas\` field.
Perhaps it needs to be upgraded for Storybook 7.0?`,
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field"
});
}
};
t(I, "MissingRenderToCanvasError");
var F = I, x = class x extends o {
constructor(e) {
super({
category: "PREVIEW_API",
code: 5,
message: n`
Called \`Preview.${e.methodName}()\` before initialization.
The preview needs to load the story index before most methods can be called. If you want
to call \`${e.methodName}\`, try \`await preview.initializationPromise;\` first.
If you didn't call the above code, then likely it was called by an addon that needs to
do the above.`
});
this.data = e;
}
};
t(x, "CalledPreviewMethodBeforeInitializationError");
var H = x, P = class P extends o {
constructor(e) {
super({
category: "PREVIEW_API",
code: 6,
message: n`
Error fetching \`/index.json\`:
${e.text}
If you are in development, this likely indicates a problem with your Storybook process,
check the terminal for errors.
If you are in a deployed Storybook, there may have been an issue deploying the full Storybook
build.`
});
this.data = e;
}
};
t(P, "StoryIndexFetchError");
var M = P, w = class w extends o {
constructor(e) {
super({
category: "PREVIEW_API",
code: 7,
message: n`
Tried to render docs entry ${e.storyId} but it is a MDX file that has no CSF
references, or autodocs for a CSF file that some doesn't refer to itself.
This likely is an internal error in Storybook's indexing, or you've attached the
\`attached-mdx\` tag to an MDX file that is not attached.`
});
this.data = e;
}
};
t(w, "MdxFileWithNoCsfReferencesError");
var K = w, T = class T extends o {
constructor() {
super({
category: "PREVIEW_API",
code: 8,
message: n`
Couldn't find any stories in your Storybook.
- Please check your stories field of your main.js config: does it match correctly?
- Also check the browser console and terminal for error messages.`
});
}
};
t(T, "EmptyIndexError");
var X = T, S = class S extends o {
constructor(e) {
super({
category: "PREVIEW_API",
code: 9,
message: n`
Couldn't find story matching '${e.storySpecifier}'.
- Are you sure a story with that id exists?
- Please check your stories field of your main.js config.
- Also check the browser console and terminal for error messages.`
});
this.data = e;
}
};
t(S, "NoStoryMatchError");
var U = S, k = class k extends o {
constructor(e) {
super({
category: "PREVIEW_API",
code: 10,
message: n`
Couldn't find story matching id '${e.storyId}' after importing a CSF file.
The file was indexed as if the story was there, but then after importing the file in the browser
we didn't find the story. Possible reasons:
- You are using a custom story indexer that is misbehaving.
- You have a custom file loader that is removing or renaming exports.
Please check your browser console and terminal for errors that may explain the issue.`
});
this.data = e;
}
};
t(k, "MissingStoryFromCsfFileError");
var J = k, v = class v extends o {
constructor() {
super({
category: "PREVIEW_API",
code: 11,
message: n`
Cannot access the Story Store until the index is ready.
It is not recommended to use methods directly on the Story Store anyway, in Storybook 9 we will
remove access to the store entirely`
});
}
};
t(v, "StoryStoreAccessedBeforeInitializationError");
var q = v, _ = class _ extends o {
constructor(e) {
super({
category: "PREVIEW_API",
code: 12,
message: n`
Incorrect use of mount in the play function.
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:
${e.playFunction}`
});
this.data = e;
}
};
t(_, "MountMustBeDestructuredError");
var z = _, N = class N extends o {
constructor(e) {
super({
category: "PREVIEW_API",
code: 14,
message: n`
No render function available for storyId '${e.id}'
`
});
this.data = e;
}
};
t(N, "NoRenderFunctionError");
var B = N, V = class V extends o {
constructor() {
super({
category: "PREVIEW_API",
code: 15,
message: n`
No component is mounted in your story.
This usually occurs when you destructure mount in the play function, but forget to call it.
For example:
async play({ mount, canvasElement }) {
// 👈 mount should be called: await mount();
const canvas = within(canvasElement);
const button = await canvas.findByRole('button');
await userEvent.click(button);
};
Make sure to either remove it or call mount in your play function.
`
});
}
};
t(V, "NoStoryMountedError");
var Q = V, A = class A extends o {
constructor(e) {
super({
category: "PREVIEW_API",
code: 16,
message: `Status has typeId "${e.status.typeId}" but was added to store with typeId "${e.typeId}". Full status: ${JSON.stringify(
e.status,
null,
2
)}`
});
this.data = e;
}
};
t(A, "StatusTypeIdMismatchError");
var Z = A, O = class O extends o {
constructor() {
super({
category: "FRAMEWORK_NEXTJS",
code: 1,
documentation: "https://storybook.js.org/docs/get-started/nextjs#faq",
message: n`
You are importing avif images, but you don't have sharp installed.
You have to install sharp in order to use image optimization features in Next.js.
`
});
}
};
t(O, "NextJsSharpError");
var ee = O, W = class W extends o {
constructor(e) {
super({
category: "FRAMEWORK_NEXTJS",
code: 2,
message: n`
Tried to access router mocks from "${e.importType}" but they were not created yet. You might be running code in an unsupported environment.
`
});
this.data = e;
}
};
t(W, "NextjsRouterMocksNotAvailable");
var te = W, $ = class $ extends o {
constructor(e) {
super({
category: "DOCS-TOOLS",
code: 1,
documentation: "https://github.com/storybookjs/storybook/issues/26606",
message: n`
There was a failure when generating detailed ArgTypes in ${e.language} for:
${JSON.stringify(e.type, null, 2)}
Storybook will fall back to use a generic type description instead.
This type is either not supported or it is a bug in the docgen generation in Storybook.
If you think this is a bug, please detail it as much as possible in the Github issue.
`
});
this.data = e;
}
};
t($, "UnknownArgTypesError");
var oe = $, D = class D extends o {
constructor(e) {
super({
category: "ADDON_VITEST",
code: 1,
// TODO: Add documentation about viewports support
// documentation: '',
message: n`
Encountered an unsupported value "${e.value}" when setting the viewport ${e.dimension} dimension.
The Storybook plugin only supports values in the following units:
- px, vh, vw, em, rem and %.
You can either change the viewport for this story to use one of the supported units or skip the test by adding '!test' to the story's tags per https://storybook.js.org/docs/writing-stories/tags
`
});
this.data = e;
}
};
t(D, "UnsupportedViewportDimensionError");
var se = D, C = class C extends o {
constructor() {
super({
category: "ADDON_A11Y",
code: 1,
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#a11y-addon-replace-element-parameter-with-context-para\
meter",
message: 'The "element" parameter in parameters.a11y has been removed. Use "context" instead.'
});
}
};
t(C, "ElementA11yParameterError");
var re = C;
export {
G as CalledExtractOnStoreError,
H as CalledPreviewMethodBeforeInitializationError,
ie as Category,
re as ElementA11yParameterError,
X as EmptyIndexError,
Y as ImplicitActionsDuringRendering,
K as MdxFileWithNoCsfReferencesError,
F as MissingRenderToCanvasError,
L as MissingStoryAfterHmrError,
J as MissingStoryFromCsfFileError,
z as MountMustBeDestructuredError,
ee as NextJsSharpError,
te as NextjsRouterMocksNotAvailable,
B as NoRenderFunctionError,
U as NoStoryMatchError,
Q as NoStoryMountedError,
Z as StatusTypeIdMismatchError,
M as StoryIndexFetchError,
q as StoryStoreAccessedBeforeInitializationError,
oe as UnknownArgTypesError,
se as UnsupportedViewportDimensionError
};

View File

@@ -0,0 +1,38 @@
"use strict";
var r = Object.defineProperty;
var s = Object.getOwnPropertyDescriptor;
var a = Object.getOwnPropertyNames;
var n = Object.prototype.hasOwnProperty;
var R = (o, _) => {
for (var e in _)
r(o, e, { get: _[e], enumerable: !0 });
}, l = (o, _, e, t) => {
if (_ && typeof _ == "object" || typeof _ == "function")
for (let O of a(_))
!n.call(o, O) && O !== e && r(o, O, { get: () => _[O], enumerable: !(t = s(_, O)) || t.enumerable });
return o;
};
var S = (o) => l(r({}, "__esModule", { value: !0 }), o);
// src/preview/globals.ts
var b = {};
R(b, {
globalPackages: () => T,
globalsNameReferenceMap: () => E
});
module.exports = S(b);
// src/preview/globals/globals.ts
var E = {
"@storybook/global": "__STORYBOOK_MODULE_GLOBAL__",
"storybook/test": "__STORYBOOK_MODULE_TEST__",
"storybook/actions": "__STORYBOOK_MODULE_ACTIONS__",
"storybook/preview-api": "__STORYBOOK_MODULE_PREVIEW_API__",
"storybook/internal/channels": "__STORYBOOK_MODULE_CHANNELS__",
"storybook/internal/client-logger": "__STORYBOOK_MODULE_CLIENT_LOGGER__",
"storybook/internal/core-events": "__STORYBOOK_MODULE_CORE_EVENTS__",
"storybook/internal/preview-errors": "__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__",
"storybook/internal/types": "__STORYBOOK_MODULE_TYPES__",
// @deprecated TODO: Remove in 9.1
"storybook/internal/preview-api": "__STORYBOOK_MODULE_PREVIEW_API__"
}, T = Object.keys(E);

View File

@@ -0,0 +1,15 @@
declare const globalsNameReferenceMap: {
readonly '@storybook/global': "__STORYBOOK_MODULE_GLOBAL__";
readonly 'storybook/test': "__STORYBOOK_MODULE_TEST__";
readonly 'storybook/actions': "__STORYBOOK_MODULE_ACTIONS__";
readonly 'storybook/preview-api': "__STORYBOOK_MODULE_PREVIEW_API__";
readonly 'storybook/internal/channels': "__STORYBOOK_MODULE_CHANNELS__";
readonly 'storybook/internal/client-logger': "__STORYBOOK_MODULE_CLIENT_LOGGER__";
readonly 'storybook/internal/core-events': "__STORYBOOK_MODULE_CORE_EVENTS__";
readonly 'storybook/internal/preview-errors': "__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__";
readonly 'storybook/internal/types': "__STORYBOOK_MODULE_TYPES__";
readonly 'storybook/internal/preview-api': "__STORYBOOK_MODULE_PREVIEW_API__";
};
declare const globalPackages: Array<keyof typeof globalsNameReferenceMap>;
export { globalPackages, globalsNameReferenceMap };

View File

@@ -0,0 +1,25 @@
import ESM_COMPAT_Module from "node:module";
import { fileURLToPath as ESM_COMPAT_fileURLToPath } from 'node:url';
import { dirname as ESM_COMPAT_dirname } from 'node:path';
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
const __dirname = ESM_COMPAT_dirname(__filename);
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
// src/preview/globals/globals.ts
var _ = {
"@storybook/global": "__STORYBOOK_MODULE_GLOBAL__",
"storybook/test": "__STORYBOOK_MODULE_TEST__",
"storybook/actions": "__STORYBOOK_MODULE_ACTIONS__",
"storybook/preview-api": "__STORYBOOK_MODULE_PREVIEW_API__",
"storybook/internal/channels": "__STORYBOOK_MODULE_CHANNELS__",
"storybook/internal/client-logger": "__STORYBOOK_MODULE_CLIENT_LOGGER__",
"storybook/internal/core-events": "__STORYBOOK_MODULE_CORE_EVENTS__",
"storybook/internal/preview-errors": "__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__",
"storybook/internal/types": "__STORYBOOK_MODULE_TYPES__",
// @deprecated TODO: Remove in 9.1
"storybook/internal/preview-api": "__STORYBOOK_MODULE_PREVIEW_API__"
}, o = Object.keys(_);
export {
o as globalPackages,
_ as globalsNameReferenceMap
};

43238
frontend/node_modules/storybook/dist/preview/runtime.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

6688
frontend/node_modules/storybook/dist/router/index.cjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

764
frontend/node_modules/storybook/dist/router/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,764 @@
import * as React from 'react';
import React__default, { ReactNode, ReactElement } from 'react';
interface StoryData {
viewMode?: string;
storyId?: string;
refId?: string;
}
declare const parsePath: (path: string | undefined) => StoryData;
interface Args {
[key: string]: any;
}
declare const DEEPLY_EQUAL: unique symbol;
declare const deepDiff: (value: any, update: any) => any;
declare const buildArgsParam: (initialArgs: Args | undefined, args: Args) => string;
interface Query {
[key: string]: any;
}
declare const queryFromLocation: (location: Partial<Location>) => Query;
declare const stringifyQuery: (query: Query) => string;
type Match$1 = {
path: string;
};
declare const getMatch: (current: string, target: string | RegExp, startsWith?: any) => Match$1 | null;
/**
* Actions represent the type of change to a location value.
*/
declare enum Action {
/**
* A POP indicates a change to an arbitrary index in the history stack, such
* as a back or forward navigation. It does not describe the direction of the
* navigation, only that the current index changed.
*
* Note: This is the default action for newly created history objects.
*/
Pop = "POP",
/**
* A PUSH indicates a new entry being added to the history stack, such as when
* a link is clicked and a new page loads. When this happens, all subsequent
* entries in the stack are lost.
*/
Push = "PUSH",
/**
* A REPLACE indicates the entry at the current index in the history stack
* being replaced by a new one.
*/
Replace = "REPLACE"
}
/**
* The pathname, search, and hash values of a URL.
*/
interface Path {
/**
* A URL pathname, beginning with a /.
*/
pathname: string;
/**
* A URL search string, beginning with a ?.
*/
search: string;
/**
* A URL fragment identifier, beginning with a #.
*/
hash: string;
}
/**
* An entry in a history stack. A location contains information about the
* URL path, as well as possibly some arbitrary state and a key.
*/
interface Location$2 extends Path {
/**
* A value of arbitrary data associated with this location.
*/
state: any;
/**
* A unique string associated with this location. May be used to safely store
* and retrieve data in some other storage API, like `localStorage`.
*
* Note: This value is always "default" on the initial location.
*/
key: string;
}
/**
* A change to the current location.
*/
interface Update {
/**
* The action that triggered the change.
*/
action: Action;
/**
* The new location.
*/
location: Location$2;
/**
* The delta between this location and the former location in the history stack
*/
delta: number | null;
}
/**
* A function that receives notifications about location changes.
*/
interface Listener {
(update: Update): void;
}
/**
* Describes a location that is the destination of some navigation, either via
* `history.push` or `history.replace`. May be either a URL or the pieces of a
* URL path.
*/
type To = string | Partial<Path>;
/**
* A history is an interface to the navigation stack. The history serves as the
* source of truth for the current location, as well as provides a set of
* methods that may be used to change it.
*
* It is similar to the DOM's `window.history` object, but with a smaller, more
* focused API.
*/
interface History {
/**
* The last action that modified the current location. This will always be
* Action.Pop when a history instance is first created. This value is mutable.
*/
readonly action: Action;
/**
* The current location. This value is mutable.
*/
readonly location: Location$2;
/**
* Returns a valid href for the given `to` value that may be used as
* the value of an <a href> attribute.
*
* @param to - The destination URL
*/
createHref(to: To): string;
/**
* Returns a URL for the given `to` value
*
* @param to - The destination URL
*/
createURL(to: To): URL;
/**
* Encode a location the same way window.history would do (no-op for memory
* history) so we ensure our PUSH/REPLACE navigations for data routers
* behave the same as POP
*
* @param to Unencoded path
*/
encodeLocation(to: To): Path;
/**
* Pushes a new location onto the history stack, increasing its length by one.
* If there were any entries in the stack after the current one, they are
* lost.
*
* @param to - The new URL
* @param state - Data to associate with the new location
*/
push(to: To, state?: any): void;
/**
* Replaces the current location in the history stack with a new one. The
* location that was replaced will no longer be available.
*
* @param to - The new URL
* @param state - Data to associate with the new location
*/
replace(to: To, state?: any): void;
/**
* Navigates `n` entries backward/forward in the history stack relative to the
* current index. For example, a "back" navigation would use go(-1).
*
* @param delta - The delta in the stack index
*/
go(delta: number): void;
/**
* Sets up a listener that will be called whenever the current location
* changes.
*
* @param listener - A function that will be called when the location changes
* @returns unlisten - A function that may be used to stop listening
*/
listen(listener: Listener): () => void;
}
/**
* Map of routeId -> data returned from a loader/action/error
*/
interface RouteData {
[routeId: string]: any;
}
declare enum ResultType {
data = "data",
deferred = "deferred",
redirect = "redirect",
error = "error"
}
/**
* Successful result from a loader or action
*/
interface SuccessResult {
type: ResultType.data;
data: any;
statusCode?: number;
headers?: Headers;
}
/**
* Successful defer() result from a loader or action
*/
interface DeferredResult {
type: ResultType.deferred;
deferredData: DeferredData;
statusCode?: number;
headers?: Headers;
}
/**
* Redirect result from a loader or action
*/
interface RedirectResult {
type: ResultType.redirect;
status: number;
location: string;
revalidate: boolean;
reloadDocument?: boolean;
}
/**
* Unsuccessful result from a loader or action
*/
interface ErrorResult {
type: ResultType.error;
error: any;
headers?: Headers;
}
/**
* Result from a loader or action - potentially successful or unsuccessful
*/
type DataResult = SuccessResult | DeferredResult | RedirectResult | ErrorResult;
type LowerCaseFormMethod = "get" | "post" | "put" | "patch" | "delete";
type UpperCaseFormMethod = Uppercase<LowerCaseFormMethod>;
/**
* Active navigation/fetcher form methods are exposed in lowercase on the
* RouterState
*/
type FormMethod = LowerCaseFormMethod;
/**
* In v7, active navigation/fetcher form methods are exposed in uppercase on the
* RouterState. This is to align with the normalization done via fetch().
*/
type V7_FormMethod = UpperCaseFormMethod;
type FormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "application/json" | "text/plain";
type JsonObject = {
[Key in string]: JsonValue;
} & {
[Key in string]?: JsonValue | undefined;
};
type JsonArray = JsonValue[] | readonly JsonValue[];
type JsonPrimitive = string | number | boolean | null;
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
/**
* @private
* Internal interface to pass around for action submissions, not intended for
* external consumption
*/
type Submission = {
formMethod: FormMethod | V7_FormMethod;
formAction: string;
formEncType: FormEncType;
formData: FormData;
json: undefined;
text: undefined;
} | {
formMethod: FormMethod | V7_FormMethod;
formAction: string;
formEncType: FormEncType;
formData: undefined;
json: JsonValue;
text: undefined;
} | {
formMethod: FormMethod | V7_FormMethod;
formAction: string;
formEncType: FormEncType;
formData: undefined;
json: undefined;
text: string;
};
/**
* @private
* Arguments passed to route loader/action functions. Same for now but we keep
* this as a private implementation detail in case they diverge in the future.
*/
interface DataFunctionArgs {
request: Request;
params: Params;
context?: any;
}
/**
* Arguments passed to loader functions
*/
interface LoaderFunctionArgs extends DataFunctionArgs {
}
/**
* Arguments passed to action functions
*/
interface ActionFunctionArgs extends DataFunctionArgs {
}
/**
* Loaders and actions can return anything except `undefined` (`null` is a
* valid return value if there is no data to return). Responses are preferred
* and will ease any future migration to Remix
*/
type DataFunctionValue = Response | NonNullable<unknown> | null;
/**
* Route loader function signature
*/
interface LoaderFunction {
(args: LoaderFunctionArgs): Promise<DataFunctionValue> | DataFunctionValue;
}
/**
* Route action function signature
*/
interface ActionFunction {
(args: ActionFunctionArgs): Promise<DataFunctionValue> | DataFunctionValue;
}
/**
* Route shouldRevalidate function signature. This runs after any submission
* (navigation or fetcher), so we flatten the navigation/fetcher submission
* onto the arguments. It shouldn't matter whether it came from a navigation
* or a fetcher, what really matters is the URLs and the formData since loaders
* have to re-run based on the data models that were potentially mutated.
*/
interface ShouldRevalidateFunction {
(args: {
currentUrl: URL;
currentParams: AgnosticDataRouteMatch["params"];
nextUrl: URL;
nextParams: AgnosticDataRouteMatch["params"];
formMethod?: Submission["formMethod"];
formAction?: Submission["formAction"];
formEncType?: Submission["formEncType"];
text?: Submission["text"];
formData?: Submission["formData"];
json?: Submission["json"];
actionResult?: DataResult;
defaultShouldRevalidate: boolean;
}): boolean;
}
/**
* Keys we cannot change from within a lazy() function. We spread all other keys
* onto the route. Either they're meaningful to the router, or they'll get
* ignored.
*/
type ImmutableRouteKey = "lazy" | "caseSensitive" | "path" | "id" | "index" | "children";
type RequireOne<T, Key = keyof T> = Exclude<{
[K in keyof T]: K extends Key ? Omit<T, K> & Required<Pick<T, K>> : never;
}[keyof T], undefined>;
/**
* lazy() function to load a route definition, which can add non-matching
* related properties to a route
*/
interface LazyRouteFunction<R extends AgnosticRouteObject> {
(): Promise<RequireOne<Omit<R, ImmutableRouteKey>>>;
}
/**
* Base RouteObject with common props shared by all types of routes
*/
type AgnosticBaseRouteObject = {
caseSensitive?: boolean;
path?: string;
id?: string;
loader?: LoaderFunction;
action?: ActionFunction;
hasErrorBoundary?: boolean;
shouldRevalidate?: ShouldRevalidateFunction;
handle?: any;
lazy?: LazyRouteFunction<AgnosticBaseRouteObject>;
};
/**
* Index routes must not have children
*/
type AgnosticIndexRouteObject = AgnosticBaseRouteObject & {
children?: undefined;
index: true;
};
/**
* Non-index routes may have children, but cannot have index
*/
type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & {
children?: AgnosticRouteObject[];
index?: false;
};
/**
* A route object represents a logical route, with (optionally) its child
* routes organized in a tree-like structure.
*/
type AgnosticRouteObject = AgnosticIndexRouteObject | AgnosticNonIndexRouteObject;
type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & {
id: string;
};
type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & {
children?: AgnosticDataRouteObject[];
id: string;
};
/**
* A data route object, which is just a RouteObject with a required unique ID
*/
type AgnosticDataRouteObject = AgnosticDataIndexRouteObject | AgnosticDataNonIndexRouteObject;
/**
* The parameters that were parsed from the URL path.
*/
type Params<Key extends string = string> = {
readonly [key in Key]: string | undefined;
};
/**
* A RouteMatch contains info about how a route matched a URL.
*/
interface AgnosticRouteMatch<ParamKey extends string = string, RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject> {
/**
* The names and values of dynamic parameters in the URL.
*/
params: Params<ParamKey>;
/**
* The portion of the URL pathname that was matched.
*/
pathname: string;
/**
* The portion of the URL pathname that was matched before child routes.
*/
pathnameBase: string;
/**
* The route object that was used to match.
*/
route: RouteObjectType;
}
interface AgnosticDataRouteMatch extends AgnosticRouteMatch<string, AgnosticDataRouteObject> {
}
declare class DeferredData {
private pendingKeysSet;
private controller;
private abortPromise;
private unlistenAbortSignal;
private subscribers;
data: Record<string, unknown>;
init?: ResponseInit;
deferredKeys: string[];
constructor(data: Record<string, unknown>, responseInit?: ResponseInit);
private trackPromise;
private onSettle;
private emit;
subscribe(fn: (aborted: boolean, settledKey?: string) => void): () => boolean;
cancel(): void;
resolveData(signal: AbortSignal): Promise<boolean>;
get done(): boolean;
get unwrappedData(): {};
get pendingKeys(): string[];
}
/**
* State maintained internally by the router. During a navigation, all states
* reflect the the "old" location unless otherwise noted.
*/
interface RouterState {
/**
* The action of the most recent navigation
*/
historyAction: Action;
/**
* The current location reflected by the router
*/
location: Location$2;
/**
* The current set of route matches
*/
matches: AgnosticDataRouteMatch[];
/**
* Tracks whether we've completed our initial data load
*/
initialized: boolean;
/**
* Current scroll position we should start at for a new view
* - number -> scroll position to restore to
* - false -> do not restore scroll at all (used during submissions)
* - null -> don't have a saved position, scroll to hash or top of page
*/
restoreScrollPosition: number | false | null;
/**
* Indicate whether this navigation should skip resetting the scroll position
* if we are unable to restore the scroll position
*/
preventScrollReset: boolean;
/**
* Tracks the state of the current navigation
*/
navigation: Navigation;
/**
* Tracks any in-progress revalidations
*/
revalidation: RevalidationState;
/**
* Data from the loaders for the current matches
*/
loaderData: RouteData;
/**
* Data from the action for the current matches
*/
actionData: RouteData | null;
/**
* Errors caught from loaders for the current matches
*/
errors: RouteData | null;
/**
* Map of current fetchers
*/
fetchers: Map<string, Fetcher>;
/**
* Map of current blockers
*/
blockers: Map<string, Blocker>;
}
/**
* Data that can be passed into hydrate a Router from SSR
*/
type HydrationState = Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>;
type RelativeRoutingType = "route" | "path";
/**
* Potential states for state.navigation
*/
type NavigationStates = {
Idle: {
state: "idle";
location: undefined;
formMethod: undefined;
formAction: undefined;
formEncType: undefined;
formData: undefined;
json: undefined;
text: undefined;
};
Loading: {
state: "loading";
location: Location$2;
formMethod: Submission["formMethod"] | undefined;
formAction: Submission["formAction"] | undefined;
formEncType: Submission["formEncType"] | undefined;
formData: Submission["formData"] | undefined;
json: Submission["json"] | undefined;
text: Submission["text"] | undefined;
};
Submitting: {
state: "submitting";
location: Location$2;
formMethod: Submission["formMethod"];
formAction: Submission["formAction"];
formEncType: Submission["formEncType"];
formData: Submission["formData"];
json: Submission["json"];
text: Submission["text"];
};
};
type Navigation = NavigationStates[keyof NavigationStates];
type RevalidationState = "idle" | "loading";
/**
* Potential states for fetchers
*/
type FetcherStates<TData = any> = {
Idle: {
state: "idle";
formMethod: undefined;
formAction: undefined;
formEncType: undefined;
text: undefined;
formData: undefined;
json: undefined;
data: TData | undefined;
" _hasFetcherDoneAnything "?: boolean;
};
Loading: {
state: "loading";
formMethod: Submission["formMethod"] | undefined;
formAction: Submission["formAction"] | undefined;
formEncType: Submission["formEncType"] | undefined;
text: Submission["text"] | undefined;
formData: Submission["formData"] | undefined;
json: Submission["json"] | undefined;
data: TData | undefined;
" _hasFetcherDoneAnything "?: boolean;
};
Submitting: {
state: "submitting";
formMethod: Submission["formMethod"];
formAction: Submission["formAction"];
formEncType: Submission["formEncType"];
text: Submission["text"];
formData: Submission["formData"];
json: Submission["json"];
data: TData | undefined;
" _hasFetcherDoneAnything "?: boolean;
};
};
type Fetcher<TData = any> = FetcherStates<TData>[keyof FetcherStates<TData>];
interface BlockerBlocked {
state: "blocked";
reset(): void;
proceed(): void;
location: Location$2;
}
interface BlockerUnblocked {
state: "unblocked";
reset: undefined;
proceed: undefined;
location: undefined;
}
interface BlockerProceeding {
state: "proceeding";
reset: undefined;
proceed: undefined;
location: Location$2;
}
type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding;
interface NavigateOptions$1 {
replace?: boolean;
state?: any;
preventScrollReset?: boolean;
relative?: RelativeRoutingType;
}
/**
* A Navigator is a "location changer"; it's how you get to different locations.
*
* Every history instance conforms to the Navigator interface, but the
* distinction is useful primarily when it comes to the low-level <Router> API
* where both the location and a navigator must be provided separately in order
* to avoid "tearing" that may occur in a suspense-enabled app if the action
* and/or location were to be read directly from the history instance.
*/
interface Navigator {
createHref: History["createHref"];
encodeLocation?: History["encodeLocation"];
go: History["go"];
push(to: To, state?: any, opts?: NavigateOptions$1): void;
replace(to: To, state?: any, opts?: NavigateOptions$1): void;
}
interface FutureConfig {
v7_startTransition: boolean;
}
interface RouterProps {
basename?: string;
children?: React.ReactNode;
location: Partial<Location$2> | string;
navigationType?: Action;
navigator: Navigator;
static?: boolean;
}
/**
* Provides location context for the rest of the app.
*
* Note: You usually won't render a <Router> directly. Instead, you'll render a
* router that is more specific to your environment such as a <BrowserRouter>
* in web browsers or a <StaticRouter> for server rendering.
*
* @see https://reactrouter.com/router-components/router
*/
declare function Router({ basename: basenameProp, children, location: locationProp, navigationType, navigator, static: staticProp, }: RouterProps): React.ReactElement | null;
/**
* NOTE: If you refactor this to split up the modules into separate files,
* you'll need to update the rollup config for react-router-dom-v5-compat.
*/
declare global {
var __staticRouterHydrationData: HydrationState | undefined;
}
interface BrowserRouterProps {
basename?: string;
children?: React.ReactNode;
future?: FutureConfig;
window?: Window;
}
/**
* A `<Router>` for use in web browsers. Provides the cleanest URLs.
*/
declare function BrowserRouter({ basename, children, future, window, }: BrowserRouterProps): React.JSX.Element;
interface Other extends StoryData {
path: string;
singleStory?: boolean;
}
type NavigateOptions = NavigateOptions$1 & {
plain?: boolean;
};
type NavigateFunction = (to: To | number, options?: NavigateOptions) => void;
type RouterData = {
location: Partial<Location$2>;
navigate: NavigateFunction;
} & Other;
type RenderData = Pick<RouterData, 'location'> & Other;
interface LinkProps {
to: string;
children: ReactNode;
}
interface MatchingData {
match: null | {
path: string;
};
}
interface LocationProps {
children: (renderData: RenderData) => any;
}
interface MatchPropsStartsWith {
path: string;
startsWith: boolean;
children: (matchingData: MatchingData) => ReactNode;
}
interface MatchPropsDefault {
path: RegExp;
startsWith: false;
children: (matchingData: MatchingData) => ReactNode;
}
interface RoutePropsStartsWith {
path: string;
startsWith?: boolean;
children: ReactNode;
}
interface RoutePropsDefault {
path: RegExp;
startsWith?: false;
children: ReactNode;
}
declare const useNavigate: () => (to: To | number, { plain, ...options }?: NavigateOptions) => void;
/** A component that will navigate to a new location/path when clicked */
declare const Link: {
({ to, children, ...rest }: LinkProps): React__default.JSX.Element;
displayName: string;
};
/**
* A render-prop component where children is called with a location and will be called whenever it
* changes
*/
declare const Location$1: {
({ children }: LocationProps): React__default.JSX.Element;
displayName: string;
};
/**
* A render-prop component for rendering when a certain path is hit. It's immensely similar to
* `Location` but it receives an addition data property: `match`. match has a truthy value when the
* path is hit.
*/
declare function Match(props: MatchPropsStartsWith): ReactElement;
declare function Match(props: MatchPropsDefault): ReactElement;
declare namespace Match {
var displayName: string;
}
/** A component to conditionally render children based on matching a target path */
declare function Route(props: RoutePropsDefault): ReactElement;
declare function Route(props: RoutePropsStartsWith): ReactElement;
declare namespace Route {
var displayName: string;
}
declare const LocationProvider: typeof BrowserRouter;
declare const BaseLocationProvider: typeof Router;
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 };

2289
frontend/node_modules/storybook/dist/router/index.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

748
frontend/node_modules/storybook/dist/server-errors.cjs generated vendored Normal file
View File

@@ -0,0 +1,748 @@
"use strict";
var ue = Object.create;
var y = Object.defineProperty;
var le = Object.getOwnPropertyDescriptor;
var me = Object.getOwnPropertyNames;
var be = Object.getPrototypeOf, ge = Object.prototype.hasOwnProperty;
var r = (t, e) => y(t, "name", { value: e, configurable: !0 });
var q = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), de = (t, e) => {
for (var o in e)
y(t, o, { get: e[o], enumerable: !0 });
}, Q = (t, e, o, n) => {
if (e && typeof e == "object" || typeof e == "function")
for (let c of me(e))
!ge.call(t, c) && c !== o && y(t, c, { get: () => e[c], enumerable: !(n = le(e, c)) || n.enumerable });
return t;
};
var Z = (t, e, o) => (o = t != null ? ue(be(t)) : {}, Q(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
e || !t || !t.__esModule ? y(o, "default", { value: t, enumerable: !0 }) : o,
t
)), pe = (t) => Q(y({}, "__esModule", { value: !0 }), t);
// ../node_modules/picocolors/picocolors.js
var te = q((Re, k) => {
var f = process || {}, ee = f.argv || [], E = f.env || {}, ye = !(E.NO_COLOR || ee.includes("--no-color")) && (!!E.FORCE_COLOR || ee.includes(
"--color") || f.platform === "win32" || (f.stdout || {}).isTTY && E.TERM !== "dumb" || !!E.CI), he = /* @__PURE__ */ r((t, e, o = t) => (n) => {
let c = "" + n, u = c.indexOf(e, t.length);
return ~u ? t + Ee(c, e, o, u) + e : t + c + e;
}, "formatter"), Ee = /* @__PURE__ */ r((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"), oe = /* @__PURE__ */ r((t = ye) => {
let e = t ? he : () => 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 = oe();
k.exports.createColors = oe;
});
// ../node_modules/ts-dedent/dist/index.js
var se = q((h) => {
"use strict";
Object.defineProperty(h, "__esModule", { value: !0 });
h.dedent = void 0;
function re(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, x) {
var p = x.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 (c.length) {
var u = new RegExp(`
[ ]{` + Math.min.apply(Math, c) + "}", "g");
n = n.map(function(m) {
return m.replace(u, `
`);
});
}
n[0] = n[0].replace(/^\r?\n/, "");
var b = n[0];
return e.forEach(function(m, x) {
var p = b.match(/(?:^|\n)( *)$/), R = p ? p[1] : "", g = m;
typeof m == "string" && m.includes(`
`) && (g = String(m).split(`
`).map(function(d, ce) {
return ce === 0 ? d : "" + R + d;
}).join(`
`)), b += g + n[x + 1];
}), b;
}
r(re, "dedent");
h.dedent = re;
h.default = re;
});
// src/server-errors.ts
var fe = {};
de(fe, {
AngularLegacyBuildOptionsError: () => K,
Category: () => ie,
ConflictingStaticDirConfigError: () => C,
CouldNotEvaluateFrameworkError: () => w,
CriticalPresetLoadError: () => v,
FindPackageVersionsError: () => X,
GenerateNewProjectOnInitError: () => U,
GoogleFontsDownloadError: () => L,
GoogleFontsLoadingError: () => N,
IncompatiblePostCssConfigError: () => H,
InvalidFrameworkNameError: () => _,
InvalidStoriesEntryError: () => S,
MainFileESMOnlyImportError: () => V,
MainFileEvaluationError: () => F,
MainFileMissingError: () => $,
MissingAngularJsonError: () => W,
MissingBuilderError: () => B,
MissingFrameworkFieldError: () => A,
NoMatchingExportError: () => j,
NoStatsForViteDevError: () => J,
NxProjectDetectedError: () => O,
SavingGlobalSettingsFileError: () => z,
StatusTypeIdMismatchError: () => D,
SvelteViteWithSvelteKitError: () => P,
UpgradeStorybookToLowerVersionError: () => G,
UpgradeStorybookUnknownCurrentVersionError: () => Y,
WebpackCompilationError: () => T,
WebpackInvocationError: () => M,
WebpackMissingStatsError: () => I
});
module.exports = pe(fe);
var l = Z(te(), 1), i = Z(se(), 1);
// src/storybook-error.ts
function ne({
code: t,
category: e
}) {
let o = String(t).padStart(4, "0");
return `SB_${e}_${o}`;
}
r(ne, "parseErrorCode");
var a = class t extends Error {
constructor(o) {
super(t.getFullMessage(o));
/**
* 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 = o.category, this.documentation = o.documentation ?? !1, this.code = o.code;
}
static {
r(this, "StorybookError");
}
get fullErrorCode() {
return ne({ code: this.code, category: this.category });
}
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
get name() {
let o = this.constructor.name;
return `${this.fullErrorCode} (${o})`;
}
/** Generates the error message along with additional documentation link (if applicable). */
static getFullMessage({
documentation: o,
code: n,
category: c,
message: u
}) {
let b;
return o === !0 ? b = `https://storybook.js.org/error/${ne({ code: n, category: c })}` : typeof o == "string" ? b = o : Array.isArray(o) &&
(b = `
${o.map((m) => ` - ${m}`).join(`
`)}`), `${u}${b != null ? `
More info: ${b}
` : ""}`;
}
};
// src/server-errors.ts
var ie = /* @__PURE__ */ ((s) => (s.CLI = "CLI", s.CLI_INIT = "CLI_INIT", s.CLI_AUTOMIGRATE = "CLI_AUTOMIGRATE", s.CLI_UPGRADE = "CLI_UPGRAD\
E", s.CLI_ADD = "CLI_ADD", s.CODEMOD = "CODEMOD", s.CORE_SERVER = "CORE-SERVER", s.CSF_PLUGIN = "CSF-PLUGIN", s.CSF_TOOLS = "CSF-TOOLS", s.CORE_COMMON =
"CORE-COMMON", s.NODE_LOGGER = "NODE-LOGGER", s.TELEMETRY = "TELEMETRY", s.BUILDER_MANAGER = "BUILDER-MANAGER", s.BUILDER_VITE = "BUILDER-VI\
TE", s.BUILDER_WEBPACK5 = "BUILDER-WEBPACK5", s.SOURCE_LOADER = "SOURCE-LOADER", s.POSTINSTALL = "POSTINSTALL", s.DOCS_TOOLS = "DOCS-TOOLS",
s.CORE_WEBPACK = "CORE-WEBPACK", s.FRAMEWORK_ANGULAR = "FRAMEWORK_ANGULAR", s.FRAMEWORK_EMBER = "FRAMEWORK_EMBER", s.FRAMEWORK_HTML_VITE = "\
FRAMEWORK_HTML-VITE", s.FRAMEWORK_HTML_WEBPACK5 = "FRAMEWORK_HTML-WEBPACK5", s.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", s.FRAMEWORK_PREACT_VITE =
"FRAMEWORK_PREACT-VITE", s.FRAMEWORK_PREACT_WEBPACK5 = "FRAMEWORK_PREACT-WEBPACK5", s.FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE", s.FRAMEWORK_REACT_WEBPACK5 =
"FRAMEWORK_REACT-WEBPACK5", s.FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5", s.FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE", s.
FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT", s.FRAMEWORK_VUE_VITE = "FRAMEWORK_VUE-VITE", s.FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5",
s.FRAMEWORK_VUE3_VITE = "FRAMEWORK_VUE3-VITE", s.FRAMEWORK_VUE3_WEBPACK5 = "FRAMEWORK_VUE3-WEBPACK5", s.FRAMEWORK_WEB_COMPONENTS_VITE = "FRA\
MEWORK_WEB-COMPONENTS-VITE", s.FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = "FRAMEWORK_WEB-COMPONENTS-WEBPACK5", s))(ie || {}), O = class extends a {
static {
r(this, "NxProjectDetectedError");
}
constructor() {
super({
category: "CLI_INIT",
code: 1,
documentation: "https://nx.dev/nx-api/storybook#generating-storybook-configuration",
message: i.dedent`
We have detected Nx in your project. Nx has its own Storybook initializer, so please use it instead.
Run "nx g @nx/storybook:configuration <your-project-name>" to add Storybook to a given Nx app or lib.`
});
}
}, A = class extends a {
static {
r(this, "MissingFrameworkFieldError");
}
constructor() {
super({
category: "CORE-COMMON",
code: 1,
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api",
message: i.dedent`
Could not find a 'framework' field in Storybook config.
Please run 'npx storybook automigrate' to automatically fix your config.`
});
}
}, _ = class extends a {
constructor(o) {
super({
category: "CORE-COMMON",
code: 2,
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api",
message: i.dedent`
Invalid value of '${o.frameworkName}' in the 'framework' field of Storybook config.
Please run 'npx storybook automigrate' to automatically fix your config.
`
});
this.data = o;
}
static {
r(this, "InvalidFrameworkNameError");
}
}, w = class extends a {
constructor(o) {
super({
category: "CORE-COMMON",
code: 3,
documentation: "",
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 = o;
}
static {
r(this, "CouldNotEvaluateFrameworkError");
}
}, C = class extends a {
static {
r(this, "ConflictingStaticDirConfigError");
}
constructor() {
super({
category: "CORE-SERVER",
code: 1,
documentation: "https://storybook.js.org/docs/configure/integration/images-and-assets#serving-static-files-via-storybook-configuration",
message: i.dedent`
Storybook encountered a conflict when trying to serve statics. You have configured both:
* Storybook's option in the config file: 'staticDirs'
* Storybook's (deprecated) CLI flag: '--staticDir' or '-s'
Please remove the CLI flag from your storybook script and use only the 'staticDirs' option instead.`
});
}
}, S = class extends a {
static {
r(this, "InvalidStoriesEntryError");
}
constructor() {
super({
category: "CORE-COMMON",
code: 4,
documentation: "https://storybook.js.org/docs/faq#can-i-have-a-storybook-with-no-local-stories",
message: i.dedent`
Storybook could not index your stories.
Your main configuration somehow does not contain a 'stories' field, or it resolved to an empty array.
Please check your main configuration file and make sure it exports a 'stories' field that is not an empty array.`
});
}
}, I = class extends a {
static {
r(this, "WebpackMissingStatsError");
}
constructor() {
super({
category: "BUILDER-WEBPACK5",
code: 1,
documentation: [
"https://webpack.js.org/configuration/stats/",
"https://storybook.js.org/docs/builders/webpack#configure"
],
message: i.dedent`
No Webpack stats found. Did you turn off stats reporting in your Webpack config?
Storybook needs Webpack stats (including errors) in order to build correctly.`
});
}
}, M = class extends a {
constructor(o) {
super({
category: "BUILDER-WEBPACK5",
code: 2,
message: o.error.message.trim()
});
this.data = o;
}
static {
r(this, "WebpackInvocationError");
}
};
function ae(t = "") {
return t.replace(/\u001B\[[0-9;]*m/g, "");
}
r(ae, "removeAnsiEscapeCodes");
var T = class extends a {
constructor(o) {
o.errors = o.errors.map((n) => ({
...n,
message: ae(n.message),
stack: ae(n.stack),
name: n.name
}));
super({
category: "BUILDER-WEBPACK5",
code: 3,
// This error message is a followup of errors logged by Webpack to the user
message: i.dedent`
There were problems when compiling your code with Webpack.
Run Storybook with --debug-webpack for more information.
`
});
this.data = o;
}
static {
r(this, "WebpackCompilationError");
}
}, W = class extends a {
constructor(o) {
super({
category: "CLI_INIT",
code: 2,
documentation: "https://storybook.js.org/docs/faq#error-no-angularjson-file-found",
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 = o;
}
static {
r(this, "MissingAngularJsonError");
}
}, K = class extends a {
static {
r(this, "AngularLegacyBuildOptionsError");
}
constructor() {
super({
category: "FRAMEWORK_ANGULAR",
code: 1,
documentation: [
"https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#angular-drop-support-for-calling-storybook-directly",
"https://github.com/storybookjs/storybook/tree/next/code/frameworks/angular#how-do-i-migrate-to-an-angular-storybook-builder"
],
message: i.dedent`
Your Storybook startup script uses a solution that is not supported anymore.
You must use Angular builder to have an explicit configuration on the project used in angular.json.
Please run 'npx storybook automigrate' to automatically fix your config.`
});
}
}, v = class extends a {
constructor(o) {
super({
category: "CORE-SERVER",
code: 2,
documentation: "",
message: i.dedent`
Storybook failed to load the following preset: ${o.presetName}.
Please check whether your setup is correct, the Storybook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.
If you believe this is a bug, please open an issue on Github.
${o.error.stack || o.error.message}`
});
this.data = o;
}
static {
r(this, "CriticalPresetLoadError");
}
}, B = class extends a {
static {
r(this, "MissingBuilderError");
}
constructor() {
super({
category: "CORE-SERVER",
code: 3,
documentation: "https://github.com/storybookjs/storybook/issues/24071",
message: i.dedent`
Storybook could not find a builder configuration for your project.
Builders normally come from a framework package e.g. '@storybook/react-vite', or from builder packages e.g. '@storybook/builder-vite'.
- Does your main config file contain a 'framework' field configured correctly?
- Is the Storybook framework package installed correctly?
- If you don't use a framework, does your main config contain a 'core.builder' configured correctly?
- Are you in a monorepo and perhaps the framework package is hoisted incorrectly?
If you believe this is a bug, please describe your issue in detail on Github.`
});
}
}, L = class extends a {
constructor(o) {
super({
category: "FRAMEWORK_NEXTJS",
code: 1,
documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
message: i.dedent`
Failed to fetch \`${o.fontFamily}\` from Google Fonts with URL: \`${o.url}\``
});
this.data = o;
}
static {
r(this, "GoogleFontsDownloadError");
}
}, N = class extends a {
constructor(o) {
super({
category: "FRAMEWORK_NEXTJS",
code: 2,
documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
message: i.dedent`
An error occurred when trying to load Google Fonts with URL \`${o.url}\`.
${o.error instanceof Error ? o.error.message : ""}`
});
this.data = o;
}
static {
r(this, "GoogleFontsLoadingError");
}
}, P = class extends a {
static {
r(this, "SvelteViteWithSvelteKitError");
}
constructor() {
super({
category: "FRAMEWORK_SVELTE-VITE",
code: 1,
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-needs-the-storybooksveltekit-framework",
message: i.dedent`
We've detected a SvelteKit project using the @storybook/svelte-vite framework, which is not supported.
Please use the @storybook/sveltekit framework instead.`
});
}
}, j = class extends a {
constructor(o) {
super({
category: "CORE-SERVER",
code: 4,
documentation: "",
message: i.dedent`
There was an exports mismatch error when trying to build Storybook.
Please check whether the versions of your Storybook packages match whenever possible, as this might be the cause.
Problematic example:
{ "@storybook/react": "7.5.3", "@storybook/react-vite": "7.4.5", "storybook": "7.3.0" }
Correct example:
{ "@storybook/react": "7.5.3", "@storybook/react-vite": "7.5.3", "storybook": "7.5.3" }
Please run \`npx storybook doctor\` for guidance on how to fix this issue.`
});
this.data = o;
}
static {
r(this, "NoMatchingExportError");
}
}, V = 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 ${o.location}`,
"You can import ESM modules in your main file, but only as dynamic import.",
""
];
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:`
),
l.default.gray(o.line)
), n.push(
"",
l.default.white(
`Convert the static import to a dynamic import ${l.default.underline("where they are used")}.`
),
l.default.white("Example:") + " " + l.default.gray("await import(<your ESM only module>);"),
""
);
super({
category: "CORE-SERVER",
code: 5,
documentation: "https://github.com/storybookjs/storybook/issues/23972#issuecomment-1948534058",
message: n.join(`
`)
});
this.data = o;
}
static {
r(this, "MainFileESMOnlyImportError");
}
}, $ = class extends a {
constructor(o) {
let n = {
storybook: {
helperMessage: "You can pass a --config-dir flag to tell Storybook, where your main.js file is located at.",
documentation: "https://storybook.js.org/docs/configure"
},
vitest: {
helperMessage: "You can pass a configDir plugin option to tell where your main.js file is located at.",
// TODO: add proper docs once available
documentation: "https://storybook.js.org/docs/configure"
}
}, { documentation: c, helperMessage: u } = n[o.source || "storybook"];
super({
category: "CORE-SERVER",
code: 6,
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.
${u}`
});
this.data = o;
}
static {
r(this, "MainFileMissingError");
}
}, F = class extends a {
constructor(o) {
let n = l.default.white(
(o.error.stack || o.error.message).replaceAll(process.cwd(), "")
);
super({
category: "CORE-SERVER",
code: 7,
message: i.dedent`
Storybook couldn't evaluate your ${l.default.yellow(o.location)} file.
Original error:
${n}`
});
this.data = o;
}
static {
r(this, "MainFileEvaluationError");
}
}, D = class extends a {
constructor(o) {
super({
category: "CORE-SERVER",
code: 16,
message: `Status has typeId "${o.status.typeId}" but was added to store with typeId "${o.typeId}". Full status: ${JSON.stringify(
o.status,
null,
2
)}`
});
this.data = o;
}
static {
r(this, "StatusTypeIdMismatchError");
}
}, U = class extends a {
constructor(o) {
super({
category: "CLI_INIT",
code: 3,
documentation: "",
message: i.dedent`
There was an error while using ${o.packageManager} to create a new ${o.projectType} project.
${o.error instanceof Error ? o.error.message : ""}`
});
this.data = o;
}
static {
r(this, "GenerateNewProjectOnInitError");
}
}, G = class extends a {
constructor(o) {
super({
category: "CLI_UPGRADE",
code: 3,
message: i.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}.
This usually happens when running the upgrade command without a version specifier, e.g. "npx storybook upgrade".
This will cause npm to run the globally cached storybook binary, which might be an older version.
Instead you should always run the Storybook CLI with a version specifier to force npm to download the latest version:
"npx storybook@latest upgrade"`
});
this.data = o;
}
static {
r(this, "UpgradeStorybookToLowerVersionError");
}
}, Y = class extends a {
static {
r(this, "UpgradeStorybookUnknownCurrentVersionError");
}
constructor() {
super({
category: "CLI_UPGRADE",
code: 5,
message: i.dedent`
We couldn't determine the current version of Storybook in your project.
Are you running the Storybook CLI in a project without Storybook?
It might help if you specify your Storybook config directory with the --config-dir flag.`
});
}
}, J = class extends a {
static {
r(this, "NoStatsForViteDevError");
}
constructor() {
super({
category: "BUILDER-VITE",
code: 1,
message: i.dedent`
Unable to write preview stats as the Vite builder does not support stats in dev mode.
Please remove the \`--stats-json\` flag when running in dev mode.`
});
}
}, X = class extends a {
constructor(o) {
super({
category: "CLI",
code: 1,
message: i.dedent`
Unable to find versions of "${o.packageName}" using ${o.packageManager}
${o.error && `Reason: ${o.error}`}`
});
this.data = o;
}
static {
r(this, "FindPackageVersionsError");
}
}, H = class extends a {
constructor(o) {
super({
category: "FRAMEWORK_NEXTJS",
code: 3,
message: i.dedent`
Incompatible PostCSS configuration format detected.
Next.js uses an array-based format for plugins which is not compatible with Vite:
// ❌ Incompatible format (used by Next.js)
const config = {
plugins: ["@tailwindcss/postcss"],
};
Please transform your PostCSS config to use the object-based format, which is compatible with Next.js and Vite:
// ✅ Compatible format (works with Next.js and Vite)
const config = {
plugins: {
"@tailwindcss/postcss": {},
},
};
Original error: ${o.error.message}
`
});
this.data = o;
}
static {
r(this, "IncompatiblePostCssConfigError");
}
}, z = class extends a {
constructor(o) {
super({
category: "CORE-SERVER",
code: 1,
message: i.dedent`
Unable to save global settings file to ${o.filePath}
${o.error && `Reason: ${o.error}`}`
});
this.data = o;
}
static {
r(this, "SavingGlobalSettingsFileError");
}
};

305
frontend/node_modules/storybook/dist/server-errors.d.ts generated vendored Normal file
View File

@@ -0,0 +1,305 @@
import { StoryId } from 'storybook/internal/csf';
type StatusValue = 'status-value:pending' | 'status-value:success' | 'status-value:error' | 'status-value:warning' | 'status-value:unknown';
type StatusTypeId = string;
interface Status {
value: StatusValue;
typeId: StatusTypeId;
storyId: StoryId;
title: string;
description: string;
data?: any;
sidebarContextMenu?: boolean;
}
declare abstract class StorybookError extends Error {
/** Category of the error. Used to classify the type of error, e.g., 'PREVIEW_API'. */
readonly category: string;
/** Code representing the error. Used to uniquely identify the error, e.g., 1. */
readonly code: number;
/**
* Data associated with the error. Used to provide additional information in the error message or
* to be passed to telemetry.
*/
readonly 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.
*/
readonly documentation: boolean | string | string[];
/** Flag used to easily determine if the error originates from Storybook. */
readonly fromStorybook: true;
get fullErrorCode(): `SB_${string}_${string}`;
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
get name(): string;
constructor(props: {
category: string;
code: number;
message: string;
documentation?: boolean | string | string[];
});
/** Generates the error message along with additional documentation link (if applicable). */
static getFullMessage({ documentation, code, category, message, }: ConstructorParameters<typeof StorybookError>[0]): string;
}
/**
* If you can't find a suitable category for your error, create one based on the package name/file
* path of which the error is thrown. For instance: If it's from `@storybook/node-logger`, then
* NODE-LOGGER If it's from a package that is too broad, e.g. @storybook/cli in the init command,
* then use a combination like CLI_INIT
*/
declare enum Category {
CLI = "CLI",
CLI_INIT = "CLI_INIT",
CLI_AUTOMIGRATE = "CLI_AUTOMIGRATE",
CLI_UPGRADE = "CLI_UPGRADE",
CLI_ADD = "CLI_ADD",
CODEMOD = "CODEMOD",
CORE_SERVER = "CORE-SERVER",
CSF_PLUGIN = "CSF-PLUGIN",
CSF_TOOLS = "CSF-TOOLS",
CORE_COMMON = "CORE-COMMON",
NODE_LOGGER = "NODE-LOGGER",
TELEMETRY = "TELEMETRY",
BUILDER_MANAGER = "BUILDER-MANAGER",
BUILDER_VITE = "BUILDER-VITE",
BUILDER_WEBPACK5 = "BUILDER-WEBPACK5",
SOURCE_LOADER = "SOURCE-LOADER",
POSTINSTALL = "POSTINSTALL",
DOCS_TOOLS = "DOCS-TOOLS",
CORE_WEBPACK = "CORE-WEBPACK",
FRAMEWORK_ANGULAR = "FRAMEWORK_ANGULAR",
FRAMEWORK_EMBER = "FRAMEWORK_EMBER",
FRAMEWORK_HTML_VITE = "FRAMEWORK_HTML-VITE",
FRAMEWORK_HTML_WEBPACK5 = "FRAMEWORK_HTML-WEBPACK5",
FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS",
FRAMEWORK_PREACT_VITE = "FRAMEWORK_PREACT-VITE",
FRAMEWORK_PREACT_WEBPACK5 = "FRAMEWORK_PREACT-WEBPACK5",
FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE",
FRAMEWORK_REACT_WEBPACK5 = "FRAMEWORK_REACT-WEBPACK5",
FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5",
FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE",
FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT",
FRAMEWORK_VUE_VITE = "FRAMEWORK_VUE-VITE",
FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5",
FRAMEWORK_VUE3_VITE = "FRAMEWORK_VUE3-VITE",
FRAMEWORK_VUE3_WEBPACK5 = "FRAMEWORK_VUE3-WEBPACK5",
FRAMEWORK_WEB_COMPONENTS_VITE = "FRAMEWORK_WEB-COMPONENTS-VITE",
FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = "FRAMEWORK_WEB-COMPONENTS-WEBPACK5"
}
declare class NxProjectDetectedError extends StorybookError {
constructor();
}
declare class MissingFrameworkFieldError extends StorybookError {
constructor();
}
declare class InvalidFrameworkNameError extends StorybookError {
data: {
frameworkName: string;
};
constructor(data: {
frameworkName: string;
});
}
declare class CouldNotEvaluateFrameworkError extends StorybookError {
data: {
frameworkName: string;
};
constructor(data: {
frameworkName: string;
});
}
declare class ConflictingStaticDirConfigError extends StorybookError {
constructor();
}
declare class InvalidStoriesEntryError extends StorybookError {
constructor();
}
declare class WebpackMissingStatsError extends StorybookError {
constructor();
}
declare class WebpackInvocationError extends StorybookError {
data: {
error: Error;
};
constructor(data: {
error: Error;
});
}
declare class WebpackCompilationError extends StorybookError {
data: {
errors: {
message: string;
stack?: string;
name?: string;
}[];
};
constructor(data: {
errors: {
message: string;
stack?: string;
name?: string;
}[];
});
}
declare class MissingAngularJsonError extends StorybookError {
data: {
path: string;
};
constructor(data: {
path: string;
});
}
declare class AngularLegacyBuildOptionsError extends StorybookError {
constructor();
}
declare class CriticalPresetLoadError extends StorybookError {
data: {
error: Error;
presetName: string;
};
constructor(data: {
error: Error;
presetName: string;
});
}
declare class MissingBuilderError extends StorybookError {
constructor();
}
declare class GoogleFontsDownloadError extends StorybookError {
data: {
fontFamily: string;
url: string;
};
constructor(data: {
fontFamily: string;
url: string;
});
}
declare class GoogleFontsLoadingError extends StorybookError {
data: {
error: unknown | Error;
url: string;
};
constructor(data: {
error: unknown | Error;
url: string;
});
}
declare class SvelteViteWithSvelteKitError extends StorybookError {
constructor();
}
declare class NoMatchingExportError extends StorybookError {
data: {
error: unknown | Error;
};
constructor(data: {
error: unknown | Error;
});
}
declare class MainFileESMOnlyImportError extends StorybookError {
data: {
location: string;
line: string | undefined;
num: number | undefined;
};
constructor(data: {
location: string;
line: string | undefined;
num: number | undefined;
});
}
declare class MainFileMissingError extends StorybookError {
data: {
location: string;
source?: 'storybook' | 'vitest';
};
constructor(data: {
location: string;
source?: 'storybook' | 'vitest';
});
}
declare class MainFileEvaluationError extends StorybookError {
data: {
location: string;
error: Error;
};
constructor(data: {
location: string;
error: Error;
});
}
declare class StatusTypeIdMismatchError extends StorybookError {
data: {
status: Status;
typeId: StatusTypeId;
};
constructor(data: {
status: Status;
typeId: StatusTypeId;
});
}
declare class GenerateNewProjectOnInitError extends StorybookError {
data: {
error: unknown | Error;
packageManager: string;
projectType: string;
};
constructor(data: {
error: unknown | Error;
packageManager: string;
projectType: string;
});
}
declare class UpgradeStorybookToLowerVersionError extends StorybookError {
data: {
beforeVersion: string;
currentVersion: string;
};
constructor(data: {
beforeVersion: string;
currentVersion: string;
});
}
declare class UpgradeStorybookUnknownCurrentVersionError extends StorybookError {
constructor();
}
declare class NoStatsForViteDevError extends StorybookError {
constructor();
}
declare class FindPackageVersionsError extends StorybookError {
data: {
error: Error | unknown;
packageName: string;
packageManager: string;
};
constructor(data: {
error: Error | unknown;
packageName: string;
packageManager: string;
});
}
declare class IncompatiblePostCssConfigError extends StorybookError {
data: {
error: Error;
};
constructor(data: {
error: Error;
});
}
declare class SavingGlobalSettingsFileError extends StorybookError {
data: {
filePath: string;
error: Error | unknown;
};
constructor(data: {
filePath: string;
error: Error | unknown;
});
}
export { AngularLegacyBuildOptionsError, Category, ConflictingStaticDirConfigError, CouldNotEvaluateFrameworkError, CriticalPresetLoadError, FindPackageVersionsError, GenerateNewProjectOnInitError, GoogleFontsDownloadError, GoogleFontsLoadingError, IncompatiblePostCssConfigError, InvalidFrameworkNameError, InvalidStoriesEntryError, MainFileESMOnlyImportError, MainFileEvaluationError, MainFileMissingError, MissingAngularJsonError, MissingBuilderError, MissingFrameworkFieldError, NoMatchingExportError, NoStatsForViteDevError, NxProjectDetectedError, SavingGlobalSettingsFileError, StatusTypeIdMismatchError, SvelteViteWithSvelteKitError, UpgradeStorybookToLowerVersionError, UpgradeStorybookUnknownCurrentVersionError, WebpackCompilationError, WebpackInvocationError, WebpackMissingStatsError };

749
frontend/node_modules/storybook/dist/server-errors.js generated vendored Normal file
View File

@@ -0,0 +1,749 @@
import ESM_COMPAT_Module from "node:module";
import { fileURLToPath as ESM_COMPAT_fileURLToPath } from 'node:url';
import { dirname as ESM_COMPAT_dirname } from 'node:path';
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
const __dirname = ESM_COMPAT_dirname(__filename);
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
var ie = Object.create;
var R = Object.defineProperty;
var ce = Object.getOwnPropertyDescriptor;
var ue = Object.getOwnPropertyNames;
var le = Object.getPrototypeOf, me = Object.prototype.hasOwnProperty;
var r = (t, e) => R(t, "name", { value: e, configurable: !0 });
var O = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
var be = (t, e, o, n) => {
if (e && typeof e == "object" || typeof e == "function")
for (let c of ue(e))
!me.call(t, c) && c !== o && R(t, c, { get: () => e[c], enumerable: !(n = ce(e, c)) || n.enumerable });
return t;
};
var A = (t, e, o) => (o = t != null ? ie(le(t)) : {}, be(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
e || !t || !t.__esModule ? R(o, "default", { value: t, enumerable: !0 }) : o,
t
));
// ../node_modules/picocolors/picocolors.js
var C = O((Ee, k) => {
var E = process || {}, _ = E.argv || [], h = E.env || {}, ge = !(h.NO_COLOR || _.includes("--no-color")) && (!!h.FORCE_COLOR || _.includes(
"--color") || E.platform === "win32" || (E.stdout || {}).isTTY && h.TERM !== "dumb" || !!h.CI), de = /* @__PURE__ */ r((t, e, o = t) => (n) => {
let c = "" + n, u = c.indexOf(e, t.length);
return ~u ? t + pe(c, e, o, u) + e : t + c + e;
}, "formatter"), pe = /* @__PURE__ */ r((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"), w = /* @__PURE__ */ r((t = ge) => {
let e = t ? de : () => 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 = w();
k.exports.createColors = w;
});
// ../node_modules/ts-dedent/dist/index.js
var I = O((y) => {
"use strict";
Object.defineProperty(y, "__esModule", { value: !0 });
y.dedent = void 0;
function S(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, f) {
var p = f.match(/\n([\t ]+|(?!\s).)/g);
return p ? m.concat(p.map(function(x) {
var g, d;
return (d = (g = x.match(/[\t ]/g)) === null || g === void 0 ? void 0 : g.length) !== null && d !== void 0 ? d : 0;
})) : m;
}, []);
if (c.length) {
var u = new RegExp(`
[ ]{` + Math.min.apply(Math, c) + "}", "g");
n = n.map(function(m) {
return m.replace(u, `
`);
});
}
n[0] = n[0].replace(/^\r?\n/, "");
var b = n[0];
return e.forEach(function(m, f) {
var p = b.match(/(?:^|\n)( *)$/), x = p ? p[1] : "", g = m;
typeof m == "string" && m.includes(`
`) && (g = String(m).split(`
`).map(function(d, ae) {
return ae === 0 ? d : "" + x + d;
}).join(`
`)), b += g + n[f + 1];
}), b;
}
r(S, "dedent");
y.dedent = S;
y.default = S;
});
// src/server-errors.ts
var l = A(C(), 1), i = A(I(), 1);
// src/storybook-error.ts
function M({
code: t,
category: e
}) {
let o = String(t).padStart(4, "0");
return `SB_${e}_${o}`;
}
r(M, "parseErrorCode");
var a = class t extends Error {
constructor(o) {
super(t.getFullMessage(o));
/**
* 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 = o.category, this.documentation = o.documentation ?? !1, this.code = o.code;
}
static {
r(this, "StorybookError");
}
get fullErrorCode() {
return M({ code: this.code, category: this.category });
}
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
get name() {
let o = this.constructor.name;
return `${this.fullErrorCode} (${o})`;
}
/** Generates the error message along with additional documentation link (if applicable). */
static getFullMessage({
documentation: o,
code: n,
category: c,
message: u
}) {
let b;
return o === !0 ? b = `https://storybook.js.org/error/${M({ code: n, category: c })}` : typeof o == "string" ? b = o : Array.isArray(o) &&
(b = `
${o.map((m) => ` - ${m}`).join(`
`)}`), `${u}${b != null ? `
More info: ${b}
` : ""}`;
}
};
// src/server-errors.ts
var ye = /* @__PURE__ */ ((s) => (s.CLI = "CLI", s.CLI_INIT = "CLI_INIT", s.CLI_AUTOMIGRATE = "CLI_AUTOMIGRATE", s.CLI_UPGRADE = "CLI_UPGRAD\
E", s.CLI_ADD = "CLI_ADD", s.CODEMOD = "CODEMOD", s.CORE_SERVER = "CORE-SERVER", s.CSF_PLUGIN = "CSF-PLUGIN", s.CSF_TOOLS = "CSF-TOOLS", s.CORE_COMMON =
"CORE-COMMON", s.NODE_LOGGER = "NODE-LOGGER", s.TELEMETRY = "TELEMETRY", s.BUILDER_MANAGER = "BUILDER-MANAGER", s.BUILDER_VITE = "BUILDER-VI\
TE", s.BUILDER_WEBPACK5 = "BUILDER-WEBPACK5", s.SOURCE_LOADER = "SOURCE-LOADER", s.POSTINSTALL = "POSTINSTALL", s.DOCS_TOOLS = "DOCS-TOOLS",
s.CORE_WEBPACK = "CORE-WEBPACK", s.FRAMEWORK_ANGULAR = "FRAMEWORK_ANGULAR", s.FRAMEWORK_EMBER = "FRAMEWORK_EMBER", s.FRAMEWORK_HTML_VITE = "\
FRAMEWORK_HTML-VITE", s.FRAMEWORK_HTML_WEBPACK5 = "FRAMEWORK_HTML-WEBPACK5", s.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", s.FRAMEWORK_PREACT_VITE =
"FRAMEWORK_PREACT-VITE", s.FRAMEWORK_PREACT_WEBPACK5 = "FRAMEWORK_PREACT-WEBPACK5", s.FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE", s.FRAMEWORK_REACT_WEBPACK5 =
"FRAMEWORK_REACT-WEBPACK5", s.FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5", s.FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE", s.
FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT", s.FRAMEWORK_VUE_VITE = "FRAMEWORK_VUE-VITE", s.FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5",
s.FRAMEWORK_VUE3_VITE = "FRAMEWORK_VUE3-VITE", s.FRAMEWORK_VUE3_WEBPACK5 = "FRAMEWORK_VUE3-WEBPACK5", s.FRAMEWORK_WEB_COMPONENTS_VITE = "FRA\
MEWORK_WEB-COMPONENTS-VITE", s.FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = "FRAMEWORK_WEB-COMPONENTS-WEBPACK5", s))(ye || {}), T = class extends a {
static {
r(this, "NxProjectDetectedError");
}
constructor() {
super({
category: "CLI_INIT",
code: 1,
documentation: "https://nx.dev/nx-api/storybook#generating-storybook-configuration",
message: i.dedent`
We have detected Nx in your project. Nx has its own Storybook initializer, so please use it instead.
Run "nx g @nx/storybook:configuration <your-project-name>" to add Storybook to a given Nx app or lib.`
});
}
}, W = class extends a {
static {
r(this, "MissingFrameworkFieldError");
}
constructor() {
super({
category: "CORE-COMMON",
code: 1,
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api",
message: i.dedent`
Could not find a 'framework' field in Storybook config.
Please run 'npx storybook automigrate' to automatically fix your config.`
});
}
}, K = class extends a {
constructor(o) {
super({
category: "CORE-COMMON",
code: 2,
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-framework-api",
message: i.dedent`
Invalid value of '${o.frameworkName}' in the 'framework' field of Storybook config.
Please run 'npx storybook automigrate' to automatically fix your config.
`
});
this.data = o;
}
static {
r(this, "InvalidFrameworkNameError");
}
}, v = class extends a {
constructor(o) {
super({
category: "CORE-COMMON",
code: 3,
documentation: "",
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 = o;
}
static {
r(this, "CouldNotEvaluateFrameworkError");
}
}, B = class extends a {
static {
r(this, "ConflictingStaticDirConfigError");
}
constructor() {
super({
category: "CORE-SERVER",
code: 1,
documentation: "https://storybook.js.org/docs/configure/integration/images-and-assets#serving-static-files-via-storybook-configuration",
message: i.dedent`
Storybook encountered a conflict when trying to serve statics. You have configured both:
* Storybook's option in the config file: 'staticDirs'
* Storybook's (deprecated) CLI flag: '--staticDir' or '-s'
Please remove the CLI flag from your storybook script and use only the 'staticDirs' option instead.`
});
}
}, L = class extends a {
static {
r(this, "InvalidStoriesEntryError");
}
constructor() {
super({
category: "CORE-COMMON",
code: 4,
documentation: "https://storybook.js.org/docs/faq#can-i-have-a-storybook-with-no-local-stories",
message: i.dedent`
Storybook could not index your stories.
Your main configuration somehow does not contain a 'stories' field, or it resolved to an empty array.
Please check your main configuration file and make sure it exports a 'stories' field that is not an empty array.`
});
}
}, N = class extends a {
static {
r(this, "WebpackMissingStatsError");
}
constructor() {
super({
category: "BUILDER-WEBPACK5",
code: 1,
documentation: [
"https://webpack.js.org/configuration/stats/",
"https://storybook.js.org/docs/builders/webpack#configure"
],
message: i.dedent`
No Webpack stats found. Did you turn off stats reporting in your Webpack config?
Storybook needs Webpack stats (including errors) in order to build correctly.`
});
}
}, P = class extends a {
constructor(o) {
super({
category: "BUILDER-WEBPACK5",
code: 2,
message: o.error.message.trim()
});
this.data = o;
}
static {
r(this, "WebpackInvocationError");
}
};
function j(t = "") {
return t.replace(/\u001B\[[0-9;]*m/g, "");
}
r(j, "removeAnsiEscapeCodes");
var V = class extends a {
constructor(o) {
o.errors = o.errors.map((n) => ({
...n,
message: j(n.message),
stack: j(n.stack),
name: n.name
}));
super({
category: "BUILDER-WEBPACK5",
code: 3,
// This error message is a followup of errors logged by Webpack to the user
message: i.dedent`
There were problems when compiling your code with Webpack.
Run Storybook with --debug-webpack for more information.
`
});
this.data = o;
}
static {
r(this, "WebpackCompilationError");
}
}, $ = class extends a {
constructor(o) {
super({
category: "CLI_INIT",
code: 2,
documentation: "https://storybook.js.org/docs/faq#error-no-angularjson-file-found",
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 = o;
}
static {
r(this, "MissingAngularJsonError");
}
}, F = class extends a {
static {
r(this, "AngularLegacyBuildOptionsError");
}
constructor() {
super({
category: "FRAMEWORK_ANGULAR",
code: 1,
documentation: [
"https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#angular-drop-support-for-calling-storybook-directly",
"https://github.com/storybookjs/storybook/tree/next/code/frameworks/angular#how-do-i-migrate-to-an-angular-storybook-builder"
],
message: i.dedent`
Your Storybook startup script uses a solution that is not supported anymore.
You must use Angular builder to have an explicit configuration on the project used in angular.json.
Please run 'npx storybook automigrate' to automatically fix your config.`
});
}
}, D = class extends a {
constructor(o) {
super({
category: "CORE-SERVER",
code: 2,
documentation: "",
message: i.dedent`
Storybook failed to load the following preset: ${o.presetName}.
Please check whether your setup is correct, the Storybook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.
If you believe this is a bug, please open an issue on Github.
${o.error.stack || o.error.message}`
});
this.data = o;
}
static {
r(this, "CriticalPresetLoadError");
}
}, U = class extends a {
static {
r(this, "MissingBuilderError");
}
constructor() {
super({
category: "CORE-SERVER",
code: 3,
documentation: "https://github.com/storybookjs/storybook/issues/24071",
message: i.dedent`
Storybook could not find a builder configuration for your project.
Builders normally come from a framework package e.g. '@storybook/react-vite', or from builder packages e.g. '@storybook/builder-vite'.
- Does your main config file contain a 'framework' field configured correctly?
- Is the Storybook framework package installed correctly?
- If you don't use a framework, does your main config contain a 'core.builder' configured correctly?
- Are you in a monorepo and perhaps the framework package is hoisted incorrectly?
If you believe this is a bug, please describe your issue in detail on Github.`
});
}
}, G = class extends a {
constructor(o) {
super({
category: "FRAMEWORK_NEXTJS",
code: 1,
documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
message: i.dedent`
Failed to fetch \`${o.fontFamily}\` from Google Fonts with URL: \`${o.url}\``
});
this.data = o;
}
static {
r(this, "GoogleFontsDownloadError");
}
}, Y = class extends a {
constructor(o) {
super({
category: "FRAMEWORK_NEXTJS",
code: 2,
documentation: "https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md#nextjs-font-optimization",
message: i.dedent`
An error occurred when trying to load Google Fonts with URL \`${o.url}\`.
${o.error instanceof Error ? o.error.message : ""}`
});
this.data = o;
}
static {
r(this, "GoogleFontsLoadingError");
}
}, J = class extends a {
static {
r(this, "SvelteViteWithSvelteKitError");
}
constructor() {
super({
category: "FRAMEWORK_SVELTE-VITE",
code: 1,
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-needs-the-storybooksveltekit-framework",
message: i.dedent`
We've detected a SvelteKit project using the @storybook/svelte-vite framework, which is not supported.
Please use the @storybook/sveltekit framework instead.`
});
}
}, X = class extends a {
constructor(o) {
super({
category: "CORE-SERVER",
code: 4,
documentation: "",
message: i.dedent`
There was an exports mismatch error when trying to build Storybook.
Please check whether the versions of your Storybook packages match whenever possible, as this might be the cause.
Problematic example:
{ "@storybook/react": "7.5.3", "@storybook/react-vite": "7.4.5", "storybook": "7.3.0" }
Correct example:
{ "@storybook/react": "7.5.3", "@storybook/react-vite": "7.5.3", "storybook": "7.5.3" }
Please run \`npx storybook doctor\` for guidance on how to fix this issue.`
});
this.data = o;
}
static {
r(this, "NoMatchingExportError");
}
}, 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 ${o.location}`,
"You can import ESM modules in your main file, but only as dynamic import.",
""
];
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:`
),
l.default.gray(o.line)
), n.push(
"",
l.default.white(
`Convert the static import to a dynamic import ${l.default.underline("where they are used")}.`
),
l.default.white("Example:") + " " + l.default.gray("await import(<your ESM only module>);"),
""
);
super({
category: "CORE-SERVER",
code: 5,
documentation: "https://github.com/storybookjs/storybook/issues/23972#issuecomment-1948534058",
message: n.join(`
`)
});
this.data = o;
}
static {
r(this, "MainFileESMOnlyImportError");
}
}, z = class extends a {
constructor(o) {
let n = {
storybook: {
helperMessage: "You can pass a --config-dir flag to tell Storybook, where your main.js file is located at.",
documentation: "https://storybook.js.org/docs/configure"
},
vitest: {
helperMessage: "You can pass a configDir plugin option to tell where your main.js file is located at.",
// TODO: add proper docs once available
documentation: "https://storybook.js.org/docs/configure"
}
}, { documentation: c, helperMessage: u } = n[o.source || "storybook"];
super({
category: "CORE-SERVER",
code: 6,
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.
${u}`
});
this.data = o;
}
static {
r(this, "MainFileMissingError");
}
}, q = class extends a {
constructor(o) {
let n = l.default.white(
(o.error.stack || o.error.message).replaceAll(process.cwd(), "")
);
super({
category: "CORE-SERVER",
code: 7,
message: i.dedent`
Storybook couldn't evaluate your ${l.default.yellow(o.location)} file.
Original error:
${n}`
});
this.data = o;
}
static {
r(this, "MainFileEvaluationError");
}
}, Q = class extends a {
constructor(o) {
super({
category: "CORE-SERVER",
code: 16,
message: `Status has typeId "${o.status.typeId}" but was added to store with typeId "${o.typeId}". Full status: ${JSON.stringify(
o.status,
null,
2
)}`
});
this.data = o;
}
static {
r(this, "StatusTypeIdMismatchError");
}
}, Z = class extends a {
constructor(o) {
super({
category: "CLI_INIT",
code: 3,
documentation: "",
message: i.dedent`
There was an error while using ${o.packageManager} to create a new ${o.projectType} project.
${o.error instanceof Error ? o.error.message : ""}`
});
this.data = o;
}
static {
r(this, "GenerateNewProjectOnInitError");
}
}, ee = class extends a {
constructor(o) {
super({
category: "CLI_UPGRADE",
code: 3,
message: i.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}.
This usually happens when running the upgrade command without a version specifier, e.g. "npx storybook upgrade".
This will cause npm to run the globally cached storybook binary, which might be an older version.
Instead you should always run the Storybook CLI with a version specifier to force npm to download the latest version:
"npx storybook@latest upgrade"`
});
this.data = o;
}
static {
r(this, "UpgradeStorybookToLowerVersionError");
}
}, oe = class extends a {
static {
r(this, "UpgradeStorybookUnknownCurrentVersionError");
}
constructor() {
super({
category: "CLI_UPGRADE",
code: 5,
message: i.dedent`
We couldn't determine the current version of Storybook in your project.
Are you running the Storybook CLI in a project without Storybook?
It might help if you specify your Storybook config directory with the --config-dir flag.`
});
}
}, te = class extends a {
static {
r(this, "NoStatsForViteDevError");
}
constructor() {
super({
category: "BUILDER-VITE",
code: 1,
message: i.dedent`
Unable to write preview stats as the Vite builder does not support stats in dev mode.
Please remove the \`--stats-json\` flag when running in dev mode.`
});
}
}, re = class extends a {
constructor(o) {
super({
category: "CLI",
code: 1,
message: i.dedent`
Unable to find versions of "${o.packageName}" using ${o.packageManager}
${o.error && `Reason: ${o.error}`}`
});
this.data = o;
}
static {
r(this, "FindPackageVersionsError");
}
}, se = class extends a {
constructor(o) {
super({
category: "FRAMEWORK_NEXTJS",
code: 3,
message: i.dedent`
Incompatible PostCSS configuration format detected.
Next.js uses an array-based format for plugins which is not compatible with Vite:
// ❌ Incompatible format (used by Next.js)
const config = {
plugins: ["@tailwindcss/postcss"],
};
Please transform your PostCSS config to use the object-based format, which is compatible with Next.js and Vite:
// ✅ Compatible format (works with Next.js and Vite)
const config = {
plugins: {
"@tailwindcss/postcss": {},
},
};
Original error: ${o.error.message}
`
});
this.data = o;
}
static {
r(this, "IncompatiblePostCssConfigError");
}
}, ne = class extends a {
constructor(o) {
super({
category: "CORE-SERVER",
code: 1,
message: i.dedent`
Unable to save global settings file to ${o.filePath}
${o.error && `Reason: ${o.error}`}`
});
this.data = o;
}
static {
r(this, "SavingGlobalSettingsFileError");
}
};
export {
F as AngularLegacyBuildOptionsError,
ye as Category,
B as ConflictingStaticDirConfigError,
v as CouldNotEvaluateFrameworkError,
D as CriticalPresetLoadError,
re as FindPackageVersionsError,
Z as GenerateNewProjectOnInitError,
G as GoogleFontsDownloadError,
Y as GoogleFontsLoadingError,
se as IncompatiblePostCssConfigError,
K as InvalidFrameworkNameError,
L as InvalidStoriesEntryError,
H as MainFileESMOnlyImportError,
q as MainFileEvaluationError,
z as MainFileMissingError,
$ as MissingAngularJsonError,
U as MissingBuilderError,
W as MissingFrameworkFieldError,
X as NoMatchingExportError,
te as NoStatsForViteDevError,
T as NxProjectDetectedError,
ne as SavingGlobalSettingsFileError,
Q as StatusTypeIdMismatchError,
J as SvelteViteWithSvelteKitError,
ee as UpgradeStorybookToLowerVersionError,
oe as UpgradeStorybookUnknownCurrentVersionError,
V as WebpackCompilationError,
P as WebpackInvocationError,
N as WebpackMissingStatsError
};

6259
frontend/node_modules/storybook/dist/telemetry/index.cjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,135 @@
import { TypescriptOptions, StorybookConfig, PackageJson } from 'storybook/internal/types';
import { BinaryLike } from 'crypto';
type Agent = 'npm' | 'yarn' | 'yarn@berry' | 'pnpm' | 'pnpm@6' | 'bun' | 'deno';
type AgentName = 'npm' | 'yarn' | 'pnpm' | 'bun' | 'deno';
interface DetectResult {
/**
* Agent name without the specifier.
*
* Can be `npm`, `yarn`, `pnpm`, `bun`, or `deno`.
*/
name: AgentName;
/**
* Agent specifier to resolve the command.
*
* May contain '@' to differentiate the version (e.g. 'yarn@berry').
* Use `name` for the agent name without the specifier.
*/
agent: Agent;
/**
* Specific version of the agent, read from `packageManager` field in package.json.
*/
version?: string;
}
declare const monorepoConfigs: {
readonly Nx: "nx.json";
readonly Turborepo: "turbo.json";
readonly Lerna: "lerna.json";
readonly Rush: "rush.json";
readonly Lage: "lage.config.json";
};
type MonorepoType = keyof typeof monorepoConfigs | 'Workspaces' | undefined;
type EventType = 'boot' | 'dev' | 'build' | 'index' | 'upgrade' | 'multi-upgrade' | 'init' | 'init-step' | 'scaffolded-empty' | 'browser' | 'canceled' | 'error' | 'error-metadata' | 'version-update' | 'core-config' | 'remove' | 'save-story' | 'create-new-story-file' | 'create-new-story-file-search' | 'testing-module-watch-mode' | 'testing-module-completed-report' | 'testing-module-crash-report' | 'addon-test' | 'test-run';
interface Dependency {
version: string | undefined;
versionSpecifier?: string;
}
interface StorybookAddon extends Dependency {
options: any;
}
type StorybookMetadata = {
storybookVersion?: string;
storybookVersionSpecifier: string;
generatedAt?: number;
userSince?: number;
language: 'typescript' | 'javascript';
framework?: {
name: string;
options?: any;
};
builder?: string;
renderer?: string;
monorepo?: MonorepoType;
packageManager?: {
type: DetectResult['name'];
version: DetectResult['version'];
agent: DetectResult['agent'];
};
typescriptOptions?: Partial<TypescriptOptions>;
addons?: Record<string, StorybookAddon>;
storybookPackages?: Record<string, Dependency>;
metaFramework?: {
name: string;
packageName: string;
version: string;
};
testPackages?: Record<string, string | undefined>;
hasRouterPackage?: boolean;
hasStorybookEslint?: boolean;
hasStaticDirs?: boolean;
hasCustomWebpack?: boolean;
hasCustomBabel?: boolean;
features?: StorybookConfig['features'];
refCount?: number;
preview?: {
usesGlobals?: boolean;
};
portableStoriesFileCount?: number;
applicationFileCount?: number;
};
interface Payload {
[key: string]: any;
}
interface Options {
retryDelay: number;
immediate: boolean;
configDir?: string;
enableCrashReports?: boolean;
stripMetadata?: boolean;
notify?: boolean;
}
interface TelemetryData {
eventType: EventType;
payload: Payload;
metadata?: StorybookMetadata;
}
declare const oneWayHash: (payload: BinaryLike) => string;
declare const metaFrameworks: Record<string, string>;
declare const sanitizeAddonName: (name: string) => string;
declare const computeStorybookMetadata: ({ packageJsonPath, packageJson, mainConfig, configDir, }: {
packageJsonPath: string;
packageJson: PackageJson;
mainConfig?: StorybookConfig & Record<string, any>;
configDir: string;
}) => Promise<StorybookMetadata>;
declare const getStorybookMetadata: (_configDir?: string) => Promise<StorybookMetadata>;
interface IErrorWithStdErrAndStdOut {
stderr?: Buffer | string;
stdout?: Buffer | string;
[key: string]: unknown;
}
declare function removeAnsiEscapeCodes(input?: string): string;
declare function cleanPaths(str: string, separator?: string): string;
declare function sanitizeError(error: Error, pathSeparator?: string): any;
interface UpgradeSummary {
timestamp: number;
eventType?: EventType;
eventId?: string;
sessionId?: string;
}
declare const getPrecedingUpgrade: (events?: any) => Promise<UpgradeSummary | undefined>;
declare const addToGlobalContext: (key: string, value: any) => void;
/** Is this story part of the CLI generated examples, including user-created stories in those files */
declare const isExampleStoryId: (storyId: string) => boolean;
declare const telemetry: (eventType: EventType, payload?: Payload, options?: Partial<Options>) => Promise<void>;
export { type Dependency, type EventType, type IErrorWithStdErrAndStdOut, type Options, type Payload, type StorybookAddon, type StorybookMetadata, type TelemetryData, addToGlobalContext, cleanPaths, computeStorybookMetadata, getPrecedingUpgrade, getStorybookMetadata, isExampleStoryId, metaFrameworks, oneWayHash, removeAnsiEscapeCodes, sanitizeAddonName, sanitizeError, telemetry };

Some files were not shown because too many files have changed in this diff Show More