storybook 9.1.0-alpha.0 → 9.1.0-alpha.10

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 (112) hide show
  1. package/assets/browser/favicon-wrapper.svg +46 -0
  2. package/assets/browser/favicon.svg +1 -1
  3. package/dist/actions/index.cjs +16 -16
  4. package/dist/actions/index.d.ts +1 -38
  5. package/dist/actions/index.js +12 -12
  6. package/dist/bin/index.cjs +62 -69
  7. package/dist/bin/index.js +43 -50
  8. package/dist/builder-manager/index.cjs +379 -378
  9. package/dist/builder-manager/index.d.ts +567 -2
  10. package/dist/builder-manager/index.js +280 -279
  11. package/dist/cli/bin/index.cjs +945 -945
  12. package/dist/cli/bin/index.js +673 -672
  13. package/dist/cli/index.cjs +14965 -14973
  14. package/dist/cli/index.d.ts +713 -15
  15. package/dist/cli/index.js +13488 -13495
  16. package/dist/common/index.cjs +11211 -11103
  17. package/dist/common/index.d.ts +351 -72
  18. package/dist/common/index.js +18491 -18379
  19. package/dist/components/index.cjs +4606 -4425
  20. package/dist/components/index.d.ts +11 -12
  21. package/dist/components/index.js +3020 -2834
  22. package/dist/controls/index.cjs +16 -16
  23. package/dist/controls/index.d.ts +1 -36
  24. package/dist/core-server/index.cjs +6690 -6624
  25. package/dist/core-server/index.d.ts +14 -2
  26. package/dist/core-server/index.js +6088 -6023
  27. package/dist/core-server/presets/common-manager.js +3582 -3475
  28. package/dist/core-server/presets/common-preset.cjs +85015 -5213
  29. package/dist/core-server/presets/common-preset.js +85107 -5291
  30. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.cjs +28728 -0
  31. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +28729 -0
  32. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.cjs +29339 -0
  33. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +29340 -0
  34. package/dist/csf/index.cjs +3019 -104
  35. package/dist/csf/index.d.ts +301 -18
  36. package/dist/csf/index.js +3031 -98
  37. package/dist/csf-tools/index.cjs +489 -488
  38. package/dist/csf-tools/index.js +311 -309
  39. package/dist/highlight/index.cjs +15 -15
  40. package/dist/highlight/index.d.ts +1 -12
  41. package/dist/highlight/index.js +4 -4
  42. package/dist/instrumenter/index.cjs +1308 -1239
  43. package/dist/instrumenter/index.d.ts +25 -3
  44. package/dist/instrumenter/index.js +1345 -1280
  45. package/dist/manager/globals-module-info.cjs +1 -1
  46. package/dist/manager/globals-module-info.js +1 -1
  47. package/dist/manager/globals-runtime.js +42257 -44665
  48. package/dist/manager/runtime.js +3715 -3536
  49. package/dist/manager-api/index.cjs +74 -74
  50. package/dist/manager-api/index.d.ts +4 -1
  51. package/dist/manager-api/index.js +142 -142
  52. package/dist/node-logger/index.cjs +8520 -994
  53. package/dist/node-logger/index.d.ts +395 -2
  54. package/dist/node-logger/index.js +8535 -995
  55. package/dist/preview/runtime.js +13701 -16331
  56. package/dist/preview-api/index.cjs +1434 -1458
  57. package/dist/preview-api/index.d.ts +13 -10
  58. package/dist/preview-api/index.js +950 -976
  59. package/dist/server-errors.cjs +201 -242
  60. package/dist/server-errors.d.ts +1 -12
  61. package/dist/server-errors.js +182 -223
  62. package/dist/telemetry/index.cjs +1919 -1638
  63. package/dist/telemetry/index.d.ts +4 -2
  64. package/dist/telemetry/index.js +1972 -1690
  65. package/dist/test/index.cjs +9184 -9816
  66. package/dist/test/index.d.ts +8 -1
  67. package/dist/test/index.js +8390 -9029
  68. package/dist/types/index.d.ts +19 -17
  69. package/dist/viewport/index.cjs +17 -24
  70. package/dist/viewport/index.d.ts +9 -532
  71. package/dist/viewport/index.js +9 -16
  72. package/package.json +18 -187
  73. package/templates/mocker-runtime.template.js +89 -0
  74. package/dist/actions/preview.cjs +0 -159
  75. package/dist/actions/preview.d.ts +0 -555
  76. package/dist/actions/preview.js +0 -149
  77. package/dist/backgrounds/index.cjs +0 -148
  78. package/dist/backgrounds/index.d.ts +0 -592
  79. package/dist/backgrounds/index.js +0 -130
  80. package/dist/backgrounds/preview.cjs +0 -143
  81. package/dist/backgrounds/preview.d.ts +0 -555
  82. package/dist/backgrounds/preview.js +0 -127
  83. package/dist/component-testing/index.cjs +0 -23
  84. package/dist/component-testing/index.d.ts +0 -3
  85. package/dist/component-testing/index.js +0 -5
  86. package/dist/component-testing/preview.cjs +0 -40
  87. package/dist/component-testing/preview.d.ts +0 -5
  88. package/dist/component-testing/preview.js +0 -25
  89. package/dist/controls/preview.cjs +0 -26
  90. package/dist/controls/preview.d.ts +0 -555
  91. package/dist/controls/preview.js +0 -9
  92. package/dist/highlight/preview.cjs +0 -590
  93. package/dist/highlight/preview.d.ts +0 -555
  94. package/dist/highlight/preview.js +0 -574
  95. package/dist/measure/index.cjs +0 -476
  96. package/dist/measure/index.d.ts +0 -567
  97. package/dist/measure/index.js +0 -464
  98. package/dist/measure/preview.cjs +0 -466
  99. package/dist/measure/preview.d.ts +0 -560
  100. package/dist/measure/preview.js +0 -450
  101. package/dist/outline/index.cjs +0 -528
  102. package/dist/outline/index.d.ts +0 -567
  103. package/dist/outline/index.js +0 -500
  104. package/dist/outline/preview.cjs +0 -518
  105. package/dist/outline/preview.d.ts +0 -560
  106. package/dist/outline/preview.js +0 -486
  107. package/dist/test/preview.cjs +0 -73
  108. package/dist/test/preview.d.ts +0 -555
  109. package/dist/test/preview.js +0 -66
  110. package/dist/viewport/preview.cjs +0 -35
  111. package/dist/viewport/preview.d.ts +0 -569
  112. package/dist/viewport/preview.js +0 -19
