storybook 9.1.0-alpha.6 → 9.1.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/browser/favicon-wrapper.svg +46 -0
- package/assets/browser/favicon.svg +1 -1
- package/dist/bin/index.cjs +43 -43
- package/dist/bin/index.js +43 -43
- package/dist/cli/bin/index.cjs +513 -513
- package/dist/cli/bin/index.js +535 -535
- package/dist/cli/index.cjs +2454 -2453
- package/dist/cli/index.d.ts +10 -3
- package/dist/cli/index.js +2436 -2435
- package/dist/common/index.cjs +64 -61
- package/dist/common/index.d.ts +9 -3
- package/dist/common/index.js +64 -61
- package/dist/components/index.cjs +4602 -4427
- package/dist/components/index.d.ts +9 -11
- package/dist/components/index.js +2760 -2580
- package/dist/core-server/index.cjs +5833 -5819
- package/dist/core-server/index.d.ts +4 -1
- package/dist/core-server/index.js +4848 -4835
- package/dist/core-server/presets/common-manager.js +3410 -3332
- package/dist/core-server/presets/common-preset.cjs +1831 -1837
- package/dist/core-server/presets/common-preset.js +1787 -1792
- package/dist/csf/index.cjs +2536 -736
- package/dist/csf/index.d.ts +250 -9
- package/dist/csf/index.js +2558 -749
- package/dist/csf-tools/index.cjs +319 -321
- package/dist/csf-tools/index.js +239 -241
- package/dist/instrumenter/index.cjs +1150 -1099
- package/dist/instrumenter/index.d.ts +1 -0
- package/dist/instrumenter/index.js +1261 -1214
- package/dist/manager/globals-module-info.cjs +0 -1
- package/dist/manager/globals-module-info.js +0 -1
- package/dist/manager/globals-runtime.js +21740 -24218
- package/dist/manager/runtime.js +3715 -3536
- package/dist/manager-api/index.cjs +3 -3
- package/dist/manager-api/index.d.ts +4 -1
- package/dist/manager-api/index.js +3 -3
- package/dist/node-logger/index.cjs +1620 -1620
- package/dist/node-logger/index.js +1619 -1619
- package/dist/preview/runtime.js +13337 -16032
- package/dist/preview-api/index.cjs +273 -271
- package/dist/preview-api/index.d.ts +4 -1
- package/dist/preview-api/index.js +14 -12
- package/dist/telemetry/index.cjs +500 -500
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +478 -478
- package/dist/test/index.cjs +9136 -9815
- package/dist/test/index.js +8339 -9025
- package/dist/types/index.d.ts +12 -12
- package/package.json +5 -196
- package/dist/actions/preview.cjs +0 -159
- package/dist/actions/preview.d.ts +0 -45
- package/dist/actions/preview.js +0 -149
- package/dist/backgrounds/index.cjs +0 -16
- package/dist/backgrounds/index.d.ts +0 -2
- package/dist/backgrounds/index.js +0 -0
- package/dist/backgrounds/preview.cjs +0 -143
- package/dist/backgrounds/preview.d.ts +0 -53
- package/dist/backgrounds/preview.js +0 -127
- package/dist/component-testing/index.cjs +0 -23
- package/dist/component-testing/index.d.ts +0 -3
- package/dist/component-testing/index.js +0 -5
- package/dist/component-testing/preview.cjs +0 -40
- package/dist/component-testing/preview.d.ts +0 -5
- package/dist/component-testing/preview.js +0 -25
- package/dist/controls/preview.cjs +0 -26
- package/dist/controls/preview.d.ts +0 -43
- package/dist/controls/preview.js +0 -9
- package/dist/highlight/preview.cjs +0 -590
- package/dist/highlight/preview.d.ts +0 -20
- package/dist/highlight/preview.js +0 -575
- package/dist/measure/index.cjs +0 -16
- package/dist/measure/index.d.ts +0 -2
- package/dist/measure/index.js +0 -0
- package/dist/measure/preview.cjs +0 -466
- package/dist/measure/preview.d.ts +0 -25
- package/dist/measure/preview.js +0 -450
- package/dist/outline/index.cjs +0 -16
- package/dist/outline/index.d.ts +0 -2
- package/dist/outline/index.js +0 -0
- package/dist/outline/preview.cjs +0 -518
- package/dist/outline/preview.d.ts +0 -25
- package/dist/outline/preview.js +0 -486
- package/dist/test/preview.cjs +0 -73
- package/dist/test/preview.d.ts +0 -17
- package/dist/test/preview.js +0 -66
- package/dist/viewport/preview.cjs +0 -35
- package/dist/viewport/preview.d.ts +0 -62
- package/dist/viewport/preview.js +0 -19
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StoryId as StoryId$1, StoryName, ComponentTitle, Tag as Tag$1, Parameters, Args, ArgTypes, ComponentId, StoryKind, Globals as Globals$1, GlobalTypes as GlobalTypes$1, InputType, StoryContext, PartialStoryFn, LegacyStoryFn, ArgsStoryFn, StoryFn, DecoratorFunction, LoaderFunction as LoaderFunction$1,
|
|
2
|
-
export { AfterEach, AnnotatedStoryFn, ArgTypes, ArgTypesEnhancer, Args, ArgsEnhancer, ArgsFromMeta, ArgsStoryFn, BaseAnnotations, ProjectAnnotations as BaseProjectAnnotations, BeforeAll, BeforeEach, Canvas, CleanupCallback, ComponentAnnotations, ComponentId, ComponentTitle, Conditional, DecoratorApplicator, DecoratorFunction, GlobalTypes, Globals, IncludeExcludeOptions, InputType, LegacyAnnotatedStoryFn, LegacyStoryAnnotationsOrFn, LegacyStoryFn, LoaderFunction, Parameters, PartialStoryFn, PlayFunction, PlayFunctionContext, SBArrayType, SBEnumType, SBIntersectionType, SBObjectType, SBOtherType, SBScalarType, SBType, SBUnionType, SeparatorOptions, StepFunction, StepLabel, StepRunner, StoryAnnotations, StoryAnnotationsOrFn, StoryContext, StoryContextForEnhancers, StoryContextForLoaders, StoryContextUpdate, StoryFn, StoryId, StoryIdentifier, StoryKind, StoryName, StrictArgTypes, StrictArgs, StrictGlobalTypes, StrictInputType, Tag } from 'storybook/internal/csf';
|
|
1
|
+
import { StoryId as StoryId$1, StoryName, ComponentTitle, Tag as Tag$1, Parameters, Args, ArgTypes, ComponentId, StoryKind, Globals as Globals$1, GlobalTypes as GlobalTypes$1, InputType, Renderer, StoryContext, PartialStoryFn, LegacyStoryFn, ArgsStoryFn, StoryFn, DecoratorFunction, LoaderFunction as LoaderFunction$1, ViewMode as ViewMode$1, StoryIdentifier, ProjectAnnotations as ProjectAnnotations$1, StrictArgTypes, StrictGlobalTypes, StepRunner, BeforeAll, ComponentAnnotations, StoryAnnotations, StoryContextForEnhancers, CleanupCallback, Canvas, StoryAnnotationsOrFn, AnnotatedStoryFn } from 'storybook/internal/csf';
|
|
2
|
+
export { AfterEach, AnnotatedStoryFn, ArgTypes, ArgTypesEnhancer, Args, ArgsEnhancer, ArgsFromMeta, ArgsStoryFn, BaseAnnotations, ProjectAnnotations as BaseProjectAnnotations, BeforeAll, BeforeEach, Canvas, CleanupCallback, ComponentAnnotations, ComponentId, ComponentTitle, Conditional, DecoratorApplicator, DecoratorFunction, GlobalTypes, Globals, IncludeExcludeOptions, InputType, LegacyAnnotatedStoryFn, LegacyStoryAnnotationsOrFn, LegacyStoryFn, LoaderFunction, Parameters, PartialStoryFn, PlayFunction, PlayFunctionContext, Renderer, SBArrayType, SBEnumType, SBIntersectionType, SBObjectType, SBOtherType, SBScalarType, SBType, SBUnionType, SeparatorOptions, StepFunction, StepLabel, StepRunner, StoryAnnotations, StoryAnnotationsOrFn, StoryContext, StoryContextForEnhancers, StoryContextForLoaders, StoryContextUpdate, StoryFn, StoryId, StoryIdentifier, StoryKind, StoryName, StrictArgTypes, StrictArgs, StrictGlobalTypes, StrictInputType, Tag } from 'storybook/internal/csf';
|
|
3
3
|
import { ReactElement, FC, ReactNode, PropsWithChildren } from 'react';
|
|
4
4
|
import { RouterData as RouterData$1 } from 'storybook/internal/router';
|
|
5
5
|
import { Globals, GlobalTypes, API_Layout as API_Layout$1, API_LayoutCustomisations as API_LayoutCustomisations$1, API_UI as API_UI$1, API_Notification as API_Notification$1, API_Refs as API_Refs$1, API_Settings as API_Settings$1, API_LoadedRefData as API_LoadedRefData$1, StoryId, API_PreparedStoryIndex as API_PreparedStoryIndex$1, API_ViewMode as API_ViewMode$1, API_FilterFunction as API_FilterFunction$1, API_Versions as API_Versions$2, API_UnknownEntries as API_UnknownEntries$1, API_OptionsData as API_OptionsData$1, NormalizedProjectAnnotations as NormalizedProjectAnnotations$1, ProjectAnnotations as ProjectAnnotations$2, ComposedStoryFn as ComposedStoryFn$1 } from 'storybook/internal/types';
|
|
@@ -3333,9 +3333,6 @@ declare enum Addon_TypesEnum {
|
|
|
3333
3333
|
experimental_TEST_PROVIDER = "test-provider"
|
|
3334
3334
|
}
|
|
3335
3335
|
|
|
3336
|
-
interface Renderer extends Renderer$1 {
|
|
3337
|
-
}
|
|
3338
|
-
|
|
3339
3336
|
type OrString<T extends string> = T | (string & {});
|
|
3340
3337
|
type ViewMode = OrString<ViewMode$1 | 'settings'> | undefined;
|
|
3341
3338
|
type Layout = 'centered' | 'fullscreen' | 'padded' | 'none';
|
|
@@ -3522,7 +3519,10 @@ declare global {
|
|
|
3522
3519
|
var defaultProjectAnnotations: ProjectAnnotations$2<any>;
|
|
3523
3520
|
}
|
|
3524
3521
|
type WrappedStoryRef = {
|
|
3525
|
-
__pw_type: 'jsx'
|
|
3522
|
+
__pw_type: 'jsx';
|
|
3523
|
+
props: Record<string, any>;
|
|
3524
|
+
} | {
|
|
3525
|
+
__pw_type: 'importRef';
|
|
3526
3526
|
};
|
|
3527
3527
|
type UnwrappedJSXStoryRef = {
|
|
3528
3528
|
__pw_type: 'jsx';
|
|
@@ -3544,20 +3544,20 @@ declare class ReporterAPI {
|
|
|
3544
3544
|
addReport(report: Report): Promise<void>;
|
|
3545
3545
|
}
|
|
3546
3546
|
|
|
3547
|
-
type Store_CSFExports<TRenderer extends Renderer
|
|
3547
|
+
type Store_CSFExports<TRenderer extends Renderer = Renderer, TArgs extends Args = Args> = {
|
|
3548
3548
|
default: ComponentAnnotations<TRenderer, TArgs>;
|
|
3549
3549
|
__esModule?: boolean;
|
|
3550
3550
|
__namedExportsOrder?: string[];
|
|
3551
3551
|
};
|
|
3552
3552
|
/** A story function with partial args, used internally by composeStory */
|
|
3553
|
-
type PartialArgsStoryFn<TRenderer extends Renderer
|
|
3553
|
+
type PartialArgsStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = (args?: TArgs) => (TRenderer & {
|
|
3554
3554
|
T: TArgs;
|
|
3555
3555
|
})['storyResult'];
|
|
3556
3556
|
/**
|
|
3557
3557
|
* A story that got recomposed for portable stories, containing all the necessary data to be
|
|
3558
3558
|
* rendered in external environments
|
|
3559
3559
|
*/
|
|
3560
|
-
type ComposedStoryFn<TRenderer extends Renderer
|
|
3560
|
+
type ComposedStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = PartialArgsStoryFn<TRenderer, TArgs> & {
|
|
3561
3561
|
args: TArgs;
|
|
3562
3562
|
id: StoryId$1;
|
|
3563
3563
|
play?: (context?: Partial<StoryContext<TRenderer, Partial<TArgs>>>) => Promise<void>;
|
|
@@ -3574,14 +3574,14 @@ type ComposedStoryFn<TRenderer extends Renderer$1 = Renderer$1, TArgs = Args> =
|
|
|
3574
3574
|
* Based on a module of stories, it returns all stories within it, filtering non-stories Each story
|
|
3575
3575
|
* will have partial props, as their props should be handled when composing stories
|
|
3576
3576
|
*/
|
|
3577
|
-
type StoriesWithPartialProps<TRenderer extends Renderer
|
|
3577
|
+
type StoriesWithPartialProps<TRenderer extends Renderer, TModule> = {
|
|
3578
3578
|
[K in keyof TModule as TModule[K] extends StoryAnnotationsOrFn<infer _, infer _TProps> ? K : never]: TModule[K] extends StoryAnnotationsOrFn<infer _, infer TProps> ? ComposedStoryFn<TRenderer, Partial<TProps>> : unknown;
|
|
3579
3579
|
};
|
|
3580
3580
|
/**
|
|
3581
3581
|
* Type used for integrators of portable stories, as reference when creating their own composeStory
|
|
3582
3582
|
* function
|
|
3583
3583
|
*/
|
|
3584
|
-
interface ComposeStoryFn<TRenderer extends Renderer
|
|
3584
|
+
interface ComposeStoryFn<TRenderer extends Renderer = Renderer, TArgs extends Args = Args> {
|
|
3585
3585
|
(storyAnnotations: AnnotatedStoryFn<TRenderer, TArgs> | StoryAnnotations<TRenderer, TArgs>, componentAnnotations: ComponentAnnotations<TRenderer, TArgs>, projectAnnotations: ProjectAnnotations$1<TRenderer>, exportsName?: string): ComposedStoryFn;
|
|
3586
3586
|
}
|
|
3587
3587
|
|
|
@@ -3589,4 +3589,4 @@ type SupportedFrameworks = 'angular' | 'ember' | 'html-vite' | 'nextjs' | 'nextj
|
|
|
3589
3589
|
|
|
3590
3590
|
type SupportedRenderers = 'react' | 'react-native' | 'vue3' | 'angular' | 'ember' | 'preact' | 'svelte' | 'qwik' | 'html' | 'web-components' | 'server' | 'solid' | 'nuxt';
|
|
3591
3591
|
|
|
3592
|
-
export { type API_ActiveTabsType, type API_BaseEntry, type API_ComponentEntry, type API_ComposedRef, type API_ComposedRefUpdate, type API_DocsEntry, type API_FilterFunction, type API_GroupEntry, type API_HashEntry, type API_IframeRenderer, type API_IndexHash, type API_Layout, type API_LayoutCustomisations, type API_LeafEntry, type API_LoadedRefData, type API_MatchOptions, type API_Notification, type API_OptionsData, type API_PanelPositions, type API_PreparedIndexEntry, type API_PreparedStoryIndex, type API_Provider, type API_ProviderData, type API_RefId, type API_RefUrl, type API_Refs, type API_ReleaseNotes, type API_RenderOptions, type API_RootEntry, type API_RouteOptions, type API_SetRefData, type API_Settings, type API_SidebarOptions, type API_StateMerger, type API_StoryEntry, type API_StoryMapper, type API_UI, type API_UIOptions, type API_UnknownEntries, type API_Version, type API_Versions$1 as API_Versions, type API_ViewMode, type Actor, type Addon_AddStoryArgs, type Addon_Annotations, type Addon_ArgType, type Addon_ArgsStoryFn, type Addon_BaseAnnotations, type Addon_BaseDecorators, type Addon_BaseMeta, type Addon_BaseStoryFn, type Addon_BaseStoryObject, type Addon_BaseType, type Addon_ClientApiAddon, type Addon_ClientApiAddons, type Addon_ClientApiReturnFn, type Addon_ClientStoryApi, type Addon_Collection, type Addon_Comparator, type Addon_Config, type Addon_DecoratorFunction, type Addon_Elements, type Addon_LegacyStoryFn, type Addon_LoadFn, type Addon_Loadable, type Addon_Loader, type Addon_LoaderFunction, type Addon_Loaders, type Addon_MakeDecoratorResult, type Addon_OptionsParameter, type Addon_OptionsParameterV7, type Addon_PageType, type Addon_PartialStoryFn, type Addon_RenderOptions, type Addon_RequireContext, type Addon_StoryApi, type Addon_StoryContext, type Addon_StoryContextUpdate, type Addon_StoryFn, type Addon_StorySortComparator, type Addon_StorySortComparatorV7, type Addon_StorySortMethod, type Addon_StorySortObjectParameter, type Addon_StorySortParameter, type Addon_StorySortParameterV7, type Addon_StoryWrapper, type Addon_TestProviderType, type Addon_ToolbarConfig, type Addon_Type, type Addon_Types, Addon_TypesEnum, type Addon_TypesMapping, type Addon_WrapperSettings, type Addon_WrapperType, type Addons_ArgTypes, type BaseIndexEntry, type BaseIndexInput, type BaseStory, type BoundStory, type Builder, type BuilderName, type BuilderOptions, type BuilderResult, type BuilderStats, type Builder_EnvsRaw, type Builder_Unpromise, type Builder_WithRequiredProperty, type CLIBaseOptions, type CLIOptions, type CSFFile, type CompatibleString, type ComposeStoryFn, type ComposedStoryFn, type CoreCommon_AddonEntry, type CoreCommon_AddonInfo, type CoreCommon_OptionsEntry, type CoreCommon_ResolvedAddonPreset, type CoreCommon_ResolvedAddonVirtual, type CoreCommon_StorybookInfo, type CoreConfig, type DocsContextProps, type DocsIndexEntry, type DocsIndexInput, type DocsOptions, type DocsPreparedPayload, type DocsRenderFunction, type Entry, type Event, type EventInfo, type GlobalsUpdatedPayload, type IndexEntry, type IndexEntryLegacy, type IndexInput, type IndexInputStats, type IndexedCSFFile, type IndexedStory, type Indexer, type IndexerOptions, type LoadOptions, type LoadedPreset, type Middleware, MockUniversalStore, type ModuleExport, type ModuleExports, type ModuleImportFn, type NamedOrDefaultProjectAnnotations, type NormalizedComponentAnnotations, type NormalizedProjectAnnotations, type NormalizedStoriesSpecifier, type NormalizedStoryAnnotations, type Options, type PackageJson, type PartialArgsStoryFn, type Path, type PreparedMeta, type PreparedStory, type Preset, type PresetConfig, type PresetProperty, type PresetPropertyFn, type PresetValue, type Presets, type PreviewAnnotation, type ProjectAnnotations, type Ref, type RenderContext, type RenderContextCallbacks, type RenderToCanvas, type
|
|
3592
|
+
export { type API_ActiveTabsType, type API_BaseEntry, type API_ComponentEntry, type API_ComposedRef, type API_ComposedRefUpdate, type API_DocsEntry, type API_FilterFunction, type API_GroupEntry, type API_HashEntry, type API_IframeRenderer, type API_IndexHash, type API_Layout, type API_LayoutCustomisations, type API_LeafEntry, type API_LoadedRefData, type API_MatchOptions, type API_Notification, type API_OptionsData, type API_PanelPositions, type API_PreparedIndexEntry, type API_PreparedStoryIndex, type API_Provider, type API_ProviderData, type API_RefId, type API_RefUrl, type API_Refs, type API_ReleaseNotes, type API_RenderOptions, type API_RootEntry, type API_RouteOptions, type API_SetRefData, type API_Settings, type API_SidebarOptions, type API_StateMerger, type API_StoryEntry, type API_StoryMapper, type API_UI, type API_UIOptions, type API_UnknownEntries, type API_Version, type API_Versions$1 as API_Versions, type API_ViewMode, type Actor, type Addon_AddStoryArgs, type Addon_Annotations, type Addon_ArgType, type Addon_ArgsStoryFn, type Addon_BaseAnnotations, type Addon_BaseDecorators, type Addon_BaseMeta, type Addon_BaseStoryFn, type Addon_BaseStoryObject, type Addon_BaseType, type Addon_ClientApiAddon, type Addon_ClientApiAddons, type Addon_ClientApiReturnFn, type Addon_ClientStoryApi, type Addon_Collection, type Addon_Comparator, type Addon_Config, type Addon_DecoratorFunction, type Addon_Elements, type Addon_LegacyStoryFn, type Addon_LoadFn, type Addon_Loadable, type Addon_Loader, type Addon_LoaderFunction, type Addon_Loaders, type Addon_MakeDecoratorResult, type Addon_OptionsParameter, type Addon_OptionsParameterV7, type Addon_PageType, type Addon_PartialStoryFn, type Addon_RenderOptions, type Addon_RequireContext, type Addon_StoryApi, type Addon_StoryContext, type Addon_StoryContextUpdate, type Addon_StoryFn, type Addon_StorySortComparator, type Addon_StorySortComparatorV7, type Addon_StorySortMethod, type Addon_StorySortObjectParameter, type Addon_StorySortParameter, type Addon_StorySortParameterV7, type Addon_StoryWrapper, type Addon_TestProviderType, type Addon_ToolbarConfig, type Addon_Type, type Addon_Types, Addon_TypesEnum, type Addon_TypesMapping, type Addon_WrapperSettings, type Addon_WrapperType, type Addons_ArgTypes, type BaseIndexEntry, type BaseIndexInput, type BaseStory, type BoundStory, type Builder, type BuilderName, type BuilderOptions, type BuilderResult, type BuilderStats, type Builder_EnvsRaw, type Builder_Unpromise, type Builder_WithRequiredProperty, type CLIBaseOptions, type CLIOptions, type CSFFile, type CompatibleString, type ComposeStoryFn, type ComposedStoryFn, type CoreCommon_AddonEntry, type CoreCommon_AddonInfo, type CoreCommon_OptionsEntry, type CoreCommon_ResolvedAddonPreset, type CoreCommon_ResolvedAddonVirtual, type CoreCommon_StorybookInfo, type CoreConfig, type DocsContextProps, type DocsIndexEntry, type DocsIndexInput, type DocsOptions, type DocsPreparedPayload, type DocsRenderFunction, type Entry, type Event, type EventInfo, type GlobalsUpdatedPayload, type IndexEntry, type IndexEntryLegacy, type IndexInput, type IndexInputStats, type IndexedCSFFile, type IndexedStory, type Indexer, type IndexerOptions, type LoadOptions, type LoadedPreset, type Middleware, MockUniversalStore, type ModuleExport, type ModuleExports, type ModuleImportFn, type NamedOrDefaultProjectAnnotations, type NormalizedComponentAnnotations, type NormalizedProjectAnnotations, type NormalizedStoriesSpecifier, type NormalizedStoryAnnotations, type Options, type PackageJson, type PartialArgsStoryFn, type Path, type PreparedMeta, type PreparedStory, type Preset, type PresetConfig, type PresetProperty, type PresetPropertyFn, type PresetValue, type Presets, type PreviewAnnotation, type ProjectAnnotations, type Ref, type RenderContext, type RenderContextCallbacks, type RenderToCanvas, type RendererName, type ResolvedModuleExport, type ResolvedModuleExportFromType, type ResolvedModuleExportType, type SetGlobalsPayload, type SetStoriesPayload, type SetStoriesStory, type SetStoriesStoryData, type Stats, type Status, type StatusByTypeId, type StatusStore, type StatusStoreByTypeId, type StatusTypeId, type StatusValue, type StatusesByStoryIdAndTypeId, type StoreOptions, type Store_CSFExports, type StoriesEntry, type StoriesSpecifier, type StoriesWithPartialProps, type StoryIndex, type StoryIndexEntry, type StoryIndexInput, type StoryIndexV2, type StoryIndexV3, type StoryPreparedPayload, type StoryRenderOptions, type StorybookConfig, type StorybookConfigOptions, type StorybookConfigRaw, type StorybookInternalParameters, type StorybookParameters, type StorybookTypes, type SupportedFrameworks, type SupportedRenderers, type TagOptions, type TagsOptions, type TeardownRenderToCanvas, type TestBuildConfig, type TestBuildFlags, type TestProviderId, type TestProviderState, type TestProviderStateByProviderId, type TestProviderStoreById, type TypescriptOptions, UniversalStore, type UseStatusStore, type UseTestProviderStore, type V3CompatIndexEntry, type VersionCheck, type ViewMode, type WebRenderer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storybook",
|
|
3
|
-
"version": "9.1.0-alpha.
|
|
3
|
+
"version": "9.1.0-alpha.8",
|
|
4
4
|
"description": "Storybook framework-agnostic API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -83,66 +83,6 @@
|
|
|
83
83
|
"import": "./dist/core-server/presets/common-override-preset.js",
|
|
84
84
|
"require": "./dist/core-server/presets/common-override-preset.cjs"
|
|
85
85
|
},
|
|
86
|
-
"./internal/backgrounds": {
|
|
87
|
-
"types": "./dist/backgrounds/index.d.ts",
|
|
88
|
-
"import": "./dist/backgrounds/index.js",
|
|
89
|
-
"require": "./dist/backgrounds/index.cjs"
|
|
90
|
-
},
|
|
91
|
-
"./backgrounds": {
|
|
92
|
-
"types": "./dist/backgrounds/index.d.ts",
|
|
93
|
-
"import": "./dist/backgrounds/index.js",
|
|
94
|
-
"require": "./dist/backgrounds/index.cjs"
|
|
95
|
-
},
|
|
96
|
-
"./internal/backgrounds/preview": {
|
|
97
|
-
"types": "./dist/backgrounds/preview.d.ts",
|
|
98
|
-
"import": "./dist/backgrounds/preview.js",
|
|
99
|
-
"require": "./dist/backgrounds/preview.cjs"
|
|
100
|
-
},
|
|
101
|
-
"./backgrounds/preview": {
|
|
102
|
-
"types": "./dist/backgrounds/preview.d.ts",
|
|
103
|
-
"import": "./dist/backgrounds/preview.js",
|
|
104
|
-
"require": "./dist/backgrounds/preview.cjs"
|
|
105
|
-
},
|
|
106
|
-
"./internal/measure": {
|
|
107
|
-
"types": "./dist/measure/index.d.ts",
|
|
108
|
-
"import": "./dist/measure/index.js",
|
|
109
|
-
"require": "./dist/measure/index.cjs"
|
|
110
|
-
},
|
|
111
|
-
"./measure": {
|
|
112
|
-
"types": "./dist/measure/index.d.ts",
|
|
113
|
-
"import": "./dist/measure/index.js",
|
|
114
|
-
"require": "./dist/measure/index.cjs"
|
|
115
|
-
},
|
|
116
|
-
"./internal/measure/preview": {
|
|
117
|
-
"types": "./dist/measure/preview.d.ts",
|
|
118
|
-
"import": "./dist/measure/preview.js",
|
|
119
|
-
"require": "./dist/measure/preview.cjs"
|
|
120
|
-
},
|
|
121
|
-
"./measure/preview": {
|
|
122
|
-
"types": "./dist/measure/preview.d.ts",
|
|
123
|
-
"import": "./dist/measure/preview.js",
|
|
124
|
-
"require": "./dist/measure/preview.cjs"
|
|
125
|
-
},
|
|
126
|
-
"./internal/outline": {
|
|
127
|
-
"types": "./dist/outline/index.d.ts",
|
|
128
|
-
"import": "./dist/outline/index.js",
|
|
129
|
-
"require": "./dist/outline/index.cjs"
|
|
130
|
-
},
|
|
131
|
-
"./outline": {
|
|
132
|
-
"types": "./dist/outline/index.d.ts",
|
|
133
|
-
"import": "./dist/outline/index.js",
|
|
134
|
-
"require": "./dist/outline/index.cjs"
|
|
135
|
-
},
|
|
136
|
-
"./internal/outline/preview": {
|
|
137
|
-
"types": "./dist/outline/preview.d.ts",
|
|
138
|
-
"import": "./dist/outline/preview.js",
|
|
139
|
-
"require": "./dist/outline/preview.cjs"
|
|
140
|
-
},
|
|
141
|
-
"./outline/preview": {
|
|
142
|
-
"types": "./dist/outline/preview.d.ts",
|
|
143
|
-
"import": "./dist/outline/preview.js",
|
|
144
|
-
"require": "./dist/outline/preview.cjs"
|
|
145
|
-
},
|
|
146
86
|
"./internal/highlight": {
|
|
147
87
|
"types": "./dist/highlight/index.d.ts",
|
|
148
88
|
"import": "./dist/highlight/index.js",
|
|
@@ -153,16 +93,6 @@
|
|
|
153
93
|
"import": "./dist/highlight/index.js",
|
|
154
94
|
"require": "./dist/highlight/index.cjs"
|
|
155
95
|
},
|
|
156
|
-
"./internal/highlight/preview": {
|
|
157
|
-
"types": "./dist/highlight/preview.d.ts",
|
|
158
|
-
"import": "./dist/highlight/preview.js",
|
|
159
|
-
"require": "./dist/highlight/preview.cjs"
|
|
160
|
-
},
|
|
161
|
-
"./highlight/preview": {
|
|
162
|
-
"types": "./dist/highlight/preview.d.ts",
|
|
163
|
-
"import": "./dist/highlight/preview.js",
|
|
164
|
-
"require": "./dist/highlight/preview.cjs"
|
|
165
|
-
},
|
|
166
96
|
"./internal/actions": {
|
|
167
97
|
"types": "./dist/actions/index.d.ts",
|
|
168
98
|
"import": "./dist/actions/index.js",
|
|
@@ -173,16 +103,6 @@
|
|
|
173
103
|
"import": "./dist/actions/index.js",
|
|
174
104
|
"require": "./dist/actions/index.cjs"
|
|
175
105
|
},
|
|
176
|
-
"./internal/actions/preview": {
|
|
177
|
-
"types": "./dist/actions/preview.d.ts",
|
|
178
|
-
"import": "./dist/actions/preview.js",
|
|
179
|
-
"require": "./dist/actions/preview.cjs"
|
|
180
|
-
},
|
|
181
|
-
"./actions/preview": {
|
|
182
|
-
"types": "./dist/actions/preview.d.ts",
|
|
183
|
-
"import": "./dist/actions/preview.js",
|
|
184
|
-
"require": "./dist/actions/preview.cjs"
|
|
185
|
-
},
|
|
186
106
|
"./internal/actions/decorator": {
|
|
187
107
|
"types": "./dist/actions/decorator.d.ts",
|
|
188
108
|
"import": "./dist/actions/decorator.js"
|
|
@@ -191,26 +111,6 @@
|
|
|
191
111
|
"types": "./dist/actions/decorator.d.ts",
|
|
192
112
|
"import": "./dist/actions/decorator.js"
|
|
193
113
|
},
|
|
194
|
-
"./internal/controls/preview": {
|
|
195
|
-
"types": "./dist/controls/preview.d.ts",
|
|
196
|
-
"import": "./dist/controls/preview.js",
|
|
197
|
-
"require": "./dist/controls/preview.cjs"
|
|
198
|
-
},
|
|
199
|
-
"./controls/preview": {
|
|
200
|
-
"types": "./dist/controls/preview.d.ts",
|
|
201
|
-
"import": "./dist/controls/preview.js",
|
|
202
|
-
"require": "./dist/controls/preview.cjs"
|
|
203
|
-
},
|
|
204
|
-
"./internal/component-testing": {
|
|
205
|
-
"types": "./dist/component-testing/index.d.ts",
|
|
206
|
-
"import": "./dist/component-testing/index.js",
|
|
207
|
-
"require": "./dist/component-testing/index.cjs"
|
|
208
|
-
},
|
|
209
|
-
"./internal/component-testing/preview": {
|
|
210
|
-
"types": "./dist/component-testing/preview.d.ts",
|
|
211
|
-
"import": "./dist/component-testing/preview.js",
|
|
212
|
-
"require": "./dist/component-testing/preview.cjs"
|
|
213
|
-
},
|
|
214
114
|
"./internal/viewport": {
|
|
215
115
|
"types": "./dist/viewport/index.d.ts",
|
|
216
116
|
"import": "./dist/viewport/index.js",
|
|
@@ -221,16 +121,6 @@
|
|
|
221
121
|
"import": "./dist/viewport/index.js",
|
|
222
122
|
"require": "./dist/viewport/index.cjs"
|
|
223
123
|
},
|
|
224
|
-
"./internal/viewport/preview": {
|
|
225
|
-
"types": "./dist/viewport/preview.d.ts",
|
|
226
|
-
"import": "./dist/viewport/preview.js",
|
|
227
|
-
"require": "./dist/viewport/preview.cjs"
|
|
228
|
-
},
|
|
229
|
-
"./viewport/preview": {
|
|
230
|
-
"types": "./dist/viewport/preview.d.ts",
|
|
231
|
-
"import": "./dist/viewport/preview.js",
|
|
232
|
-
"require": "./dist/viewport/preview.cjs"
|
|
233
|
-
},
|
|
234
124
|
"./internal/controls": {
|
|
235
125
|
"types": "./dist/controls/index.d.ts",
|
|
236
126
|
"import": "./dist/controls/index.js",
|
|
@@ -368,16 +258,6 @@
|
|
|
368
258
|
"import": "./dist/instrumenter/index.js",
|
|
369
259
|
"require": "./dist/instrumenter/index.cjs"
|
|
370
260
|
},
|
|
371
|
-
"./internal/test/preview": {
|
|
372
|
-
"types": "./dist/test/preview.d.ts",
|
|
373
|
-
"import": "./dist/test/preview.js",
|
|
374
|
-
"require": "./dist/test/preview.cjs"
|
|
375
|
-
},
|
|
376
|
-
"./test/preview": {
|
|
377
|
-
"types": "./dist/test/preview.d.ts",
|
|
378
|
-
"import": "./dist/test/preview.js",
|
|
379
|
-
"require": "./dist/test/preview.cjs"
|
|
380
|
-
},
|
|
381
261
|
"./internal/test": {
|
|
382
262
|
"types": "./dist/test/index.d.ts",
|
|
383
263
|
"import": "./dist/test/index.js",
|
|
@@ -394,6 +274,7 @@
|
|
|
394
274
|
"./internal/manager/globals-runtime": {
|
|
395
275
|
"import": "./dist/manager/globals-runtime.js"
|
|
396
276
|
},
|
|
277
|
+
"./bin/index.cjs": "./bin/index.cjs",
|
|
397
278
|
"./package.json": "./package.json",
|
|
398
279
|
"./internal/package.json": "./package.json"
|
|
399
280
|
},
|
|
@@ -426,96 +307,30 @@
|
|
|
426
307
|
"internal/core-server": [
|
|
427
308
|
"./dist/core-server/index.d.ts"
|
|
428
309
|
],
|
|
429
|
-
"internal/backgrounds": [
|
|
430
|
-
"./dist/backgrounds/index.d.ts"
|
|
431
|
-
],
|
|
432
|
-
"backgrounds": [
|
|
433
|
-
"./dist/backgrounds/index.d.ts"
|
|
434
|
-
],
|
|
435
|
-
"internal/backgrounds/preview": [
|
|
436
|
-
"./dist/backgrounds/preview.d.ts"
|
|
437
|
-
],
|
|
438
|
-
"backgrounds/preview": [
|
|
439
|
-
"./dist/backgrounds/preview.d.ts"
|
|
440
|
-
],
|
|
441
|
-
"internal/measure": [
|
|
442
|
-
"./dist/measure/index.d.ts"
|
|
443
|
-
],
|
|
444
|
-
"measure": [
|
|
445
|
-
"./dist/measure/index.d.ts"
|
|
446
|
-
],
|
|
447
|
-
"internal/measure/preview": [
|
|
448
|
-
"./dist/measure/preview.d.ts"
|
|
449
|
-
],
|
|
450
|
-
"measure/preview": [
|
|
451
|
-
"./dist/measure/preview.d.ts"
|
|
452
|
-
],
|
|
453
|
-
"internal/outline": [
|
|
454
|
-
"./dist/outline/index.d.ts"
|
|
455
|
-
],
|
|
456
|
-
"outline": [
|
|
457
|
-
"./dist/outline/index.d.ts"
|
|
458
|
-
],
|
|
459
|
-
"internal/outline/preview": [
|
|
460
|
-
"./dist/outline/preview.d.ts"
|
|
461
|
-
],
|
|
462
|
-
"outline/preview": [
|
|
463
|
-
"./dist/outline/preview.d.ts"
|
|
464
|
-
],
|
|
465
310
|
"internal/highlight": [
|
|
466
311
|
"./dist/highlight/index.d.ts"
|
|
467
312
|
],
|
|
468
313
|
"highlight": [
|
|
469
314
|
"./dist/highlight/index.d.ts"
|
|
470
315
|
],
|
|
471
|
-
"internal/highlight/preview": [
|
|
472
|
-
"./dist/highlight/preview.d.ts"
|
|
473
|
-
],
|
|
474
|
-
"highlight/preview": [
|
|
475
|
-
"./dist/highlight/preview.d.ts"
|
|
476
|
-
],
|
|
477
316
|
"internal/actions": [
|
|
478
317
|
"./dist/actions/index.d.ts"
|
|
479
318
|
],
|
|
480
319
|
"actions": [
|
|
481
320
|
"./dist/actions/index.d.ts"
|
|
482
321
|
],
|
|
483
|
-
"internal/actions/preview": [
|
|
484
|
-
"./dist/actions/preview.d.ts"
|
|
485
|
-
],
|
|
486
|
-
"actions/preview": [
|
|
487
|
-
"./dist/actions/preview.d.ts"
|
|
488
|
-
],
|
|
489
322
|
"internal/actions/decorator": [
|
|
490
323
|
"./dist/actions/decorator.d.ts"
|
|
491
324
|
],
|
|
492
325
|
"actions/decorator": [
|
|
493
326
|
"./dist/actions/decorator.d.ts"
|
|
494
327
|
],
|
|
495
|
-
"internal/controls/preview": [
|
|
496
|
-
"./dist/controls/preview.d.ts"
|
|
497
|
-
],
|
|
498
|
-
"controls/preview": [
|
|
499
|
-
"./dist/controls/preview.d.ts"
|
|
500
|
-
],
|
|
501
|
-
"internal/component-testing": [
|
|
502
|
-
"./dist/component-testing/index.d.ts"
|
|
503
|
-
],
|
|
504
|
-
"internal/component-testing/preview": [
|
|
505
|
-
"./dist/component-testing/preview.d.ts"
|
|
506
|
-
],
|
|
507
328
|
"internal/viewport": [
|
|
508
329
|
"./dist/viewport/index.d.ts"
|
|
509
330
|
],
|
|
510
331
|
"viewport": [
|
|
511
332
|
"./dist/viewport/index.d.ts"
|
|
512
333
|
],
|
|
513
|
-
"internal/viewport/preview": [
|
|
514
|
-
"./dist/viewport/preview.d.ts"
|
|
515
|
-
],
|
|
516
|
-
"viewport/preview": [
|
|
517
|
-
"./dist/viewport/preview.d.ts"
|
|
518
|
-
],
|
|
519
334
|
"internal/controls": [
|
|
520
335
|
"./dist/controls/index.d.ts"
|
|
521
336
|
],
|
|
@@ -597,12 +412,6 @@
|
|
|
597
412
|
"internal/instrumenter": [
|
|
598
413
|
"./dist/instrumenter/index.d.ts"
|
|
599
414
|
],
|
|
600
|
-
"internal/test/preview": [
|
|
601
|
-
"./dist/test/preview.d.ts"
|
|
602
|
-
],
|
|
603
|
-
"test/preview": [
|
|
604
|
-
"./dist/test/preview.d.ts"
|
|
605
|
-
],
|
|
606
415
|
"internal/test": [
|
|
607
416
|
"./dist/test/index.d.ts"
|
|
608
417
|
],
|
|
@@ -629,8 +438,8 @@
|
|
|
629
438
|
"@storybook/global": "^5.0.0",
|
|
630
439
|
"@testing-library/jest-dom": "^6.6.3",
|
|
631
440
|
"@testing-library/user-event": "^14.6.1",
|
|
632
|
-
"@vitest/expect": "3.
|
|
633
|
-
"@vitest/spy": "3.
|
|
441
|
+
"@vitest/expect": "3.2.4",
|
|
442
|
+
"@vitest/spy": "3.2.4",
|
|
634
443
|
"better-opn": "^3.0.2",
|
|
635
444
|
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0",
|
|
636
445
|
"esbuild-register": "^3.5.0",
|
|
@@ -680,7 +489,7 @@
|
|
|
680
489
|
"@types/react-transition-group": "^4",
|
|
681
490
|
"@types/semver": "^7.5.8",
|
|
682
491
|
"@types/ws": "^8",
|
|
683
|
-
"@vitest/utils": "^3.
|
|
492
|
+
"@vitest/utils": "^3.2.4",
|
|
684
493
|
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.10",
|
|
685
494
|
"@yarnpkg/fslib": "2.10.3",
|
|
686
495
|
"@yarnpkg/libzip": "2.3.0",
|
package/dist/actions/preview.cjs
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var g = Object.defineProperty;
|
|
3
|
-
var F = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var C = Object.getOwnPropertyNames;
|
|
5
|
-
var W = Object.prototype.hasOwnProperty;
|
|
6
|
-
var i = (e, t) => g(e, "name", { value: t, configurable: !0 });
|
|
7
|
-
var l = (e, t) => {
|
|
8
|
-
for (var o in t)
|
|
9
|
-
g(e, o, { get: t[o], enumerable: !0 });
|
|
10
|
-
}, M = (e, t, o, r) => {
|
|
11
|
-
if (t && typeof t == "object" || typeof t == "function")
|
|
12
|
-
for (let n of C(t))
|
|
13
|
-
!W.call(e, n) && n !== o && g(e, n, { get: () => t[n], enumerable: !(r = F(t, n)) || r.enumerable });
|
|
14
|
-
return e;
|
|
15
|
-
};
|
|
16
|
-
var L = (e) => M(g({}, "__esModule", { value: !0 }), e);
|
|
17
|
-
|
|
18
|
-
// src/actions/preview.ts
|
|
19
|
-
var z = {};
|
|
20
|
-
l(z, {
|
|
21
|
-
default: () => K
|
|
22
|
-
});
|
|
23
|
-
module.exports = L(z);
|
|
24
|
-
var j = require("storybook/internal/csf");
|
|
25
|
-
|
|
26
|
-
// src/actions/addArgs.ts
|
|
27
|
-
var A = {};
|
|
28
|
-
l(A, {
|
|
29
|
-
argsEnhancers: () => Y
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// src/actions/runtime/action.ts
|
|
33
|
-
var O = require("storybook/internal/preview-errors"), u = require("@storybook/global"), T = require("storybook/preview-api");
|
|
34
|
-
|
|
35
|
-
// src/actions/constants.ts
|
|
36
|
-
var f = "storybook/actions", q = `${f}/panel`, E = `${f}/action-event`, G = `${f}/action-clear`;
|
|
37
|
-
|
|
38
|
-
// src/actions/runtime/configureActions.ts
|
|
39
|
-
var R = {
|
|
40
|
-
depth: 10,
|
|
41
|
-
clearOnStoryChange: !0,
|
|
42
|
-
limit: 50
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
// src/actions/runtime/action.ts
|
|
46
|
-
var w = /* @__PURE__ */ i((e, t) => {
|
|
47
|
-
let o = Object.getPrototypeOf(e);
|
|
48
|
-
return !o || t(o) ? o : w(o, t);
|
|
49
|
-
}, "findProto"), N = /* @__PURE__ */ i((e) => !!(typeof e == "object" && e && w(e, (t) => /^Synthetic(?:Base)?Event$/.test(t.constructor.name)) &&
|
|
50
|
-
typeof e.persist == "function"), "isReactSyntheticEvent"), V = /* @__PURE__ */ i((e) => {
|
|
51
|
-
if (N(e)) {
|
|
52
|
-
let t = Object.create(
|
|
53
|
-
e.constructor.prototype,
|
|
54
|
-
Object.getOwnPropertyDescriptors(e)
|
|
55
|
-
);
|
|
56
|
-
t.persist();
|
|
57
|
-
let o = Object.getOwnPropertyDescriptor(t, "view"), r = o?.value;
|
|
58
|
-
return typeof r == "object" && r?.constructor.name === "Window" && Object.defineProperty(t, "view", {
|
|
59
|
-
...o,
|
|
60
|
-
value: Object.create(r.constructor.prototype)
|
|
61
|
-
}), t;
|
|
62
|
-
}
|
|
63
|
-
return e;
|
|
64
|
-
}, "serializeArg");
|
|
65
|
-
function y(e, t = {}) {
|
|
66
|
-
let o = {
|
|
67
|
-
...R,
|
|
68
|
-
...t
|
|
69
|
-
}, r = /* @__PURE__ */ i(function(...s) {
|
|
70
|
-
if (t.implicit) {
|
|
71
|
-
let x = ("__STORYBOOK_PREVIEW__" in u.global ? u.global.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
|
|
72
|
-
(d) => d.phase === "playing" || d.phase === "rendering"
|
|
73
|
-
);
|
|
74
|
-
if (x) {
|
|
75
|
-
let d = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, b = new O.ImplicitActionsDuringRendering({
|
|
76
|
-
phase: x.phase,
|
|
77
|
-
name: e,
|
|
78
|
-
deprecated: d
|
|
79
|
-
});
|
|
80
|
-
if (d)
|
|
81
|
-
console.warn(b);
|
|
82
|
-
else
|
|
83
|
-
throw b;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
let p = T.addons.getChannel(), c = Date.now().toString(36) + Math.random().toString(36).substring(2), a = 5, m = s.map(V), P = s.length >
|
|
87
|
-
1 ? m : m[0], S = {
|
|
88
|
-
id: c,
|
|
89
|
-
count: 0,
|
|
90
|
-
data: { name: e, args: P },
|
|
91
|
-
options: {
|
|
92
|
-
...o,
|
|
93
|
-
maxDepth: a + (o.depth || 3)
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
p.emit(E, S);
|
|
97
|
-
}, "actionHandler");
|
|
98
|
-
return r.isAction = !0, r.implicit = t.implicit, r;
|
|
99
|
-
}
|
|
100
|
-
i(y, "action");
|
|
101
|
-
|
|
102
|
-
// src/actions/addArgsHelpers.ts
|
|
103
|
-
var v = /* @__PURE__ */ i((e, t) => typeof t[e] > "u" && !(e in t), "isInInitialArgs"), _ = /* @__PURE__ */ i((e) => {
|
|
104
|
-
let {
|
|
105
|
-
initialArgs: t,
|
|
106
|
-
argTypes: o,
|
|
107
|
-
id: r,
|
|
108
|
-
parameters: { actions: n }
|
|
109
|
-
} = e;
|
|
110
|
-
if (!n || n.disable || !n.argTypesRegex || !o)
|
|
111
|
-
return {};
|
|
112
|
-
let s = new RegExp(n.argTypesRegex);
|
|
113
|
-
return Object.entries(o).filter(
|
|
114
|
-
([c]) => !!s.test(c)
|
|
115
|
-
).reduce((c, [a, m]) => (v(a, t) && (c[a] = y(a, { implicit: !0, id: r })), c), {});
|
|
116
|
-
}, "inferActionsFromArgTypesRegex"), D = /* @__PURE__ */ i((e) => {
|
|
117
|
-
let {
|
|
118
|
-
initialArgs: t,
|
|
119
|
-
argTypes: o,
|
|
120
|
-
parameters: { actions: r }
|
|
121
|
-
} = e;
|
|
122
|
-
return r?.disable || !o ? {} : Object.entries(o).filter(([s, p]) => !!p.action).reduce((s, [p, c]) => (v(p, t) && (s[p] = y(typeof c.action ==
|
|
123
|
-
"string" ? c.action : p)), s), {});
|
|
124
|
-
}, "addActionsFromArgTypes");
|
|
125
|
-
|
|
126
|
-
// src/actions/addArgs.ts
|
|
127
|
-
var Y = [
|
|
128
|
-
D,
|
|
129
|
-
_
|
|
130
|
-
];
|
|
131
|
-
|
|
132
|
-
// src/actions/loaders.ts
|
|
133
|
-
var h = {};
|
|
134
|
-
l(h, {
|
|
135
|
-
loaders: () => B
|
|
136
|
-
});
|
|
137
|
-
var I = require("storybook/test");
|
|
138
|
-
var k = !1, $ = /* @__PURE__ */ i((e) => {
|
|
139
|
-
let { parameters: t } = e;
|
|
140
|
-
t?.actions?.disable || k || ((0, I.onMockCall)((o, r) => {
|
|
141
|
-
let n = o.getMockName();
|
|
142
|
-
n !== "spy" && (!/^next\/.*::/.test(n) || [
|
|
143
|
-
"next/router::useRouter()",
|
|
144
|
-
"next/navigation::useRouter()",
|
|
145
|
-
"next/navigation::redirect",
|
|
146
|
-
"next/cache::",
|
|
147
|
-
"next/headers::cookies().set",
|
|
148
|
-
"next/headers::cookies().delete",
|
|
149
|
-
"next/headers::headers().set",
|
|
150
|
-
"next/headers::headers().delete"
|
|
151
|
-
].some((s) => n.startsWith(s))) && y(n)(r);
|
|
152
|
-
}), k = !0);
|
|
153
|
-
}, "logActionsWhenMockCalled"), B = [$];
|
|
154
|
-
|
|
155
|
-
// src/actions/preview.ts
|
|
156
|
-
var K = /* @__PURE__ */ i(() => (0, j.definePreviewAddon)({
|
|
157
|
-
...A,
|
|
158
|
-
...h
|
|
159
|
-
}), "default");
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as storybook_internal_csf from 'storybook/internal/csf';
|
|
2
|
-
|
|
3
|
-
interface ActionsParameters {
|
|
4
|
-
/**
|
|
5
|
-
* Actions configuration
|
|
6
|
-
*
|
|
7
|
-
* @see https://storybook.js.org/docs/essentials/actions#parameters
|
|
8
|
-
*/
|
|
9
|
-
actions?: {
|
|
10
|
-
/**
|
|
11
|
-
* Create actions for each arg that matches the regex. (**NOT recommended, see below**)
|
|
12
|
-
*
|
|
13
|
-
* This is quite useful when your component has dozens (or hundreds) of methods and you do not
|
|
14
|
-
* want to manually apply the fn utility for each of those methods. However, this is not the
|
|
15
|
-
* recommended way of writing actions. That's because automatically inferred args are not
|
|
16
|
-
* available as spies in your play function. If you use argTypesRegex and your stories have play
|
|
17
|
-
* functions, you will need to also define args with the fn utility to test them in your play
|
|
18
|
-
* function.
|
|
19
|
-
*
|
|
20
|
-
* @example `argTypesRegex: '^on.*'`
|
|
21
|
-
*/
|
|
22
|
-
argTypesRegex?: string;
|
|
23
|
-
/** Remove the addon panel and disable the addon's behavior */
|
|
24
|
-
disable?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Binds a standard HTML event handler to the outermost HTML element rendered by your component
|
|
27
|
-
* and triggers an action when the event is called for a given selector. The format is
|
|
28
|
-
* `<eventname> <selector>`. The selector is optional; it defaults to all elements.
|
|
29
|
-
*
|
|
30
|
-
* **To enable this feature, you must use the `withActions` decorator.**
|
|
31
|
-
*
|
|
32
|
-
* @example `handles: ['mouseover', 'click .btn']`
|
|
33
|
-
*
|
|
34
|
-
* @see https://storybook.js.org/docs/essentials/actions#action-event-handlers
|
|
35
|
-
*/
|
|
36
|
-
handles?: string[];
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
interface ActionsTypes {
|
|
40
|
-
parameters: ActionsParameters;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
declare const _default: () => storybook_internal_csf.PreviewAddon<ActionsTypes>;
|
|
44
|
-
|
|
45
|
-
export { type ActionsTypes, _default as default };
|