storybook 9.0.0-alpha.4 → 9.0.0-alpha.6

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.
Files changed (40) hide show
  1. package/dist/bin/index.cjs +63 -63
  2. package/dist/bin/index.js +63 -63
  3. package/dist/builder-manager/index.cjs +253 -280
  4. package/dist/builder-manager/index.js +305 -332
  5. package/dist/cli/bin/index.cjs +1 -1
  6. package/dist/cli/bin/index.js +1 -1
  7. package/dist/common/index.cjs +63 -63
  8. package/dist/common/index.js +63 -63
  9. package/dist/components/index.cjs +2102 -2069
  10. package/dist/components/index.js +2311 -2278
  11. package/dist/core-server/index.cjs +10687 -10447
  12. package/dist/core-server/index.d.ts +55 -2
  13. package/dist/core-server/index.js +10824 -10590
  14. package/dist/core-server/presets/common-preset.cjs +59 -59
  15. package/dist/core-server/presets/common-preset.js +57 -57
  16. package/dist/instrumenter/index.cjs +2 -2
  17. package/dist/instrumenter/index.js +2 -2
  18. package/dist/manager/globals-module-info.cjs +12 -4
  19. package/dist/manager/globals-module-info.js +10 -2
  20. package/dist/manager/globals-runtime.js +19573 -19104
  21. package/dist/manager/runtime.js +3254 -3190
  22. package/dist/manager-api/index.cjs +3627 -3368
  23. package/dist/manager-api/index.d.ts +57 -18
  24. package/dist/manager-api/index.js +3182 -2962
  25. package/dist/manager-errors.d.ts +25 -1
  26. package/dist/manager-errors.js +42 -26
  27. package/dist/preview/runtime.js +8055 -7823
  28. package/dist/preview-api/index.cjs +1234 -1683
  29. package/dist/preview-api/index.d.ts +69 -376
  30. package/dist/preview-api/index.js +1360 -1785
  31. package/dist/preview-errors.cjs +98 -81
  32. package/dist/preview-errors.d.ts +25 -1
  33. package/dist/preview-errors.js +109 -93
  34. package/dist/server-errors.cjs +92 -75
  35. package/dist/server-errors.d.ts +25 -1
  36. package/dist/server-errors.js +83 -66
  37. package/dist/test/index.cjs +6697 -6432
  38. package/dist/test/index.js +6069 -5804
  39. package/dist/types/index.d.ts +27 -13
  40. package/package.json +6 -6
@@ -1632,19 +1632,8 @@ interface API_Versions$1 {
1632
1632
  next?: API_Version;
1633
1633
  current?: API_Version;
1634
1634
  }
1635
- type API_StatusValue = 'pending' | 'success' | 'error' | 'warn' | 'unknown';
1636
- interface API_StatusObject {
1637
- status: API_StatusValue;
1638
- title: string;
1639
- description: string;
1640
- data?: any;
1641
- onClick?: () => void;
1642
- sidebarContextMenu?: boolean;
1643
- }
1644
- type API_StatusState = Record<StoryId, Record<string, API_StatusObject>>;
1645
- type API_StatusUpdate = Record<StoryId, API_StatusObject | null>;
1646
1635
  type API_FilterFunction = (item: API_PreparedIndexEntry & {
1647
- status: Record<string, API_StatusObject | null>;
1636
+ statuses: StatusByTypeId;
1648
1637
  }) => boolean;
1649
1638
 