@@ -517,8 +517,9 @@ interface ModalProps extends Omit<React__default.ComponentProps<typeof Root>, 'c
517
517
  onInteractOutside?: ContentProps['onInteractOutside'];
518
518
  className?: string;
519
519
  container?: HTMLElement;
520
+ portalSelector?: string;
520
521
  }
521
- declare function BaseModal({ children, width, height, onEscapeKeyDown, onInteractOutside, className, container, ...rootProps }: ModalProps): React__default.JSX.Element;
522
+ declare function BaseModal({ children, width, height, onEscapeKeyDown, onInteractOutside, className, container, portalSelector, ...rootProps }: ModalProps): React__default.JSX.Element;
522
523
  declare const Modal: typeof BaseModal & typeof Components & {
523
524
  Dialog: typeof Dialog$1;
524
525
  };
@@ -578,7 +579,9 @@ interface ErrorFormatterProps {
578
579
  }
579
580
  declare const ErrorFormatter: ({ error }: ErrorFormatterProps) => React__default.JSX.Element;
580
581
 
581
- declare const Checkbox: (props: React__default.InputHTMLAttributes<HTMLInputElement>) => React__default.JSX.Element;
582
+ type Sizes = '100%' | 'flex' | 'auto';
583
+ type Alignments = 'end' | 'center' | 'start';
584
+ type ValidationStates = 'valid' | 'error' | 'warn';
582
585
 
