storybook 9.0.0-alpha.5 → 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 (41) 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/csf/index.d.ts +1 -1
  17. package/dist/instrumenter/index.cjs +2 -2
  18. package/dist/instrumenter/index.js +2 -2
  19. package/dist/manager/globals-module-info.cjs +12 -4
  20. package/dist/manager/globals-module-info.js +10 -2
  21. package/dist/manager/globals-runtime.js +19573 -19104
  22. package/dist/manager/runtime.js +3254 -3190
  23. package/dist/manager-api/index.cjs +3627 -3368
  24. package/dist/manager-api/index.d.ts +57 -18
  25. package/dist/manager-api/index.js +3182 -2962
  26. package/dist/manager-errors.d.ts +25 -1
  27. package/dist/manager-errors.js +42 -26
  28. package/dist/preview/runtime.js +8055 -7823
  29. package/dist/preview-api/index.cjs +1234 -1683
  30. package/dist/preview-api/index.d.ts +69 -376
  31. package/dist/preview-api/index.js +1360 -1785
  32. package/dist/preview-errors.cjs +98 -81
  33. package/dist/preview-errors.d.ts +25 -1
  34. package/dist/preview-errors.js +109 -93
  35. package/dist/server-errors.cjs +92 -75
  36. package/dist/server-errors.d.ts +25 -1
  37. package/dist/server-errors.js +83 -66
  38. package/dist/test/index.cjs +6697 -6432
  39. package/dist/test/index.js +6069 -5804
  40. package/dist/types/index.d.ts +27 -13
  41. package/package.json +6 -6
@@ -1,9 +1,10 @@
1
1
  import { loadAllPresets } from 'storybook/internal/common';
2
2
  export { getPreviewBodyTemplate, getPreviewHeadTemplate } from 'storybook/internal/common';
3
3
  import * as storybook_internal_types from 'storybook/internal/types';
4
- import { CLIOptions, LoadOptions, BuilderOptions, StorybookConfigRaw, IndexInputStats, NormalizedStoriesSpecifier, Path, Indexer, DocsOptions, StoryIndexEntry, DocsIndexEntry, Tag, IndexEntry, StoryIndex, Options } from 'storybook/internal/types';
4
+ import { CLIOptions, LoadOptions, BuilderOptions, StorybookConfigRaw, IndexInputStats, NormalizedStoriesSpecifier, Path, Indexer, DocsOptions, StoryIndexEntry, DocsIndexEntry, Tag, IndexEntry, StoryIndex, Options, NormalizedProjectAnnotations, ProjectAnnotations, ComposedStoryFn } from 'storybook/internal/types';
5
5
  import { EventType } from 'storybook/internal/telemetry';
6
6
  import { Channel } from 'storybook/internal/channels';
7
+ import { StoryId } from 'storybook/internal/csf';
7
8
 
8
9
  type BuildStaticStandaloneOptions = CLIOptions & LoadOptions & BuilderOptions & {
9
10
  outputDir: string;
@@ -459,4 +460,56 @@ declare class MockUniversalStore<State, CustomEvent extends {
459
460
  unsubscribeAll(): void;
460
461
  }
461
462
 
462
- export { type BuildIndexOptions, type BuildStaticStandaloneOptions, StoryIndexGenerator, build, buildDevStandalone, buildIndex, buildIndexStandalone, buildStaticStandalone, MockUniversalStore as experimental_MockUniversalStore, UniversalStore as experimental_UniversalStore, loadStorybook as experimental_loadStorybook, getErrorLevel, mapStaticDir, sendTelemetryError, withTelemetry };
463
+ declare global {
464
+ interface SymbolConstructor {
465
+ readonly observable: symbol;
466
+ }
467
+ }
468
+
469
+ declare global {
470
+ var globalProjectAnnotations: NormalizedProjectAnnotations<any>;
471
+ var defaultProjectAnnotations: ProjectAnnotations<any>;
472
+ }
473
+ type WrappedStoryRef = {
474
+ __pw_type: 'jsx' | 'importRef';
475
+ };
476
+ type UnwrappedJSXStoryRef = {
477
+ __pw_type: 'jsx';
478
+ type: UnwrappedImportStoryRef;
479
+ };
480
+ type UnwrappedImportStoryRef = ComposedStoryFn;
481
+ declare global {
482
+ function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise<UnwrappedJSXStoryRef | UnwrappedImportStoryRef>;
483
+ }
484
+
485
+ type StatusValue = 'status-value:pending' | 'status-value:success' | 'status-value:error' | 'status-value:warning' | 'status-value:unknown';
486
+ type StatusTypeId = string;
487
+ type StatusByTypeId = Record<StatusTypeId, Status>;
488
+ type StatusesByStoryIdAndTypeId = Record<StoryId, StatusByTypeId>;
489
+ interface Status {
490
+ value: StatusValue;
491
+ typeId: StatusTypeId;
492
+ storyId: StoryId;
493
+ title: string;
494
+ description: string;
495
+ data?: any;
496
+ sidebarContextMenu?: boolean;
497
+ }
498
+ type StatusStore = {
499
+ getAll: () => StatusesByStoryIdAndTypeId;
500
+ set: (statuses: Status[]) => void;
501
+ onAllStatusChange: (listener: (statuses: StatusesByStoryIdAndTypeId, previousStatuses: StatusesByStoryIdAndTypeId) => void) => () => void;
502
+ onSelect: (listener: (selectedStatuses: Status[]) => void) => () => void;
503
+ unset: (storyIds?: StoryId[]) => void;
504
+ };
505
+ type StatusStoreByTypeId = StatusStore & {
506
+ typeId: StatusTypeId;
507
+ };
508
+
509
+ declare const fullStatusStore: StatusStore & {
510
+ selectStatuses: (statuses: Status[]) => void;
511
+ typeId: undefined;
512
+ };
513
+ declare const getStatusStoreByTypeId: (typeId: StatusTypeId) => StatusStoreByTypeId;
514
+
515
+ export { type BuildIndexOptions, type BuildStaticStandaloneOptions, StoryIndexGenerator, build, buildDevStandalone, buildIndex, buildIndexStandalone, buildStaticStandalone, MockUniversalStore as experimental_MockUniversalStore, UniversalStore as experimental_UniversalStore, getStatusStoreByTypeId as experimental_getStatusStore, loadStorybook as experimental_loadStorybook, getErrorLevel, fullStatusStore as internal_fullStatusStore, mapStaticDir, sendTelemetryError, withTelemetry };