1650
1639
  interface SetStoriesStory {
@@ -2538,4 +2527,29 @@ type SupportedFrameworks = 'angular' | 'ember' | 'experimental-nextjs-vite' | 'h
2538
2527
 
2539
2528
  type SupportedRenderers = 'react' | 'react-native' | 'vue3' | 'angular' | 'ember' | 'preact' | 'svelte' | 'qwik' | 'html' | 'web-components' | 'server' | 'solid' | 'nuxt';
2540
2529
 
2541
- 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_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_StatusObject, type API_StatusState, type API_StatusUpdate, type API_StatusValue, 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 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_SidebarBottomType, type Addon_SidebarTopType, 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_TestProviderState, 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 GlobalsUpdatedPayload, type IndexEntry, type IndexEntryLegacy, type IndexInput, type IndexInputStats, type IndexedCSFFile, type IndexedStory, type Indexer, type IndexerOptions, type LoadOptions, type LoadedPreset, type Middleware, 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 Renderer, type RendererName, type ResolvedModuleExport, type ResolvedModuleExportFromType, type ResolvedModuleExportType, type SetGlobalsPayload, type SetStoriesPayload, type SetStoriesStory, type SetStoriesStoryData, type Stats, 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 SupportedFrameworks, type SupportedRenderers, type TagOptions, type TagsOptions, type TeardownRenderToCanvas, type TestBuildConfig, type TestBuildFlags, type TypescriptOptions, type V3CompatIndexEntry, type VersionCheck, type ViewMode, type WebRenderer };
2530
+ type StatusValue = 'status-value:pending' | 'status-value:success' | 'status-value:error' | 'status-value:warning' | 'status-value:unknown';
2531
+ type StatusTypeId = string;
2532
+ type StatusByTypeId = Record<StatusTypeId, Status>;
2533
+ type StatusesByStoryIdAndTypeId = Record<StoryId, StatusByTypeId>;
2534
+ interface Status {
2535
+ value: StatusValue;
2536
+ typeId: StatusTypeId;
2537
+ storyId: StoryId;
2538
+ title: string;
2539
+ description: string;
2540
+ data?: any;
2541
+ sidebarContextMenu?: boolean;
2542
+ }
2543
+ type StatusStore = {
2544
+ getAll: () => StatusesByStoryIdAndTypeId;
2545
+ set: (statuses: Status[]) => void;
2546
+ onAllStatusChange: (listener: (statuses: StatusesByStoryIdAndTypeId, previousStatuses: StatusesByStoryIdAndTypeId) => void) => () => void;
2547
+ onSelect: (listener: (selectedStatuses: Status[]) => void) => () => void;
2548
+ unset: (storyIds?: StoryId[]) => void;
2549
+ };
2550
+ type StatusStoreByTypeId = StatusStore & {
2551
+ typeId: StatusTypeId;
2552
+ };
2553
+ type UseStatusStore = <T = StatusesByStoryIdAndTypeId>(selector?: (statuses: StatusesByStoryIdAndTypeId) => T) => T;
2554
+
2555
+ 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_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 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_SidebarBottomType, type Addon_SidebarTopType, 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_TestProviderState, 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 GlobalsUpdatedPayload, type IndexEntry, type IndexEntryLegacy, type IndexInput, type IndexInputStats, type IndexedCSFFile, type IndexedStory, type Indexer, type IndexerOptions, type LoadOptions, type LoadedPreset, type Middleware, 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 Renderer, 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 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 SupportedFrameworks, type SupportedRenderers, type TagOptions, type TagsOptions, type TeardownRenderToCanvas, type TestBuildConfig, type TestBuildFlags, type TypescriptOptions, type UseStatusStore, 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.0.0-alpha.4",
3
+ "version": "9.0.0-alpha.6",
4
4
  "description": "Storybook framework-agnostic API",
5
5
  "keywords": [
6
6
  "storybook"
@@ -22,6 +22,10 @@
22
22
  "sideEffects": false,
23
23
  "type": "module",
24
24
  "imports": {
25
+ "#manager-status-store": {
26
+ "storybook": "./src/manager/status-store.mock.ts",
27
+ "default": "./src/manager/status-store.ts"
28
+ },
25
29
  "#utils": {
26
30
  "storybook": "./template/stories/utils.mock.ts",
27
31
  "default": "./template/stories/utils.ts"
@@ -444,15 +448,12 @@
444
448
  "@vitest/expect": "2.0.5",
445
449
  "@vitest/spy": "2.0.5",
446
450
  "better-opn": "^3.0.2",
447
- "browser-assert": "^1.2.1",
448
451
  "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",
449
452
  "esbuild-register": "^3.5.0",
450
453
  "jsdoc-type-pratt-parser": "^4.0.0",
451
454
  "polished": "^4.2.2",
452
- "process": "^0.11.10",
453
455
  "recast": "^0.23.5",
454
456
  "semver": "^7.6.2",
455
- "util": "^0.12.5",
456
457
  "uuid": "^9.0.0",
457
458
  "ws": "^8.18.0"
458
459
  },
@@ -479,7 +480,7 @@
479
480
  "@radix-ui/react-scroll-area": "1.2.0-rc.7",
480
481
  "@radix-ui/react-slot": "^1.0.2",
481
482
  "@storybook/docs-mdx": "4.0.0-next.1",
482
- "@storybook/icons": "^1.3.2",
483
+ "@storybook/icons": "^1.4.0",
483
484
  "@tanstack/react-virtual": "^3.3.0",
484
485
  "@testing-library/react": "^14.0.0",
485
486
  "@types/cross-spawn": "^6.0.2",
@@ -526,7 +527,6 @@
526
527
  "ejs": "^3.1.10",
527
528
  "es-toolkit": "^1.22.0",
528
529
  "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",
529
- "esbuild-plugin-alias": "^0.2.1",
530
530
  "execa": "^8.0.1",
531
531
  "fd-package-json": "^1.2.0",
532
532
  "fetch-retry": "^6.0.0",