583
586
  /**
584
587
  * These types are copied from `react-textarea-autosize`. I copied them because of
@@ -599,9 +602,6 @@ interface TextareaAutosizeProps extends Omit<TextareaPropsRaw, 'style'> {
599
602
  cacheMeasurements?: boolean;
600
603
  style?: Style;
601
604
  }
602
- type Sizes = '100%' | 'flex' | 'auto';
603
- type Alignments = 'end' | 'center' | 'start';
604
- type ValidationStates = 'valid' | 'error' | 'warn';
605
605
 
606
606
  interface FieldProps {
607
607
  children?: ReactNode;
@@ -628,16 +628,12 @@ declare const Form: storybook_theming.StyledComponent<{
628
628
  }, {}, {}> & {
629
629
  displayName: string;
630
630
  };
631
- Select: storybook_theming.StyledComponent<Omit<React$1.SelectHTMLAttributes<HTMLSelectElement>, "align" | "height" | "size" | "valid"> & {
631
+ Select: ({ children, ...props }: Omit<React$1.SelectHTMLAttributes<HTMLSelectElement>, "align" | "height" | "size" | "valid"> & {
632
632
  size?: Sizes;
633
633
  align?: Alignments;
634
634
  valid?: ValidationStates;
635
635
  height?: number;
636
- } & React$1.RefAttributes<any> & {
637
- theme?: storybook_theming.Theme;
638
- }, {}, {}> & {
639
- displayName: string;
640
- };
636
+ }) => React$1.JSX.Element;
641
637
  Textarea: storybook_theming.StyledComponent<Omit<Omit<TextareaAutosizeProps, "align" | "height" | "size" | "valid"> & {
642
638
  size?: Sizes;
643
639
  align?: Alignments;
@@ -654,6 +650,8 @@ declare const Form: storybook_theming.StyledComponent<{
654
650
  displayName: string;
655
651
  };
656
652
  Button: React$1.ForwardRefExoticComponent<ButtonProps$1 & React$1.RefAttributes<HTMLButtonElement>>;
653
+ Checkbox: (props: React.InputHTMLAttributes<HTMLInputElement>) => React$1.JSX.Element;
654
+ Radio: (props: React.InputHTMLAttributes<HTMLInputElement>) => React$1.JSX.Element;
657
655
  };
658
656
 
659
657
  declare const top: "top";
@@ -1062,6 +1060,7 @@ interface UnstyledBarProps extends ScrollAreaProps {
1062
1060
  scrollable?: boolean;
1063
1061
  }
1064
1062
  interface BarProps extends UnstyledBarProps {
1063
+ backgroundColor?: string;
1065
1064
  border?: boolean;
1066
1065
  }
1067
1066
  declare const Bar: storybook_theming.StyledComponent<UnstyledBarProps & {
@@ -1172,4 +1171,4 @@ declare const components: {
1172
1171
  };
1173
1172
  declare const resetComponents: Record<string, ElementType>;
1174
1173
 
1175
- export { A, ActionBar, type ActionItem, AddonPanel, Badge, Bar, Blockquote, Button, Checkbox, ClipboardCode, Code, DL, Div, DocumentWrapper, EmptyTabContent, ErrorFormatter, FlexBar, Form, H1, H2, H3, H4, H5, H6, HR, IconButton, Img, LI, Link$1 as Link, ListItem, Loader, Modal, OL, P, Placeholder, Pre, ProgressSpinner, ResetWrapper, ScrollArea, Separator, Spaced, Span, StorybookIcon, StorybookLogo, type SupportedLanguage, SyntaxHighlighter, type SyntaxHighlighterFormatTypes, type SyntaxHighlighterProps, type SyntaxHighlighterRendererProps, TT, TabBar, TabButton, TabWrapper, Table, Tabs, TabsState, TooltipLinkList, type Link as TooltipLinkListLink, TooltipMessage, TooltipNote, UL, WithTooltip, WithTooltipPure, Zoom, codeCommon, components, createCopyToClipboardFunction, getStoryHref, interleaveSeparators, nameSpaceClassNames, resetComponents, withReset };
1174
+ export { A, ActionBar, type ActionItem, AddonPanel, Badge, Bar, Blockquote, Button, ClipboardCode, Code, DL, Div, DocumentWrapper, EmptyTabContent, ErrorFormatter, FlexBar, Form, H1, H2, H3, H4, H5, H6, HR, IconButton, Img, LI, Link$1 as Link, ListItem, Loader, Modal, OL, P, Placeholder, Pre, ProgressSpinner, ResetWrapper, ScrollArea, Separator, Spaced, Span, StorybookIcon, StorybookLogo, type SupportedLanguage, SyntaxHighlighter, type SyntaxHighlighterFormatTypes, type SyntaxHighlighterProps, type SyntaxHighlighterRendererProps, TT, TabBar, TabButton, TabWrapper, Table, Tabs, TabsState, TooltipLinkList, type Link as TooltipLinkListLink, TooltipMessage, TooltipNote, UL, WithTooltip, WithTooltipPure, Zoom, codeCommon, components, createCopyToClipboardFunction, getStoryHref, interleaveSeparators, nameSpaceClassNames, resetComponents, withReset };