storybook 9.0.0-alpha.10 → 9.0.0-alpha.12

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 (59) hide show
  1. package/bin/index.cjs +2 -2
  2. package/dist/actions/manager.js +150 -151
  3. package/dist/actions/preview.d.ts +0 -1
  4. package/dist/bin/index.cjs +66 -71
  5. package/dist/bin/index.js +59 -64
  6. package/dist/channels/index.cjs +17 -17
  7. package/dist/channels/index.js +3 -3
  8. package/dist/cli/bin/index.cjs +80 -80
  9. package/dist/cli/bin/index.js +83 -83
  10. package/dist/cli/index.cjs +1904 -1907
  11. package/dist/cli/index.d.ts +3 -7
  12. package/dist/cli/index.js +734 -737
  13. package/dist/common/index.cjs +59 -68
  14. package/dist/common/index.d.ts +1 -6
  15. package/dist/common/index.js +91 -100
  16. package/dist/component-testing/index.cjs +23 -0
  17. package/dist/component-testing/index.d.ts +3 -0
  18. package/dist/component-testing/index.js +5 -0
  19. package/dist/component-testing/manager.css +170 -0
  20. package/dist/component-testing/manager.js +3126 -0
  21. package/dist/component-testing/preview.cjs +40 -0
  22. package/dist/component-testing/preview.d.ts +5 -0
  23. package/dist/component-testing/preview.js +25 -0
  24. package/dist/components/index.cjs +5515 -5781
  25. package/dist/components/index.d.ts +3 -254
  26. package/dist/components/index.js +7296 -13770
  27. package/dist/controls/manager.js +989 -941
  28. package/dist/controls/preview.d.ts +0 -1
  29. package/dist/core-events/index.cjs +42 -45
  30. package/dist/core-events/index.d.ts +1 -4
  31. package/dist/core-events/index.js +38 -41
  32. package/dist/core-server/index.cjs +2730 -2721
  33. package/dist/core-server/index.d.ts +32 -23
  34. package/dist/core-server/index.js +822 -813
  35. package/dist/core-server/presets/common-preset.cjs +1754 -1730
  36. package/dist/core-server/presets/common-preset.js +1852 -1828
  37. package/dist/csf/index.d.ts +0 -2
  38. package/dist/csf-tools/index.cjs +0 -8
  39. package/dist/csf-tools/index.d.ts +0 -4
  40. package/dist/csf-tools/index.js +0 -8
  41. package/dist/instrumenter/index.cjs +475 -468
  42. package/dist/instrumenter/index.js +949 -950
  43. package/dist/manager/globals-module-info.cjs +15 -17
  44. package/dist/manager/globals-module-info.js +4 -6
  45. package/dist/manager/globals-runtime.js +56352 -50867
  46. package/dist/manager/runtime.js +4958 -4440
  47. package/dist/manager-api/index.cjs +1153 -1136
  48. package/dist/manager-api/index.d.ts +106 -97
  49. package/dist/manager-api/index.js +810 -795
  50. package/dist/preview/runtime.js +38453 -37289
  51. package/dist/preview-api/index.cjs +1098 -1211
  52. package/dist/preview-api/index.d.ts +10 -23
  53. package/dist/preview-api/index.js +1457 -1571
  54. package/dist/telemetry/index.d.ts +1 -1
  55. package/dist/types/index.cjs +14 -15
  56. package/dist/types/index.d.ts +306 -65
  57. package/dist/types/index.js +1 -2
  58. package/dist/viewport/preview.d.ts +0 -1
  59. package/package.json +25 -4
@@ -460,28 +460,6 @@ declare class MockUniversalStore<State, CustomEvent extends {
460
460
  unsubscribeAll(): void;
461
461
  }
462
462
 
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
463
  type StatusValue = 'status-value:pending' | 'status-value:success' | 'status-value:error' | 'status-value:warning' | 'status-value:unknown';
486
464
  type StatusTypeId = string;
487
465
  type StatusByTypeId = Record<StatusTypeId, Status>;
@@ -495,6 +473,13 @@ interface Status {
495
473
  data?: any;
496
474
  sidebarContextMenu?: boolean;
497
475
  }
