@storybook/core
Advanced tools
Comparing version 8.3.0-alpha.5 to 8.3.0-alpha.6
@@ -26,2 +26,3 @@ import * as _storybook_core_types from '@storybook/core/types'; | ||
'@storybook/addon-viewport': string; | ||
'@storybook/experimental-addon-vitest': string; | ||
'@storybook/builder-vite': string; | ||
@@ -941,2 +942,24 @@ '@storybook/builder-webpack5': string; | ||
interface StoryIdData { | ||
storyFilePath: string; | ||
exportedStoryName: string; | ||
} | ||
type GetStoryIdOptions = StoryIdData & { | ||
configDir: string; | ||
stories: StoriesEntry[]; | ||
workingDir?: string; | ||
userTitle?: string; | ||
storyFilePath: string; | ||
}; | ||
declare function getStoryId(data: StoryIdData, options: Options$2): Promise<{ | ||
storyId: string; | ||
kind: string; | ||
}>; | ||
declare function getStoryTitle({ storyFilePath, configDir, stories, workingDir, userTitle, }: Omit<GetStoryIdOptions, 'exportedStoryName'>): string | undefined; | ||
/** | ||
* Replaces the path separator with forward slashes | ||
*/ | ||
declare const posix: (localPath: string, seperator?: string) => string; | ||
declare const Cache: (options?: FileSystemCacheOptions | undefined) => FileSystemCache$1; | ||
@@ -947,2 +970,2 @@ type Options = Parameters<typeof Cache>['0']; | ||
export { type FileOptions, HandledError, type InstallationMetadata, JsPackageManager, JsPackageManagerFactory, type PackageJsonWithDepsAndDevDeps, type PackageJsonWithMaybeDeps, type PackageManagerName, type PackageMetadata, boost, builderPackages, cache, checkAddonOrder, codeLog, commandLog, commonGlobOptions, createFileSystemCache, createLogStream, extractProperFrameworkName, extractProperRendererNameFromFramework, filterPresetsConfig, findConfigFile, formatFileContent, frameworkPackages, frameworkToRenderer, getAutoRefs, getBuilderOptions, getChars, getCoercedStorybookVersion, getConfigInfo, getDirectoryFromWorkingDir, getEnvConfig, getFrameworkName, getInterpretedFile, getInterpretedFileWithExt, getPackageDetails, getPresets, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStorybookConfiguration, getStorybookInfo, globToRegexp, handlebars, interopRequireDefault, interpolate, isCorePackage, isPreservingSymlinks, loadAllPresets, loadCustomPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, paddedLog, parseList, readTemplate, removeAddon, rendererPackages, resolveAddonName, resolvePathInStorybookCache, satisfies, serverRequire, serverResolve, stringifyEnvs, stringifyProcessEnvs, stripAbsNodeModulesPath, temporaryDirectory, temporaryFile, validateConfigurationFiles, validateFrameworkName, _default as versions }; | ||
export { type FileOptions, HandledError, type InstallationMetadata, JsPackageManager, JsPackageManagerFactory, type PackageJsonWithDepsAndDevDeps, type PackageJsonWithMaybeDeps, type PackageManagerName, type PackageMetadata, boost, builderPackages, cache, checkAddonOrder, codeLog, commandLog, commonGlobOptions, createFileSystemCache, createLogStream, extractProperFrameworkName, extractProperRendererNameFromFramework, filterPresetsConfig, findConfigFile, formatFileContent, frameworkPackages, frameworkToRenderer, getAutoRefs, getBuilderOptions, getChars, getCoercedStorybookVersion, getConfigInfo, getDirectoryFromWorkingDir, getEnvConfig, getFrameworkName, getInterpretedFile, getInterpretedFileWithExt, getPackageDetails, getPresets, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStoryId, getStoryTitle, getStorybookConfiguration, getStorybookInfo, globToRegexp, handlebars, interopRequireDefault, interpolate, isCorePackage, isPreservingSymlinks, loadAllPresets, loadCustomPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, paddedLog, parseList, posix, readTemplate, removeAddon, rendererPackages, resolveAddonName, resolvePathInStorybookCache, satisfies, serverRequire, serverResolve, stringifyEnvs, stringifyProcessEnvs, stripAbsNodeModulesPath, temporaryDirectory, temporaryFile, validateConfigurationFiles, validateFrameworkName, _default as versions }; |
@@ -988,2 +988,4 @@ import * as React$1 from 'react'; | ||
disabled?: boolean; | ||
href?: string; | ||
onClick?: (event: SyntheticEvent, ...args: any[]) => any; | ||
} | ||
@@ -993,3 +995,3 @@ declare const Item: _storybook_core_theming.StyledComponent<{ | ||
as?: React__default.ElementType<any, keyof React__default.JSX.IntrinsicElements> | undefined; | ||
} & ItemProps, React__default.DetailedHTMLProps<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>; | ||
} & ItemProps, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>; | ||
type LinkWrapperType = (props: any) => ReactNode; | ||
@@ -1010,12 +1012,15 @@ interface ListItemProps extends Omit<ComponentProps<typeof Item>, 'href' | 'title'> { | ||
declare const List: _storybook_core_theming.StyledComponent<{ | ||
theme?: Theme | undefined; | ||
as?: React__default.ElementType<any, keyof React__default.JSX.IntrinsicElements> | undefined; | ||
}, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>; | ||
interface Link extends Omit<ListItemProps, 'onClick'> { | ||
id: string; | ||
isGatsby?: boolean; | ||
onClick?: (event: SyntheticEvent, item: ListItemProps) => void; | ||
onClick?: (event: SyntheticEvent, item: Pick<ListItemProps, 'id' | 'active' | 'disabled' | 'title'>) => void; | ||
} | ||
interface TooltipLinkListProps { | ||
interface TooltipLinkListProps extends ComponentProps<typeof List> { | ||
links: Link[]; | ||
LinkWrapper?: LinkWrapperType; | ||
} | ||
declare const TooltipLinkList: ({ links, LinkWrapper }: TooltipLinkListProps) => React__default.JSX.Element; | ||
declare const TooltipLinkList: ({ links, LinkWrapper, ...props }: TooltipLinkListProps) => React__default.JSX.Element; | ||
@@ -1022,0 +1027,0 @@ declare const TabBar: _storybook_core_theming.StyledComponent<{ |
@@ -118,2 +118,3 @@ import { ArgTypes } from '@storybook/csf'; | ||
RESET_STORY_ARGS = "resetStoryArgs", | ||
SET_FILTER = "setFilter", | ||
SET_GLOBALS = "setGlobals", | ||
@@ -172,2 +173,3 @@ UPDATE_GLOBALS = "updateGlobals", | ||
declare const SET_CURRENT_STORY: events; | ||
declare const SET_FILTER: events; | ||
declare const SET_GLOBALS: events; | ||
@@ -204,2 +206,2 @@ declare const SET_INDEX: 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_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_INDEX_INVALIDATED, STORY_MISSING, STORY_PREPARED, STORY_RENDERED, STORY_RENDER_PHASE_CHANGED, STORY_SPECIFIED, STORY_THREW_EXCEPTION, STORY_UNCHANGED, type SaveStoryRequestPayload, type SaveStoryResponsePayload, 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 }; | ||
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_INDEX_INVALIDATED, STORY_MISSING, STORY_PREPARED, STORY_RENDERED, STORY_RENDER_PHASE_CHANGED, STORY_SPECIFIED, STORY_THREW_EXCEPTION, STORY_UNCHANGED, type SaveStoryRequestPayload, type SaveStoryResponsePayload, 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 }; |
@@ -9,12 +9,12 @@ // src/core-events/index.ts | ||
erPhaseChanged", E.PLAY_FUNCTION_THREW_EXCEPTION = "playFunctionThrewException", E.UNHANDLED_ERRORS_WHILE_PLAYING = "unhandledErrorsWhilePla\ | ||
ying", E.UPDATE_STORY_ARGS = "updateStoryArgs", E.STORY_ARGS_UPDATED = "storyArgsUpdated", E.RESET_STORY_ARGS = "resetStoryArgs", E.SET_GLOBALS = | ||
"setGlobals", E.UPDATE_GLOBALS = "updateGlobals", E.GLOBALS_UPDATED = "globalsUpdated", 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 = "sharedStateChan\ | ||
ged", 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, { | ||
ying", E.UPDATE_STORY_ARGS = "updateStoryArgs", E.STORY_ARGS_UPDATED = "storyArgsUpdated", E.RESET_STORY_ARGS = "resetStoryArgs", E.SET_FILTER = | ||
"setFilter", E.SET_GLOBALS = "setGlobals", E.UPDATE_GLOBALS = "updateGlobals", E.GLOBALS_UPDATED = "globalsUpdated", E.REGISTER_SUBSCRIPTION = | ||
"registerSubscription", E.PREVIEW_KEYDOWN = "previewKeydown", E.PREVIEW_BUILDER_PROGRESS = "preview_builder_progress", E.SELECT_STORY = "sel\ | ||
ectStory", 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 = "fil\ | ||
eComponentSearchRequest", 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: _, | ||
@@ -39,41 +39,42 @@ CHANNEL_CREATED: T, | ||
PREVIEW_KEYDOWN: d, | ||
REGISTER_SUBSCRIPTION: p, | ||
RESET_STORY_ARGS: t, | ||
REGISTER_SUBSCRIPTION: t, | ||
RESET_STORY_ARGS: p, | ||
SELECT_STORY: i, | ||
SET_CONFIG: l, | ||
SET_CURRENT_STORY: e, | ||
SET_CURRENT_STORY: F, | ||
SET_FILTER: e, | ||
SET_GLOBALS: y, | ||
SET_INDEX: F, | ||
SET_STORIES: c, | ||
SHARED_STATE_CHANGED: h, | ||
SHARED_STATE_SET: f, | ||
STORIES_COLLAPSE_ALL: g, | ||
STORIES_EXPAND_ALL: u, | ||
STORY_ARGS_UPDATED: s, | ||
STORY_CHANGED: x, | ||
STORY_ERRORED: M, | ||
STORY_INDEX_INVALIDATED: Q, | ||
STORY_MISSING: m, | ||
STORY_PREPARED: V, | ||
STORY_RENDER_PHASE_CHANGED: w, | ||
STORY_RENDERED: B, | ||
STORY_SPECIFIED: X, | ||
STORY_THREW_EXCEPTION: b, | ||
STORY_UNCHANGED: q, | ||
UPDATE_GLOBALS: K, | ||
UPDATE_QUERY_PARAMS: j, | ||
UPDATE_STORY_ARGS: k, | ||
REQUEST_WHATS_NEW_DATA: z, | ||
RESULT_WHATS_NEW_DATA: J, | ||
SET_WHATS_NEW_CACHE: Z, | ||
TOGGLE_WHATS_NEW_NOTIFICATIONS: $, | ||
TELEMETRY_ERROR: n, | ||
SAVE_STORY_REQUEST: v, | ||
SAVE_STORY_RESPONSE: EE, | ||
ARGTYPES_INFO_REQUEST: RE, | ||
ARGTYPES_INFO_RESPONSE: SE | ||
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: Q, | ||
STORY_INDEX_INVALIDATED: m, | ||
STORY_MISSING: V, | ||
STORY_PREPARED: w, | ||
STORY_RENDER_PHASE_CHANGED: B, | ||
STORY_RENDERED: X, | ||
STORY_SPECIFIED: b, | ||
STORY_THREW_EXCEPTION: q, | ||
STORY_UNCHANGED: K, | ||
UPDATE_GLOBALS: j, | ||
UPDATE_QUERY_PARAMS: k, | ||
UPDATE_STORY_ARGS: z, | ||
REQUEST_WHATS_NEW_DATA: J, | ||
RESULT_WHATS_NEW_DATA: Z, | ||
SET_WHATS_NEW_CACHE: $, | ||
TOGGLE_WHATS_NEW_NOTIFICATIONS: n, | ||
TELEMETRY_ERROR: v, | ||
SAVE_STORY_REQUEST: EE, | ||
SAVE_STORY_RESPONSE: RE, | ||
ARGTYPES_INFO_REQUEST: SE, | ||
ARGTYPES_INFO_RESPONSE: _E | ||
} = R; | ||
export { | ||
RE as ARGTYPES_INFO_REQUEST, | ||
SE as ARGTYPES_INFO_RESPONSE, | ||
SE as ARGTYPES_INFO_REQUEST, | ||
_E as ARGTYPES_INFO_RESPONSE, | ||
T as CHANNEL_CREATED, | ||
@@ -97,37 +98,38 @@ _ as CHANNEL_WS_DISCONNECT, | ||
d as PREVIEW_KEYDOWN, | ||
p as REGISTER_SUBSCRIPTION, | ||
z as REQUEST_WHATS_NEW_DATA, | ||
t as RESET_STORY_ARGS, | ||
J as RESULT_WHATS_NEW_DATA, | ||
v as SAVE_STORY_REQUEST, | ||
EE as SAVE_STORY_RESPONSE, | ||
t as REGISTER_SUBSCRIPTION, | ||
J as REQUEST_WHATS_NEW_DATA, | ||
p as RESET_STORY_ARGS, | ||
Z as RESULT_WHATS_NEW_DATA, | ||
EE as SAVE_STORY_REQUEST, | ||
RE as SAVE_STORY_RESPONSE, | ||
i as SELECT_STORY, | ||
l as SET_CONFIG, | ||
e as SET_CURRENT_STORY, | ||
F as SET_CURRENT_STORY, | ||
e as SET_FILTER, | ||
y as SET_GLOBALS, | ||
F as SET_INDEX, | ||
c as SET_STORIES, | ||
Z as SET_WHATS_NEW_CACHE, | ||
h as SHARED_STATE_CHANGED, | ||
f as SHARED_STATE_SET, | ||
g as STORIES_COLLAPSE_ALL, | ||
u as STORIES_EXPAND_ALL, | ||
s as STORY_ARGS_UPDATED, | ||
x as STORY_CHANGED, | ||
M as STORY_ERRORED, | ||
Q as STORY_INDEX_INVALIDATED, | ||
m as STORY_MISSING, | ||
V as STORY_PREPARED, | ||
B as STORY_RENDERED, | ||
w as STORY_RENDER_PHASE_CHANGED, | ||
X as STORY_SPECIFIED, | ||
b as STORY_THREW_EXCEPTION, | ||
q as STORY_UNCHANGED, | ||
n as TELEMETRY_ERROR, | ||
$ as TOGGLE_WHATS_NEW_NOTIFICATIONS, | ||
c as SET_INDEX, | ||
h as SET_STORIES, | ||
$ 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, | ||
Q as STORY_ERRORED, | ||
m as STORY_INDEX_INVALIDATED, | ||
V as STORY_MISSING, | ||
w as STORY_PREPARED, | ||
X as STORY_RENDERED, | ||
B as STORY_RENDER_PHASE_CHANGED, | ||
b as STORY_SPECIFIED, | ||
q as STORY_THREW_EXCEPTION, | ||
K as STORY_UNCHANGED, | ||
v as TELEMETRY_ERROR, | ||
n as TOGGLE_WHATS_NEW_NOTIFICATIONS, | ||
G as UNHANDLED_ERRORS_WHILE_PLAYING, | ||
K as UPDATE_GLOBALS, | ||
j as UPDATE_QUERY_PARAMS, | ||
k as UPDATE_STORY_ARGS, | ||
j as UPDATE_GLOBALS, | ||
k as UPDATE_QUERY_PARAMS, | ||
z as UPDATE_STORY_ARGS, | ||
S as default | ||
}; |
@@ -72,2 +72,4 @@ import ESM_COMPAT_Module from "node:module"; | ||
"AppleIcon", | ||
"ArrowBottomLeftIcon", | ||
"ArrowBottomRightIcon", | ||
"ArrowDownIcon", | ||
@@ -80,2 +82,4 @@ "ArrowLeftIcon", | ||
"ArrowSolidUpIcon", | ||
"ArrowTopLeftIcon", | ||
"ArrowTopRightIcon", | ||
"ArrowUpIcon", | ||
@@ -253,2 +257,5 @@ "AzureDevOpsIcon", | ||
"StarIcon", | ||
"StatusFailIcon", | ||
"StatusPassIcon", | ||
"StatusWarnIcon", | ||
"StickerIcon", | ||
@@ -289,2 +296,3 @@ "StopAltIcon", | ||
"WrenchIcon", | ||
"XIcon", | ||
"YoutubeIcon", | ||
@@ -788,2 +796,3 @@ "ZoomIcon", | ||
"SET_CURRENT_STORY", | ||
"SET_FILTER", | ||
"SET_GLOBALS", | ||
@@ -845,2 +854,3 @@ "SET_INDEX", | ||
"SET_CURRENT_STORY", | ||
"SET_FILTER", | ||
"SET_GLOBALS", | ||
@@ -902,2 +912,3 @@ "SET_INDEX", | ||
"SET_CURRENT_STORY", | ||
"SET_FILTER", | ||
"SET_GLOBALS", | ||
@@ -904,0 +915,0 @@ "SET_INDEX", |
import { Channel } from '@storybook/core/channels'; | ||
import * as _storybook_core_types from '@storybook/core/types'; | ||
import { Renderer, Args, StoryContext, StoryId, DecoratorApplicator, Addon_StoryWrapper, PreparedStory, Globals, GlobalTypes, StoryName, ComponentTitle, StoryIndex, IndexEntry, Path, LegacyStoryAnnotationsOrFn, NormalizedComponentAnnotations, NormalizedStoryAnnotations, ModuleExports, CSFFile, NormalizedProjectAnnotations, ModuleExport, PreparedMeta, ProjectAnnotations, StepRunner, NamedOrDefaultProjectAnnotations, ComponentAnnotations, ComposedStoryFn, Store_CSFExports, ComposeStoryFn, ModuleImportFn, Parameters, StoryContextForEnhancers, StoryIndexV3, BoundStory, StrictArgTypes, ArgTypesEnhancer, LegacyStoryFn, DecoratorFunction, PartialStoryFn, StoryContextUpdate, NormalizedStoriesSpecifier, Addon_StorySortParameterV7, DocsContextProps, ResolvedModuleExportType, ResolvedModuleExportFromType, StoryRenderOptions, RenderContextCallbacks, RenderToCanvas, ViewMode } from '@storybook/core/types'; | ||
import { Renderer, Args, StoryContext, StoryId, DecoratorApplicator, Addon_StoryWrapper, PreparedStory, Globals, GlobalTypes, StoryName, ComponentTitle, StoryIndex, IndexEntry, Path, LegacyStoryAnnotationsOrFn, NormalizedComponentAnnotations, NormalizedStoryAnnotations, ModuleExports, CSFFile, NormalizedProjectAnnotations, ModuleExport, PreparedMeta, StepRunner, ProjectAnnotations, NamedOrDefaultProjectAnnotations, ComponentAnnotations, ComposedStoryFn, Store_CSFExports, ComposeStoryFn, ModuleImportFn, Parameters, StoryContextForEnhancers, StoryIndexV3, BoundStory, StrictArgTypes, ArgTypesEnhancer, LegacyStoryFn, DecoratorFunction, PartialStoryFn, StoryContextUpdate, NormalizedStoriesSpecifier, Addon_StorySortParameterV7, DocsContextProps, ResolvedModuleExportType, ResolvedModuleExportFromType, StoryRenderOptions, RenderContextCallbacks, RenderToCanvas, ViewMode } from '@storybook/core/types'; | ||
import * as _storybook_csf from '@storybook/csf'; | ||
@@ -315,3 +315,3 @@ import { CleanupCallback, Canvas } from '@storybook/csf'; | ||
declare function composeConfigs<TRenderer extends Renderer>(moduleExportList: ModuleExports[]): ProjectAnnotations<TRenderer>; | ||
declare function composeConfigs<TRenderer extends Renderer>(moduleExportList: ModuleExports[]): NormalizedProjectAnnotations<TRenderer>; | ||
@@ -338,5 +338,10 @@ /** | ||
declare function setProjectAnnotations<TRenderer extends Renderer = Renderer>(projectAnnotations: NamedOrDefaultProjectAnnotations<TRenderer> | NamedOrDefaultProjectAnnotations<TRenderer>[]): ProjectAnnotations<TRenderer>; | ||
declare global { | ||
var globalProjectAnnotations: NormalizedProjectAnnotations<any>; | ||
var defaultProjectAnnotations: ProjectAnnotations<any>; | ||
} | ||
declare function setDefaultProjectAnnotations<TRenderer extends Renderer = Renderer>(_defaultProjectAnnotations: ProjectAnnotations<TRenderer>): void; | ||
declare function setProjectAnnotations<TRenderer extends Renderer = Renderer>(projectAnnotations: NamedOrDefaultProjectAnnotations<TRenderer> | NamedOrDefaultProjectAnnotations<TRenderer>[]): NormalizedProjectAnnotations<TRenderer>; | ||
declare function composeStory<TRenderer extends Renderer = Renderer, TArgs extends Args = Args>(storyAnnotations: LegacyStoryAnnotationsOrFn<TRenderer>, componentAnnotations: ComponentAnnotations<TRenderer, TArgs>, projectAnnotations?: ProjectAnnotations<TRenderer>, defaultConfig?: ProjectAnnotations<TRenderer>, exportsName?: string): ComposedStoryFn<TRenderer, Partial<TArgs>>; | ||
declare function composeStories<TModule extends Store_CSFExports>(storiesImport: TModule, globalConfig: ProjectAnnotations<Renderer>, composeStoryFn: ComposeStoryFn): {}; | ||
declare function composeStories<TModule extends Store_CSFExports>(storiesImport: TModule, globalConfig: ProjectAnnotations<Renderer>, composeStoryFn?: ComposeStoryFn): {}; | ||
type WrappedStoryRef = { | ||
@@ -1020,2 +1025,2 @@ __pw_type: 'jsx' | 'importRef'; | ||
export { DocsContext, HooksContext, Preview, PreviewWeb, PreviewWithSelection, type PropDescriptor, type SelectionStore, StoryStore, UrlStore, type View, WebView, addons, applyHooks, combineArgs, combineParameters, composeConfigs, composeStepRunners, composeStories, composeStory, createPlaywrightTest, decorateStory, defaultDecorateStory, filterArgTypes, inferControls, makeDecorator, mockChannel, normalizeStory, prepareMeta, prepareStory, sanitizeStoryContextUpdate, setProjectAnnotations, simulateDOMContentLoaded, simulatePageLoad, sortStoriesV7, useArgs, useCallback, useChannel, useEffect, useGlobals, useMemo, useParameter, useReducer, useRef, useState, useStoryContext, userOrAutoTitle, userOrAutoTitleFromSpecifier }; | ||
export { DocsContext, HooksContext, Preview, PreviewWeb, PreviewWithSelection, type PropDescriptor, type SelectionStore, StoryStore, UrlStore, type View, WebView, addons, applyHooks, combineArgs, combineParameters, composeConfigs, composeStepRunners, composeStories, composeStory, createPlaywrightTest, decorateStory, defaultDecorateStory, filterArgTypes, inferControls, makeDecorator, mockChannel, normalizeStory, prepareMeta, prepareStory, sanitizeStoryContextUpdate, setDefaultProjectAnnotations, setProjectAnnotations, simulateDOMContentLoaded, simulatePageLoad, sortStoriesV7, useArgs, useCallback, useChannel, useEffect, useGlobals, useMemo, useParameter, useReducer, useRef, useState, useStoryContext, userOrAutoTitle, userOrAutoTitleFromSpecifier }; |
@@ -152,5 +152,2 @@ declare abstract class StorybookError extends Error { | ||
} | ||
declare class TestingLibraryMustBeConfiguredError extends StorybookError { | ||
constructor(); | ||
} | ||
declare class NoRenderFunctionError extends StorybookError { | ||
@@ -189,2 +186,2 @@ data: { | ||
export { CalledExtractOnStoreError, CalledPreviewMethodBeforeInitializationError, Category, EmptyIndexError, ImplicitActionsDuringRendering, MdxFileWithNoCsfReferencesError, MissingRenderToCanvasError, MissingStoryAfterHmrError, MissingStoryFromCsfFileError, MountMustBeDestructuredError, NextJsSharpError, NextjsRouterMocksNotAvailable, NoRenderFunctionError, NoStoryMatchError, NoStoryMountedError, StoryIndexFetchError, StoryStoreAccessedBeforeInitializationError, TestingLibraryMustBeConfiguredError, UnknownArgTypesError }; | ||
export { CalledExtractOnStoreError, CalledPreviewMethodBeforeInitializationError, Category, EmptyIndexError, ImplicitActionsDuringRendering, MdxFileWithNoCsfReferencesError, MissingRenderToCanvasError, MissingStoryAfterHmrError, MissingStoryFromCsfFileError, MountMustBeDestructuredError, NextJsSharpError, NextjsRouterMocksNotAvailable, NoRenderFunctionError, NoStoryMatchError, NoStoryMountedError, StoryIndexFetchError, StoryStoreAccessedBeforeInitializationError, UnknownArgTypesError }; |
@@ -1,22 +0,22 @@ | ||
var oe = Object.defineProperty; | ||
var t = (u, n) => oe(u, "name", { value: n, configurable: !0 }); | ||
var ee = Object.defineProperty; | ||
var t = (u, r) => ee(u, "name", { value: r, configurable: !0 }); | ||
// ../node_modules/ts-dedent/esm/index.js | ||
function r(u) { | ||
for (var n = [], e = 1; e < arguments.length; e++) | ||
n[e - 1] = arguments[e]; | ||
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 p = a.reduce(function(i, h) { | ||
var y = h.match(/\n([\t ]+|(?!\s).)/g); | ||
return y ? i.concat(y.map(function(E) { | ||
var d, l; | ||
return (l = (d = E.match(/[\t ]/g)) === null || d === void 0 ? void 0 : d.length) !== null && l !== void 0 ? l : 0; | ||
var p = a.reduce(function(i, E) { | ||
var y = E.match(/\n([\t ]+|(?!\s).)/g); | ||
return y ? i.concat(y.map(function(m) { | ||
var l, d; | ||
return (d = (l = m.match(/[\t ]/g)) === null || l === void 0 ? void 0 : l.length) !== null && d !== void 0 ? d : 0; | ||
})) : i; | ||
}, []); | ||
if (p.length) { | ||
var m = new RegExp(` | ||
var h = new RegExp(` | ||
[ ]{` + Math.min.apply(Math, p) + "}", "g"); | ||
a = a.map(function(i) { | ||
return i.replace(m, ` | ||
return i.replace(h, ` | ||
`); | ||
@@ -27,13 +27,13 @@ }); | ||
var c = a[0]; | ||
return n.forEach(function(i, h) { | ||
var y = c.match(/(?:^|\n)( *)$/), E = y ? y[1] : "", d = i; | ||
return r.forEach(function(i, E) { | ||
var y = c.match(/(?:^|\n)( *)$/), m = y ? y[1] : "", l = i; | ||
typeof i == "string" && i.includes(` | ||
`) && (d = String(i).split(` | ||
`).map(function(l, te) { | ||
return te === 0 ? l : "" + E + l; | ||
`) && (l = String(i).split(` | ||
`).map(function(d, Z) { | ||
return Z === 0 ? d : "" + m + d; | ||
}).join(` | ||
`)), c += d + a[h + 1]; | ||
`)), c += l + a[E + 1]; | ||
}), c; | ||
} | ||
t(r, "dedent"); | ||
t(n, "dedent"); | ||
@@ -43,6 +43,6 @@ // src/storybook-error.ts | ||
code: u, | ||
category: n | ||
category: r | ||
}) { | ||
let e = String(u).padStart(4, "0"); | ||
return `SB_${n}_${e}`; | ||
return `SB_${r}_${e}`; | ||
} | ||
@@ -80,3 +80,3 @@ t(O, "parseErrorCode"); | ||
category: p, | ||
message: m | ||
message: h | ||
}) { | ||
@@ -87,3 +87,3 @@ let c; | ||
${e.map((i) => ` - ${i}`).join(` | ||
`)}`), `${m}${c != null ? ` | ||
`)}`), `${h}${c != null ? ` | ||
@@ -98,3 +98,3 @@ More info: ${c} | ||
// src/preview-errors.ts | ||
var se = /* @__PURE__ */ ((s) => (s.BLOCKS = "BLOCKS", s.DOCS_TOOLS = "DOCS-TOOLS", s.PREVIEW_CLIENT_LOGGER = "PREVIEW_CLIENT-LOGGER", s.PREVIEW_CHANNELS = | ||
var te = /* @__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\ | ||
@@ -104,3 +104,3 @@ _API", s.PREVIEW_REACT_DOM_SHIM = "PREVIEW_REACT-DOM-SHIM", s.PREVIEW_ROUTER = "PREVIEW_ROUTER", s.PREVIEW_THEMING = "PREVIEW_THEMING", s.RENDERER_HTML = | ||
"RENDERER_SVELTE", s.RENDERER_VUE = "RENDERER_VUE", s.RENDERER_VUE3 = "RENDERER_VUE3", s.RENDERER_WEB_COMPONENTS = "RENDERER_WEB-COMPONENTS", | ||
s.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", s))(se || {}), f = class f extends o { | ||
s.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", s))(te || {}), f = class f extends o { | ||
constructor(e) { | ||
@@ -110,3 +110,3 @@ super({ | ||
code: 1, | ||
message: r` | ||
message: n` | ||
Couldn't find story matching id '${e.storyId}' after HMR. | ||
@@ -123,3 +123,3 @@ - Did you just rename a story? | ||
t(f, "MissingStoryAfterHmrError"); | ||
var D = f, R = class R extends o { | ||
var C = f, R = class R extends o { | ||
constructor(e) { | ||
@@ -131,3 +131,3 @@ super({ | ||
for-example-in-the-play-function", | ||
message: r` | ||
message: n` | ||
We detected that you use an implicit action arg while ${e.phase} of your story. | ||
@@ -148,3 +148,3 @@ ${e.deprecated ? ` | ||
t(R, "ImplicitActionsDuringRendering"); | ||
var j = R, b = class b extends o { | ||
var D = R, b = class b extends o { | ||
constructor() { | ||
@@ -154,3 +154,3 @@ super({ | ||
code: 3, | ||
message: r` | ||
message: n` | ||
Cannot call \`storyStore.extract()\` without calling \`storyStore.cacheAllCsfFiles()\` first. | ||
@@ -163,3 +163,3 @@ | ||
t(b, "CalledExtractOnStoreError"); | ||
var L = b, I = class I extends o { | ||
var j = b, I = class I extends o { | ||
constructor() { | ||
@@ -169,3 +169,3 @@ super({ | ||
code: 4, | ||
message: r` | ||
message: n` | ||
Expected your framework's preset to export a \`renderToCanvas\` field. | ||
@@ -179,3 +179,3 @@ | ||
t(I, "MissingRenderToCanvasError"); | ||
var F = I, P = class P extends o { | ||
var L = I, P = class P extends o { | ||
constructor(e) { | ||
@@ -185,3 +185,3 @@ super({ | ||
code: 5, | ||
message: r` | ||
message: n` | ||
Called \`Preview.${e.methodName}()\` before initialization. | ||
@@ -204,3 +204,3 @@ | ||
code: 6, | ||
message: r` | ||
message: n` | ||
Error fetching \`/index.json\`: | ||
@@ -220,3 +220,3 @@ | ||
t(x, "StoryIndexFetchError"); | ||
var Y = x, S = class S extends o { | ||
var M = x, w = class w extends o { | ||
constructor(e) { | ||
@@ -226,3 +226,3 @@ super({ | ||
code: 7, | ||
message: r` | ||
message: n` | ||
Tried to render docs entry ${e.storyId} but it is a MDX file that has no CSF | ||
@@ -237,4 +237,4 @@ references, or autodocs for a CSF file that some doesn't refer to itself. | ||
}; | ||
t(S, "MdxFileWithNoCsfReferencesError"); | ||
var H = S, w = class w extends o { | ||
t(w, "MdxFileWithNoCsfReferencesError"); | ||
var Y = w, T = class T extends o { | ||
constructor() { | ||
@@ -244,3 +244,3 @@ super({ | ||
code: 8, | ||
message: r` | ||
message: n` | ||
Couldn't find any stories in your Storybook. | ||
@@ -253,4 +253,4 @@ | ||
}; | ||
t(w, "EmptyIndexError"); | ||
var K = w, k = class k extends o { | ||
t(T, "EmptyIndexError"); | ||
var H = T, k = class k extends o { | ||
constructor(e) { | ||
@@ -260,3 +260,3 @@ super({ | ||
code: 9, | ||
message: r` | ||
message: n` | ||
Couldn't find story matching '${e.storySpecifier}'. | ||
@@ -272,3 +272,3 @@ | ||
t(k, "NoStoryMatchError"); | ||
var M = k, T = class T extends o { | ||
var F = k, S = class S extends o { | ||
constructor(e) { | ||
@@ -278,3 +278,3 @@ super({ | ||
code: 10, | ||
message: r` | ||
message: n` | ||
Couldn't find story matching id '${e.storyId}' after importing a CSF file. | ||
@@ -292,4 +292,4 @@ | ||
}; | ||
t(T, "MissingStoryFromCsfFileError"); | ||
var U = T, V = class V extends o { | ||
t(S, "MissingStoryFromCsfFileError"); | ||
var K = S, V = class V extends o { | ||
constructor() { | ||
@@ -299,3 +299,3 @@ super({ | ||
code: 11, | ||
message: r` | ||
message: n` | ||
Cannot access the Story Store until the index is ready. | ||
@@ -309,3 +309,3 @@ | ||
t(V, "StoryStoreAccessedBeforeInitializationError"); | ||
var X = V, _ = class _ extends o { | ||
var U = V, _ = class _ extends o { | ||
constructor(e) { | ||
@@ -315,3 +315,3 @@ super({ | ||
code: 12, | ||
message: r` | ||
message: n` | ||
Incorrect use of mount in the play function. | ||
@@ -339,39 +339,3 @@ | ||
t(_, "MountMustBeDestructuredError"); | ||
var J = _, v = class v extends o { | ||
constructor() { | ||
super({ | ||
category: "PREVIEW_API", | ||
code: 13, | ||
message: r` | ||
You must configure testingLibraryRender to use play in portable stories. | ||
import { render } from '@testing-library/[renderer]'; | ||
setProjectAnnotations({ | ||
testingLibraryRender: render, | ||
}); | ||
For other testing renderers, you can configure \`renderToCanvas\` like so: | ||
import { render } from 'your-test-renderer'; | ||
setProjectAnnotations({ | ||
renderToCanvas: ({ storyFn }) => { | ||
const Story = storyFn(); | ||
// Svelte | ||
render(Story.Component, Story.props); | ||
// Vue | ||
render(Story); | ||
// or for React | ||
render(<Story/>); | ||
}, | ||
});` | ||
}); | ||
} | ||
}; | ||
t(v, "TestingLibraryMustBeConfiguredError"); | ||
var q = v, W = class W extends o { | ||
var X = _, v = class v extends o { | ||
constructor(e) { | ||
@@ -381,3 +345,3 @@ super({ | ||
code: 14, | ||
message: r` | ||
message: n` | ||
No render function available for storyId '${e.id}' | ||
@@ -389,4 +353,4 @@ ` | ||
}; | ||
t(W, "NoRenderFunctionError"); | ||
var z = W, A = class A extends o { | ||
t(v, "NoRenderFunctionError"); | ||
var J = v, N = class N extends o { | ||
constructor() { | ||
@@ -396,3 +360,3 @@ super({ | ||
code: 15, | ||
message: r` | ||
message: n` | ||
No component is mounted in your story. | ||
@@ -416,4 +380,4 @@ | ||
}; | ||
t(A, "NoStoryMountedError"); | ||
var Q = A, N = class N extends o { | ||
t(N, "NoStoryMountedError"); | ||
var q = N, W = class W extends o { | ||
constructor() { | ||
@@ -424,3 +388,3 @@ super({ | ||
documentation: "https://storybook.js.org/docs/get-started/nextjs#faq", | ||
message: r` | ||
message: n` | ||
You are importing avif images, but you don't have sharp installed. | ||
@@ -433,4 +397,4 @@ | ||
}; | ||
t(N, "NextJsSharpError"); | ||
var Z = N, $ = class $ extends o { | ||
t(W, "NextJsSharpError"); | ||
var z = W, A = class A extends o { | ||
constructor(e) { | ||
@@ -440,3 +404,3 @@ super({ | ||
code: 2, | ||
message: r` | ||
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. | ||
@@ -448,4 +412,4 @@ ` | ||
}; | ||
t($, "NextjsRouterMocksNotAvailable"); | ||
var B = $, C = class C extends o { | ||
t(A, "NextjsRouterMocksNotAvailable"); | ||
var B = A, $ = class $ extends o { | ||
constructor(e) { | ||
@@ -456,3 +420,3 @@ super({ | ||
documentation: "https://github.com/storybookjs/storybook/issues/26606", | ||
message: r` | ||
message: n` | ||
There was a failure when generating detailed ArgTypes in ${e.language} for: | ||
@@ -470,24 +434,23 @@ ${JSON.stringify(e.type, null, 2)} | ||
}; | ||
t(C, "UnknownArgTypesError"); | ||
var ee = C; | ||
t($, "UnknownArgTypesError"); | ||
var Q = $; | ||
export { | ||
L as CalledExtractOnStoreError, | ||
j as CalledExtractOnStoreError, | ||
G as CalledPreviewMethodBeforeInitializationError, | ||
se as Category, | ||
K as EmptyIndexError, | ||
j as ImplicitActionsDuringRendering, | ||
H as MdxFileWithNoCsfReferencesError, | ||
F as MissingRenderToCanvasError, | ||
D as MissingStoryAfterHmrError, | ||
U as MissingStoryFromCsfFileError, | ||
J as MountMustBeDestructuredError, | ||
Z as NextJsSharpError, | ||
te as Category, | ||
H as EmptyIndexError, | ||
D as ImplicitActionsDuringRendering, | ||
Y as MdxFileWithNoCsfReferencesError, | ||
L as MissingRenderToCanvasError, | ||
C as MissingStoryAfterHmrError, | ||
K as MissingStoryFromCsfFileError, | ||
X as MountMustBeDestructuredError, | ||
z as NextJsSharpError, | ||
B as NextjsRouterMocksNotAvailable, | ||
z as NoRenderFunctionError, | ||
M as NoStoryMatchError, | ||
Q as NoStoryMountedError, | ||
Y as StoryIndexFetchError, | ||
X as StoryStoreAccessedBeforeInitializationError, | ||
q as TestingLibraryMustBeConfiguredError, | ||
ee as UnknownArgTypesError | ||
J as NoRenderFunctionError, | ||
F as NoStoryMatchError, | ||
q as NoStoryMountedError, | ||
M as StoryIndexFetchError, | ||
U as StoryStoreAccessedBeforeInitializationError, | ||
Q as UnknownArgTypesError | ||
}; |
@@ -211,5 +211,7 @@ declare abstract class StorybookError extends Error { | ||
location: string; | ||
source?: 'storybook' | 'vitest'; | ||
}; | ||
constructor(data: { | ||
location: string; | ||
source?: 'storybook' | 'vitest'; | ||
}); | ||
@@ -216,0 +218,0 @@ } |
@@ -47,6 +47,6 @@ import ESM_COMPAT_Module from "node:module"; | ||
if (s.length) { | ||
var l = new RegExp(` | ||
var c = new RegExp(` | ||
[ ]{` + Math.min.apply(Math, s) + "}", "g"); | ||
r = r.map(function(g) { | ||
return g.replace(l, ` | ||
return g.replace(c, ` | ||
`); | ||
@@ -56,5 +56,5 @@ }); | ||
r[0] = r[0].replace(/^\r?\n/, ""); | ||
var c = r[0]; | ||
var l = r[0]; | ||
return o.forEach(function(g, _) { | ||
var O = c.match(/(?:^|\n)( *)$/), M = O ? O[1] : "", y = g; | ||
var O = l.match(/(?:^|\n)( *)$/), M = O ? O[1] : "", y = g; | ||
typeof g == "string" && g.includes(` | ||
@@ -65,4 +65,4 @@ `) && (y = String(g).split(` | ||
}).join(` | ||
`)), c += y + r[_ + 1]; | ||
}), c; | ||
`)), l += y + r[_ + 1]; | ||
}), l; | ||
} | ||
@@ -167,3 +167,3 @@ n(U, "dedent"); | ||
let [r] = e; | ||
r.length === 3 && (r = [...r].map((l) => l + l).join("")); | ||
r.length === 3 && (r = [...r].map((c) => c + c).join("")); | ||
let s = Number.parseInt(r, 16); | ||
@@ -198,7 +198,7 @@ return [ | ||
} | ||
let l = Math.max(e, r, s) * 2; | ||
if (l === 0) | ||
let c = Math.max(e, r, s) * 2; | ||
if (c === 0) | ||
return 30; | ||
let c = 30 + (Math.round(s) << 2 | Math.round(r) << 1 | Math.round(e)); | ||
return l === 2 && (c += 60), c; | ||
let l = 30 + (Math.round(s) << 2 | Math.round(r) << 1 | Math.round(e)); | ||
return c === 2 && (l += 60), l; | ||
}, | ||
@@ -263,12 +263,12 @@ enumerable: !1 | ||
return 0; | ||
let l = s || 0; | ||
let c = s || 0; | ||
if (p.TERM === "dumb") | ||
return l; | ||
return c; | ||
if (S.platform === "win32") { | ||
let c = Le.release().split("."); | ||
return Number(c[0]) >= 10 && Number(c[2]) >= 10586 ? Number(c[2]) >= 14931 ? 3 : 2 : 1; | ||
let l = Le.release().split("."); | ||
return Number(l[0]) >= 10 && Number(l[2]) >= 10586 ? Number(l[2]) >= 14931 ? 3 : 2 : 1; | ||
} | ||
if ("CI" in p) | ||
return "GITHUB_ACTIONS" in p || "GITEA_ACTIONS" in p ? 3 : ["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((c) => c in | ||
p) || p.CI_NAME === "codeship" ? 1 : l; | ||
return "GITHUB_ACTIONS" in p || "GITEA_ACTIONS" in p ? 3 : ["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((l) => l in | ||
p) || p.CI_NAME === "codeship" ? 1 : c; | ||
if ("TEAMCITY_VERSION" in p) | ||
@@ -279,6 +279,6 @@ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(p.TEAMCITY_VERSION) ? 1 : 0; | ||
if ("TERM_PROGRAM" in p) { | ||
let c = Number.parseInt((p.TERM_PROGRAM_VERSION || "").split(".")[0], 10); | ||
let l = Number.parseInt((p.TERM_PROGRAM_VERSION || "").split(".")[0], 10); | ||
switch (p.TERM_PROGRAM) { | ||
case "iTerm.app": | ||
return c >= 3 ? 3 : 2; | ||
return l >= 3 ? 3 : 2; | ||
case "Apple_Terminal": | ||
@@ -289,3 +289,3 @@ return 2; | ||
return /-256(color)?$/i.test(p.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(p.TERM) || "COLORTERM" in p ? | ||
1 : l; | ||
1 : c; | ||
} | ||
@@ -311,14 +311,14 @@ n(Fe, "_supportsColor"); | ||
return t; | ||
let s = o.length, l = 0, c = ""; | ||
let s = o.length, c = 0, l = ""; | ||
do | ||
c += t.slice(l, r) + o + e, l = r + s, r = t.indexOf(o, l); | ||
l += t.slice(c, r) + o + e, c = r + s, r = t.indexOf(o, c); | ||
while (r !== -1); | ||
return c += t.slice(l), c; | ||
return l += t.slice(c), l; | ||
} | ||
n(j, "stringReplaceAll"); | ||
function V(t, o, e, r) { | ||
let s = 0, l = ""; | ||
let s = 0, c = ""; | ||
do { | ||
let c = t[r - 1] === "\r"; | ||
l += t.slice(s, c ? r - 1 : r) + o + (c ? `\r | ||
let l = t[r - 1] === "\r"; | ||
c += t.slice(s, l ? r - 1 : r) + o + (l ? `\r | ||
` : ` | ||
@@ -328,3 +328,3 @@ `) + e, s = r + 1, r = t.indexOf(` | ||
} while (r !== -1); | ||
return l += t.slice(s), l; | ||
return c += t.slice(s), c; | ||
} | ||
@@ -425,5 +425,5 @@ n(V, "stringEncaseCRLFWithFirstIndex"); | ||
o = j(o, e.close, e.open), e = e.parent; | ||
let l = o.indexOf(` | ||
let c = o.indexOf(` | ||
`); | ||
return l !== -1 && (o = V(o, s, r, l)), r + o + s; | ||
return c !== -1 && (o = V(o, s, r, c)), r + o + s; | ||
}, "applyStyle"); | ||
@@ -479,11 +479,11 @@ Object.defineProperties(k.prototype, R); | ||
category: s, | ||
message: l | ||
message: c | ||
}) { | ||
let c; | ||
return e === !0 ? c = `https://storybook.js.org/error/${H({ code: r, category: s })}` : typeof e == "string" ? c = e : Array.isArray(e) && | ||
(c = ` | ||
let l; | ||
return e === !0 ? l = `https://storybook.js.org/error/${H({ code: r, category: s })}` : typeof e == "string" ? l = e : Array.isArray(e) && | ||
(l = ` | ||
${e.map((g) => ` - ${g}`).join(` | ||
`)}`), `${l}${c != null ? ` | ||
`)}`), `${c}${l != null ? ` | ||
More info: ${c} | ||
More info: ${l} | ||
` : ""}`; | ||
@@ -823,6 +823,17 @@ } | ||
constructor(e) { | ||
let r = { | ||
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: s, helperMessage: c } = r[e.source || "storybook"]; | ||
super({ | ||
category: "CORE-SERVER", | ||
code: 6, | ||
documentation: "https://storybook.js.org/docs/configure", | ||
documentation: s, | ||
message: u.dedent` | ||
@@ -832,3 +843,3 @@ No configuration files have been found in your configDir: ${m.yellow(e.location)}. | ||
You can pass a --config-dir flag to tell Storybook, where your main.js file is located at).` | ||
${c}` | ||
}); | ||
@@ -835,0 +846,0 @@ this.data = e; |
{ | ||
"name": "@storybook/core", | ||
"version": "8.3.0-alpha.5", | ||
"version": "8.3.0-alpha.6", | ||
"description": "Storybook framework-agnostic API", | ||
@@ -305,3 +305,3 @@ "keywords": [ | ||
"@storybook/global": "^5.0.0", | ||
"@storybook/icons": "^1.2.5", | ||
"@storybook/icons": "^1.2.10", | ||
"@tanstack/react-virtual": "^3.3.0", | ||
@@ -401,2 +401,3 @@ "@testing-library/react": "^14.0.0", | ||
"slash": "^5.0.0", | ||
"source-map": "^0.7.4", | ||
"store2": "^2.14.2", | ||
@@ -403,0 +404,0 @@ "strip-json-comments": "^5.0.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
40259936
740646
130