476
+ declare const StatusStoreEventType: {
477
+ readonly SELECT: "select";
478
+ };
479
+ type StatusStoreEvent = {
480
+ type: typeof StatusStoreEventType.SELECT;
481
+ payload: Status[];
482
+ };
498
483
  type StatusStore = {
499
484
  getAll: () => StatusesByStoryIdAndTypeId;
500
485
  set: (statuses: Status[]) => void;
@@ -506,6 +491,28 @@ type StatusStoreByTypeId = StatusStore & {
506
491
  typeId: StatusTypeId;
507
492
  };
508
493
 
494
+ declare global {
495
+ interface SymbolConstructor {
496
+ readonly observable: symbol;
497
+ }
498
+ }
499
+
500
+ declare global {
501
+ var globalProjectAnnotations: NormalizedProjectAnnotations<any>;
502
+ var defaultProjectAnnotations: ProjectAnnotations<any>;
503
+ }
504
+ type WrappedStoryRef = {
505
+ __pw_type: 'jsx' | 'importRef';
506
+ };
507
+ type UnwrappedJSXStoryRef = {
508
+ __pw_type: 'jsx';
509
+ type: UnwrappedImportStoryRef;
510
+ };
511
+ type UnwrappedImportStoryRef = ComposedStoryFn;
512
+ declare global {
513
+ function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise<UnwrappedJSXStoryRef | UnwrappedImportStoryRef>;
514
+ }
515
+
509
516
  type TestProviderState = 'test-provider-state:pending' | 'test-provider-state:running' | 'test-provider-state:succeeded' | 'test-provider-state:crashed';
510
517
  type TestProviderId = string;
511
518
  type TestProviderStateByProviderId = Record<TestProviderId, TestProviderState>;
@@ -703,6 +710,7 @@ declare const fullStatusStore: StatusStore & {
703
710
  typeId: undefined;
704
711
  };
705
712
  declare const getStatusStoreByTypeId: (typeId: StatusTypeId) => StatusStoreByTypeId;
713
+ declare const universalStatusStore: UniversalStore<StatusesByStoryIdAndTypeId, StatusStoreEvent>;
706
714
 
707
715
  declare const fullTestProviderStore: {
708
716
  settingsChanged: () => void;
@@ -716,5 +724,6 @@ declare const fullTestProviderStore: {
716
724
  clearAll: () => void;
717
725
  };
718
726
  declare const getTestProviderStoreById: (testProviderId: TestProviderId) => TestProviderStoreById;
727
+ declare const universalTestProviderStore: UniversalStore<TestProviderStateByProviderId, TestProviderStoreEvent>;
719
728
 
720
- export { type BuildIndexOptions, type BuildStaticStandaloneOptions, StoryIndexGenerator, build, buildDevStandalone, buildIndex, buildIndexStandalone, buildStaticStandalone, MockUniversalStore as experimental_MockUniversalStore, UniversalStore as experimental_UniversalStore, getStatusStoreByTypeId as experimental_getStatusStore, getTestProviderStoreById as experimental_getTestProviderStore, loadStorybook as experimental_loadStorybook, getErrorLevel, fullStatusStore as internal_fullStatusStore, fullTestProviderStore as internal_fullTestProviderStore, mapStaticDir, sendTelemetryError, withTelemetry };
729
+ export { type BuildIndexOptions, type BuildStaticStandaloneOptions, StoryIndexGenerator, build, buildDevStandalone, buildIndex, buildIndexStandalone, buildStaticStandalone, MockUniversalStore as experimental_MockUniversalStore, UniversalStore as experimental_UniversalStore, getStatusStoreByTypeId as experimental_getStatusStore, getTestProviderStoreById as experimental_getTestProviderStore, loadStorybook as experimental_loadStorybook, getErrorLevel, fullStatusStore as internal_fullStatusStore, fullTestProviderStore as internal_fullTestProviderStore, universalStatusStore as internal_universalStatusStore, universalTestProviderStore as internal_universalTestProviderStore, mapStaticDir, sendTelemetryError, withTelemetry };