storybook 9.0.0-alpha.0 → 9.0.0-alpha.2

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 (211) hide show
  1. package/README.md +31 -29
  2. package/assets/browser/favicon.svg +1 -0
  3. package/assets/browser/nunito-sans-bold-italic.woff2 +0 -0
  4. package/assets/browser/nunito-sans-bold.woff2 +0 -0
  5. package/assets/browser/nunito-sans-italic.woff2 +0 -0
  6. package/assets/browser/nunito-sans-regular.woff2 +0 -0
  7. package/assets/docs/message-reference.png +0 -0
  8. package/assets/server/addon.tsconfig.json +6 -0
  9. package/assets/server/base-preview-body.html +119 -0
  10. package/assets/server/base-preview-head.html +451 -0
  11. package/assets/server/template.ejs +87 -0
  12. package/bin/index.cjs +1 -1
  13. package/dist/babel/index.cjs +54034 -0
  14. package/dist/babel/index.d.ts +7488 -0
  15. package/dist/babel/index.js +54044 -0
  16. package/dist/bin/index.cjs +124 -0
  17. package/dist/bin/index.js +118 -0
  18. package/dist/builder-manager/index.cjs +2167 -0
  19. package/dist/builder-manager/index.d.ts +19 -0
  20. package/dist/builder-manager/index.js +2189 -0
  21. package/dist/channels/index.cjs +1938 -0
  22. package/dist/channels/index.d.ts +108 -0
  23. package/dist/channels/index.js +1885 -0
  24. package/dist/cli/bin/index.cjs +2687 -0
  25. package/dist/cli/bin/index.d.ts +2 -0
  26. package/dist/cli/bin/index.js +2707 -0
  27. package/dist/cli/index.cjs +17327 -0
  28. package/dist/cli/index.d.ts +209 -0
  29. package/dist/cli/index.js +17349 -0
  30. package/dist/client-logger/index.cjs +112 -0
  31. package/dist/client-logger/index.d.ts +29 -0
  32. package/dist/client-logger/index.js +70 -0
  33. package/dist/common/index.cjs +20558 -0
  34. package/dist/common/index.d.ts +955 -0
  35. package/dist/common/index.js +20643 -0
  36. package/dist/components/index.cjs +30056 -0
  37. package/dist/components/index.d.ts +1423 -0
  38. package/dist/components/index.js +25416 -0
  39. package/dist/core-events/index.cjs +167 -0
  40. package/dist/core-events/index.d.ts +313 -0
  41. package/dist/core-events/index.js +149 -0
  42. package/dist/core-server/index.cjs +37872 -0
  43. package/dist/core-server/index.d.ts +462 -0
  44. package/dist/core-server/index.js +37966 -0
  45. package/dist/core-server/presets/common-manager.js +28 -0
  46. package/dist/core-server/presets/common-override-preset.cjs +4824 -0
  47. package/dist/core-server/presets/common-override-preset.js +4829 -0
  48. package/dist/core-server/presets/common-preset.cjs +10228 -0
  49. package/dist/core-server/presets/common-preset.js +10306 -0
  50. package/dist/csf/index.cjs +223 -0
  51. package/dist/csf/index.d.ts +752 -0
  52. package/dist/csf/index.js +216 -0
  53. package/dist/csf-tools/index.cjs +1422 -0
  54. package/dist/csf-tools/index.d.ts +250 -0
  55. package/dist/csf-tools/index.js +1439 -0
  56. package/dist/docs-tools/index.cjs +923 -0
  57. package/dist/docs-tools/index.d.ts +162 -0
  58. package/dist/docs-tools/index.js +909 -0
  59. package/dist/index.cjs +17 -1
  60. package/dist/index.d.ts +1 -1
  61. package/dist/index.js +2 -7
  62. package/dist/instrumenter/index.cjs +3273 -0
  63. package/dist/instrumenter/index.d.ts +104 -0
  64. package/dist/instrumenter/index.js +4800 -0
  65. package/dist/manager/globals-module-info.cjs +666 -0
  66. package/dist/manager/globals-module-info.d.ts +36 -0
  67. package/dist/manager/globals-module-info.js +653 -0
  68. package/dist/manager/globals-runtime.js +41567 -0
  69. package/dist/manager/globals.cjs +43 -0
  70. package/dist/manager/globals.d.ts +21 -0
  71. package/dist/manager/globals.js +30 -0
  72. package/dist/manager/runtime.js +12043 -0
  73. package/dist/manager-api/index.cjs +10772 -0
  74. package/dist/manager-api/index.d.ts +1211 -0
  75. package/dist/manager-api/index.js +4547 -0
  76. package/dist/manager-errors.d.ts +65 -0
  77. package/dist/manager-errors.js +83 -0
  78. package/dist/node-logger/index.cjs +1642 -0
  79. package/dist/node-logger/index.d.ts +117 -0
  80. package/dist/node-logger/index.js +1652 -0
  81. package/dist/preview/globals.cjs +34 -0
  82. package/dist/preview/globals.d.ts +12 -0
  83. package/dist/preview/globals.js +21 -0
  84. package/dist/preview/runtime.js +7723 -0
  85. package/dist/preview-api/index.cjs +5658 -0
  86. package/dist/preview-api/index.d.ts +1356 -0
  87. package/dist/preview-api/index.js +5665 -0
  88. package/dist/preview-errors.cjs +486 -0
  89. package/dist/preview-errors.d.ts +188 -0
  90. package/dist/preview-errors.js +433 -0
  91. package/dist/router/index.cjs +3320 -0
  92. package/dist/router/index.d.ts +385 -0
  93. package/dist/router/index.js +1849 -0
  94. package/dist/server-errors.cjs +710 -0
  95. package/dist/server-errors.d.ts +272 -0
  96. package/dist/server-errors.js +711 -0
  97. package/dist/telemetry/index.cjs +3683 -0
  98. package/dist/telemetry/index.d.ts +112 -0
  99. package/dist/telemetry/index.js +3720 -0
  100. package/dist/theming/create.cjs +2422 -0
  101. package/dist/theming/create.d.ts +50 -0
  102. package/dist/theming/create.js +990 -0
  103. package/dist/theming/index.cjs +4832 -0
  104. package/dist/theming/index.d.ts +11939 -0
  105. package/dist/theming/index.js +3253 -0
  106. package/dist/types/index.cjs +27 -0
  107. package/dist/types/index.d.ts +2541 -0
  108. package/dist/types/index.js +7 -0
  109. package/package.json +308 -212
  110. package/.eslintrc.cjs +0 -31
  111. package/__mocks__/@aw-web-design/x-default-browser.js +0 -2
  112. package/core/babel/index.cjs +0 -1
  113. package/core/babel/index.d.ts +0 -2
  114. package/core/babel/index.js +0 -1
  115. package/core/builder-manager/index.cjs +0 -1
  116. package/core/builder-manager/index.d.ts +0 -2
  117. package/core/builder-manager/index.js +0 -1
  118. package/core/channels/index.cjs +0 -1
  119. package/core/channels/index.d.ts +0 -2
  120. package/core/channels/index.js +0 -1
  121. package/core/cli/bin/index.cjs +0 -1
  122. package/core/cli/bin/index.d.ts +0 -2
  123. package/core/cli/bin/index.js +0 -1
  124. package/core/cli/index.cjs +0 -1
  125. package/core/cli/index.d.ts +0 -2
  126. package/core/cli/index.js +0 -1
  127. package/core/client-logger/index.cjs +0 -1
  128. package/core/client-logger/index.d.ts +0 -2
  129. package/core/client-logger/index.js +0 -1
  130. package/core/common/index.cjs +0 -1
  131. package/core/common/index.d.ts +0 -2
  132. package/core/common/index.js +0 -1
  133. package/core/components/index.cjs +0 -1
  134. package/core/components/index.d.ts +0 -2
  135. package/core/components/index.js +0 -1
  136. package/core/core-events/index.cjs +0 -1
  137. package/core/core-events/index.d.ts +0 -2
  138. package/core/core-events/index.js +0 -1
  139. package/core/core-server/index.cjs +0 -1
  140. package/core/core-server/index.d.ts +0 -2
  141. package/core/core-server/index.js +0 -1
  142. package/core/core-server/presets/common-manager.js +0 -1
  143. package/core/core-server/presets/common-override-preset.cjs +0 -1
  144. package/core/core-server/presets/common-override-preset.js +0 -1
  145. package/core/core-server/presets/common-preset.cjs +0 -1
  146. package/core/core-server/presets/common-preset.js +0 -1
  147. package/core/csf/index.cjs +0 -1
  148. package/core/csf/index.d.ts +0 -2
  149. package/core/csf/index.js +0 -1
  150. package/core/csf-tools/index.cjs +0 -1
  151. package/core/csf-tools/index.d.ts +0 -2
  152. package/core/csf-tools/index.js +0 -1
  153. package/core/docs-tools/index.cjs +0 -1
  154. package/core/docs-tools/index.d.ts +0 -2
  155. package/core/docs-tools/index.js +0 -1
  156. package/core/index.cjs +0 -1
  157. package/core/index.d.ts +0 -2
  158. package/core/index.js +0 -1
  159. package/core/manager/globals-module-info.cjs +0 -1
  160. package/core/manager/globals-module-info.d.ts +0 -2
  161. package/core/manager/globals-module-info.js +0 -1
  162. package/core/manager/globals-runtime.js +0 -1
  163. package/core/manager/globals.cjs +0 -1
  164. package/core/manager/globals.d.ts +0 -2
  165. package/core/manager/globals.js +0 -1
  166. package/core/manager-api/index.cjs +0 -1
  167. package/core/manager-api/index.d.ts +0 -2
  168. package/core/manager-api/index.js +0 -1
  169. package/core/manager-errors.d.ts +0 -2
  170. package/core/manager-errors.js +0 -1
  171. package/core/node-logger/index.cjs +0 -1
  172. package/core/node-logger/index.d.ts +0 -2
  173. package/core/node-logger/index.js +0 -1
  174. package/core/preview/globals.cjs +0 -1
  175. package/core/preview/globals.d.ts +0 -2
  176. package/core/preview/globals.js +0 -1
  177. package/core/preview/runtime.js +0 -1
  178. package/core/preview-api/index.cjs +0 -1
  179. package/core/preview-api/index.d.ts +0 -2
  180. package/core/preview-api/index.js +0 -1
  181. package/core/preview-errors.cjs +0 -1
  182. package/core/preview-errors.d.ts +0 -2
  183. package/core/preview-errors.js +0 -1
  184. package/core/router/index.cjs +0 -1
  185. package/core/router/index.d.ts +0 -2
  186. package/core/router/index.js +0 -1
  187. package/core/server-errors.cjs +0 -1
  188. package/core/server-errors.d.ts +0 -2
  189. package/core/server-errors.js +0 -1
  190. package/core/telemetry/index.cjs +0 -1
  191. package/core/telemetry/index.d.ts +0 -2
  192. package/core/telemetry/index.js +0 -1
  193. package/core/theming/create.cjs +0 -1
  194. package/core/theming/create.d.ts +0 -2
  195. package/core/theming/create.js +0 -1
  196. package/core/theming/index.cjs +0 -1
  197. package/core/theming/index.d.ts +0 -2
  198. package/core/theming/index.js +0 -1
  199. package/core/types/index.cjs +0 -1
  200. package/core/types/index.d.ts +0 -2
  201. package/core/types/index.js +0 -1
  202. package/core.cjs +0 -0
  203. package/core.d.ts +0 -0
  204. package/core.js +0 -1
  205. package/dist/chunk-OWLSIX54.js +0 -8
  206. package/dist/core-path.cjs +0 -1
  207. package/dist/core-path.d.ts +0 -3
  208. package/dist/core-path.js +0 -9
  209. package/dist/proxy.cjs +0 -1
  210. package/dist/proxy.d.ts +0 -2
  211. package/dist/proxy.js +0 -9
package/README.md CHANGED
@@ -1,49 +1,51 @@
1
- # Storybook
1
+ # Storybook Core
2
2
 
3
- ## CLI
3
+ The `@storybook/core` package is the core of Storybook. It is responsible for the following:
4
4
 
5
- Storybook CLI (_Command Line Interface_) is the easiest way to add [Storybook](https://github.com/storybookjs/storybook) to your project.
5
+ - the main UI of storybook
6
+ - the UI used by addons
7
+ - the API used by addons
8
+ - the API used by the CLI
9
+ - the API used by the server
10
+ - prebundled code used by the browser
11
+ - static assets used by the browser
12
+ - utilities for CSF, MDX & Docs
6
13
 
7
- ![Screenshot](docs/getstorybook.png)
14
+ ## Private package
8
15
 
9
- Go to your project and run:
16
+ This package is not intended to be used by anyone but storybook internally.
10
17
 
11
- ```sh
12
- cd my-app
13
- npx sb@latest init
14
- ```
18
+ Even though this is where all of the code is located, it is NOT to be the entry point when using functionality within!
15
19
 
16
- In addition to `init`, the CLI also has other commands:
20
+ Consumers of the code should import like so:
17
21
 
18
- - `add` - add an addon and register it
19
- - `info` - print out system information for bug reports
20
- - `upgrade` - upgrade to the latest version of Storybook (or a specific version)
21
- - `migrate` - run codemods to migrate your code
22
+ ```ts
23
+ import { addons } from 'storybook/internal/manager-api';
24
+ ```
22
25
 
23
- See the command-line help with `-h` (including other useful commands) for details.
26
+ Importing from `@storybook/core` is explicitly NOT supported; it WILL break in a future version of storybook, very likely in a non-major version bump.
24
27
 
25
- ## Core APIs
28
+ # For maintainers
26
29
 
27
- This package has multiple sub-exports to can be used to gain access to storybook's APIs.
30
+ ## When to use `@storybook/core`
28
31
 
29
- ### `storybook/components`
32
+ In the following packages you should import from `@storybook/core` (and ONLY from `@storybook/core`):
30
33
 
31
- This export contains a list of components very useful for building out addons.
32
- We recommend addon-authors to use these components to ensure a consistent look and feel, and to reduce the amount of code they need to write.
34
+ - `@storybook/core`
35
+ - `@storybook/codemod`
33
36
 
34
- ### `storybook/theming`
37
+ To prevent cyclical dependencies, these packages cannot depend on the `storybook` package.
35
38
 
36
- This export exposes a few utility functions to help writing components that automatically adapt to the current theme.
37
- Useful for addon authors who want to make their addons theme-aware.
39
+ ## When to use `storybook/internal`
38
40
 
39
- ### `storybook/preview-api`
41
+ In every other package you should import from `storybook/internal` (and ONLY from `storybook/internal`).
40
42
 
41
- This export contains the API that is available in the preview iframe.
43
+ The heuristic is simple:
42
44
 
43
- ### `storybook/manager-api`
45
+ > If you see a peerDependency on `storybook` in the `package.json` of the package you are working on, you should import from `storybook/internal`.
44
46
 
45
- This export contains the API that is available in the manager iframe.
47
+ ## The 1 exception: the `storybook` package itself
46
48
 
47
- ### `storybook/types`
49
+ The sole exception is the `storybook` package itself.
48
50
 
49
- This export exposes a lot of TypeScript interfaces used throughout storybook, including for storybook configuration, addons etc.
51
+ Obviously, the `storybook` package cannot depend on itself, so it must import from `@storybook/core`.
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:svgjs="http://svgjs.com/svgjs" xmlns:xlink="http://www.w3.org/1999/xlink" width="164" height="164" version="1.1"><svg xmlns="http://www.w3.org/2000/svg" width="164" height="164" fill="none" viewBox="0 0 164 164"><path fill="#FF4785" d="M22.467 147.762 17.5 15.402a8.062 8.062 0 0 1 7.553-8.35L137.637.016a8.061 8.061 0 0 1 8.565 8.047v144.23a8.063 8.063 0 0 1-8.424 8.054l-107.615-4.833a8.062 8.062 0 0 1-7.695-7.752Z"/><path fill="#fff" fill-rule="evenodd" d="m128.785.57-15.495.968-.755 18.172a1.203 1.203 0 0 0 1.928 1.008l7.06-5.354 5.962 4.697a1.202 1.202 0 0 0 1.946-.987L128.785.569Zm-12.059 60.856c-2.836 2.203-23.965 3.707-23.965.57.447-11.969-4.912-12.494-7.889-12.494-2.828 0-7.59.855-7.59 7.267 0 6.534 6.96 10.223 15.13 14.553 11.607 6.15 25.654 13.594 25.654 32.326 0 17.953-14.588 27.871-33.194 27.871-19.201 0-35.981-7.769-34.086-34.702.744-3.163 25.156-2.411 25.156 0-.298 11.114 2.232 14.383 8.633 14.383 4.912 0 7.144-2.708 7.144-7.267 0-6.9-7.252-10.973-15.595-15.657C64.827 81.933 51.53 74.468 51.53 57.34c0-17.098 11.76-28.497 32.747-28.497 20.988 0 32.449 11.224 32.449 32.584Z" clip-rule="evenodd"/></svg><style>@media (prefers-color-scheme:light){:root{filter:none}}</style></svg>
@@ -0,0 +1,6 @@
1
+ {
2
+ "compilerOptions": {
3
+ "jsx": "react",
4
+ "jsxImportSource": "react"
5
+ }
6
+ }
@@ -0,0 +1,119 @@
1
+ <div class="sb-preparing-story sb-wrapper">
2
+ <div class="sb-loader"></div>
3
+ </div>
4
+
5
+ <div class="sb-preparing-docs sb-wrapper">
6
+ <div class="sb-previewBlock">
7
+ <div class="sb-previewBlock_header">
8
+ <div class="sb-previewBlock_icon"></div>
9
+ <div class="sb-previewBlock_icon"></div>
10
+ <div class="sb-previewBlock_icon"></div>
11
+ <div class="sb-previewBlock_icon"></div>
12
+ </div>
13
+ <div class="sb-previewBlock_body">
14
+ <div class="sb-loader"></div>
15
+ </div>
16
+ </div>
17
+ <table aria-hidden="true" class="sb-argstableBlock">
18
+ <thead class="sb-argstableBlock-head">
19
+ <tr>
20
+ <th><span>Name</span></th>
21
+ <th><span>Description</span></th>
22
+ <th><span>Default</span></th>
23
+ <th><span>Control </span></th>
24
+ </tr>
25
+ </thead>
26
+ <tbody class="sb-argstableBlock-body">
27
+ <tr>
28
+ <td><span>propertyName</span><span title="Required">*</span></td>
29
+ <td>
30
+ <div><span>This is a short description</span></div>
31
+ <div class="sb-argstableBlock-summary">
32
+ <div><span class="sb-argstableBlock-code">summary</span></div>
33
+ </div>
34
+ </td>
35
+ <td>
36
+ <div><span class="sb-argstableBlock-code">defaultValue</span></div>
37
+ </td>
38
+ <td><button>Set string</button></td>
39
+ </tr>
40
+ <tr>
41
+ <td><span>propertyName</span><span>*</span></td>
42
+ <td>
43
+ <div><span>This is a short description</span></div>
44
+ <div class="sb-argstableBlock-summary">
45
+ <div><span class="sb-argstableBlock-code">summary</span></div>
46
+ </div>
47
+ </td>
48
+ <td>
49
+ <div><span class="sb-argstableBlock-code">defaultValue</span></div>
50
+ </td>
51
+ <td><button>Set string</button></td>
52
+ </tr>
53
+ <tr>
54
+ <td><span>propertyName</span><span>*</span></td>
55
+ <td>
56
+ <div><span>This is a short description</span></div>
57
+ <div class="sb-argstableBlock-summary">
58
+ <div><span class="sb-argstableBlock-code">summary</span></div>
59
+ </div>
60
+ </td>
61
+ <td>
62
+ <div><span class="sb-argstableBlock-code">defaultValue</span></div>
63
+ </td>
64
+ <td><button>Set string</button></td>
65
+ </tr>
66
+ </tbody>
67
+ </table>
68
+ </div>
69
+
70
+ <div class="sb-nopreview sb-wrapper">
71
+ <div class="sb-nopreview_main">
72
+ <h1 class="sb-nopreview_heading sb-heading">No Preview</h1>
73
+ <p>Sorry, but you either have no stories or none are selected somehow.</p>
74
+ <ul>
75
+ <li>Please check the Storybook config.</li>
76
+ <li>Try reloading the page.</li>
77
+ </ul>
78
+ <p>
79
+ If the problem persists, check the browser console, or the terminal you've run Storybook from.
80
+ </p>
81
+ </div>
82
+ </div>
83
+
84
+ <div class="sb-errordisplay sb-wrapper">
85
+ <div class="sb-errordisplay_main">
86
+ <h1 id="error-message"></h1>
87
+ <p>
88
+ The component failed to render properly, likely due to a configuration issue in Storybook.
89
+ Here are some common causes and how you can address them:
90
+ </p>
91
+ <ol>
92
+ <li>
93
+ <strong>Missing Context/Providers</strong>: You can use decorators to supply specific
94
+ contexts or providers, which are sometimes necessary for components to render correctly. For
95
+ detailed instructions on using decorators, please visit the
96
+ <a href="https://storybook.js.org/docs/writing-stories/decorators"
97
+ >Decorators documentation</a
98
+ >.
99
+ </li>
100
+ <li>
101
+ <strong>Misconfigured Webpack or Vite</strong>: Verify that Storybook picks up all necessary
102
+ settings for loaders, plugins, and other relevant parameters. You can find step-by-step
103
+ guides for configuring
104
+ <a href="https://storybook.js.org/docs/builders/webpack">Webpack</a> or
105
+ <a href="https://storybook.js.org/docs/builders/vite">Vite</a>
106
+ with Storybook.
107
+ </li>
108
+ <li>
109
+ <strong>Missing Environment Variables</strong>: Your Storybook may require specific
110
+ environment variables to function as intended. You can set up custom environment variables
111
+ as outlined in the
112
+ <a href="https://storybook.js.org/docs/configure/environment-variables"
113
+ >Environment Variables documentation</a
114
+ >.
115
+ </li>
116
+ </ol>
117
+ <pre class="sb-errordisplay_code"><code id="error-stack"></code></pre>
118
+ </div>
119
+ </div>
@@ -0,0 +1,451 @@
1
+ <base target="_parent" />
2
+
3
+ <style>
4
+ /* While we aren't showing the main block yet, but still preparing, we want everything the user
5
+ has rendered, which may or may not be in #storybook-root, to be display none */
6
+ .sb-show-preparing-story:not(.sb-show-main) > :not(.sb-preparing-story) {
7
+ display: none;
8
+ }
9
+
10
+ .sb-show-preparing-docs:not(.sb-show-main) > :not(.sb-preparing-docs) {
11
+ display: none;
12
+ }
13
+
14
+ /* Hide our own blocks when we aren't supposed to be showing them */
15
+ :not(.sb-show-preparing-story) > .sb-preparing-story,
16
+ :not(.sb-show-preparing-docs) > .sb-preparing-docs,
17
+ :not(.sb-show-nopreview) > .sb-nopreview,
18
+ :not(.sb-show-errordisplay) > .sb-errordisplay {
19
+ display: none;
20
+ }
21
+
22
+ .sb-show-main.sb-main-centered {
23
+ margin: 0;
24
+ display: flex;
25
+ align-items: center;
26
+ min-height: 100vh;
27
+ }
28
+
29
+ .sb-show-main.sb-main-centered #storybook-root {
30
+ box-sizing: border-box;
31
+ margin: auto;
32
+ padding: 1rem;
33
+ max-height: 100%;
34
+ /* Hack for centering correctly in IE11 */
35
+ }
36
+
37
+ /* Vertical centering fix for IE11 */
38
+ @media screen and (-ms-high-contrast: none), (-ms-high-contrast: active) {
39
+ .sb-show-main.sb-main-centered:after {
40
+ content: '';
41
+ min-height: inherit;
42
+ font-size: 0;
43
+ }
44
+ }
45
+
46
+ .sb-show-main.sb-main-fullscreen {
47
+ margin: 0;
48
+ padding: 0;
49
+ display: block;
50
+ }
51
+
52
+ .sb-show-main.sb-main-padded {
53
+ margin: 0;
54
+ padding: 1rem;
55
+ display: block;
56
+ box-sizing: border-box;
57
+ }
58
+
59
+ .sb-wrapper {
60
+ position: fixed;
61
+ top: 0;
62
+ bottom: 0;
63
+ left: 0;
64
+ right: 0;
65
+ box-sizing: border-box;
66
+
67
+ padding: 40px;
68
+ font-family:
69
+ 'Nunito Sans',
70
+ -apple-system,
71
+ '.SFNSText-Regular',
72
+ 'San Francisco',
73
+ BlinkMacSystemFont,
74
+ 'Segoe UI',
75
+ 'Helvetica Neue',
76
+ Helvetica,
77
+ Arial,
78
+ sans-serif;
79
+ -webkit-font-smoothing: antialiased;
80
+ overflow: auto;
81
+ }
82
+
83
+ @media (max-width: 700px) {
84
+ .sb-wrapper {
85
+ padding: 20px;
86
+ }
87
+ }
88
+
89
+ @media (max-width: 500px) {
90
+ .sb-wrapper {
91
+ padding: 10px;
92
+ }
93
+ }
94
+
95
+ .sb-heading {
96
+ font-size: 14px;
97
+ font-weight: 600;
98
+ letter-spacing: 0.2px;
99
+ margin: 10px 0;
100
+ padding-right: 25px;
101
+ }
102
+
103
+ .sb-nopreview {
104
+ display: flex;
105
+ align-content: center;
106
+ justify-content: center;
107
+ box-sizing: border-box;
108
+ }
109
+
110
+ .sb-nopreview_main {
111
+ margin: auto;
112
+ padding: 30px;
113
+ border-radius: 10px;
114
+ background: rgba(0, 0, 0, 0.03);
115
+ }
116
+
117
+ .sb-nopreview_heading {
118
+ text-align: center;
119
+ }
120
+
121
+ .sb-errordisplay {
122
+ background: #f6f9fc;
123
+ color: black;
124
+ z-index: 999999;
125
+ width: 100vw;
126
+ min-height: 100vh;
127
+ box-sizing: border-box;
128
+
129
+ & ol {
130
+ padding-left: 18px;
131
+ margin: 0;
132
+ }
133
+
134
+ & h1 {
135
+ font-family: Nunito Sans;
136
+ font-size: 22px;
137
+ font-weight: 400;
138
+ line-height: 30px;
139
+ font-weight: normal;
140
+ margin: 0;
141
+
142
+ &::before {
143
+ content: '';
144
+ display: inline-block;
145
+ width: 12px;
146
+ height: 12px;
147
+ background: #ff4400;
148
+ border-radius: 50%;
149
+ margin-right: 8px;
150
+ }
151
+ }
152
+
153
+ & p,
154
+ & ol {
155
+ font-family: Nunito Sans;
156
+ font-size: 14px;
157
+ font-weight: 400;
158
+ line-height: 19px;
159
+ margin: 0;
160
+ }
161
+
162
+ & li + li {
163
+ margin: 0;
164
+ padding: 0;
165
+ padding-top: 12px;
166
+ }
167
+
168
+ & a {
169
+ color: currentColor;
170
+ }
171
+ }
172
+
173
+ .sb-errordisplay_main {
174
+ margin: auto;
175
+ padding: 24px;
176
+ display: flex;
177
+ box-sizing: border-box;
178
+
179
+ flex-direction: column;
180
+ min-height: 100%;
181
+ width: 100%;
182
+ border-radius: 6px;
183
+ background: white;
184
+ border: 1px solid #ff0000;
185
+ box-shadow: 0 0 64px rgba(0, 0, 0, 0.1);
186
+ gap: 24px;
187
+ }
188
+
189
+ .sb-errordisplay_code {
190
+ padding: 10px;
191
+ flex: 1;
192
+ background: #242424;
193
+ color: #c6c6c6;
194
+ box-sizing: border-box;
195
+
196
+ font-size: 14px;
197
+ font-weight: 400;
198
+ line-height: 19px;
199
+ border-radius: 4px;
200
+
201
+ font-family: 'Operator Mono', 'Fira Code Retina', 'Fira Code', 'FiraCode-Retina', 'Andale Mono',
202
+ 'Lucida Console', Consolas, Monaco, monospace;
203
+ margin: 0;
204
+ overflow: auto;
205
+ }
206
+
207
+ .sb-errordisplay pre {
208
+ white-space: pre-wrap;
209
+ white-space: revert;
210
+ }
211
+
212
+ @-webkit-keyframes sb-rotate360 {
213
+ from {
214
+ transform: rotate(0deg);
215
+ }
216
+
217
+ to {
218
+ transform: rotate(360deg);
219
+ }
220
+ }
221
+
222
+ @keyframes sb-rotate360 {
223
+ from {
224
+ transform: rotate(0deg);
225
+ }
226
+
227
+ to {
228
+ transform: rotate(360deg);
229
+ }
230
+ }
231
+
232
+ @-webkit-keyframes sb-glow {
233
+ 0%,
234
+ 100% {
235
+ opacity: 1;
236
+ }
237
+
238
+ 50% {
239
+ opacity: 0.4;
240
+ }
241
+ }
242
+
243
+ @keyframes sb-glow {
244
+ 0%,
245
+ 100% {
246
+ opacity: 1;
247
+ }
248
+
249
+ 50% {
250
+ opacity: 0.4;
251
+ }
252
+ }
253
+
254
+ /* We display the preparing loaders *over* the rendering story */
255
+ .sb-preparing-story,
256
+ .sb-preparing-docs {
257
+ background-color: white;
258
+ /* Maximum possible z-index. It would be better to use stacking contexts to ensure it's always
259
+ on top, but this isn't possible as it would require making CSS changes that could affect user code */
260
+ z-index: 2147483647;
261
+ }
262
+
263
+ .sb-loader {
264
+ -webkit-animation: sb-rotate360 0.7s linear infinite;
265
+ animation: sb-rotate360 0.7s linear infinite;
266
+ border-color: rgba(97, 97, 97, 0.29);
267
+ border-radius: 50%;
268
+ border-style: solid;
269
+ border-top-color: #646464;
270
+ border-width: 2px;
271
+ display: inline-block;
272
+ height: 32px;
273
+ left: 50%;
274
+ margin-left: -16px;
275
+ margin-top: -16px;
276
+ mix-blend-mode: difference;
277
+ overflow: hidden;
278
+ position: absolute;
279
+ top: 50%;
280
+ transition: all 200ms ease-out;
281
+ vertical-align: top;
282
+ width: 32px;
283
+ z-index: 4;
284
+ }
285
+
286
+ .sb-previewBlock {
287
+ background: #fff;
288
+ border: 1px solid rgba(0, 0, 0, 0.1);
289
+ border-radius: 4px;
290
+ box-shadow: rgba(0, 0, 0, 0.1) 0 1px 3px 0;
291
+ margin: 25px auto 40px;
292
+ max-width: 600px;
293
+ }
294
+
295
+ .sb-previewBlock_header {
296
+ align-items: center;
297
+ box-shadow: rgba(0, 0, 0, 0.1) 0 -1px 0 0 inset;
298
+ display: flex;
299
+ gap: 14px;
300
+ height: 40px;
301
+ padding: 0 12px;
302
+ }
303
+
304
+ .sb-previewBlock_icon {
305
+ -webkit-animation: sb-glow 1.5s ease-in-out infinite;
306
+ animation: sb-glow 1.5s ease-in-out infinite;
307
+ background: #e6e6e6;
308
+ height: 14px;
309
+ width: 14px;
310
+ }
311
+
312
+ .sb-previewBlock_icon:last-child {
313
+ margin-left: auto;
314
+ }
315
+
316
+ .sb-previewBlock_body {
317
+ -webkit-animation: sb-glow 1.5s ease-in-out infinite;
318
+ animation: sb-glow 1.5s ease-in-out infinite;
319
+ height: 182px;
320
+ position: relative;
321
+ }
322
+
323
+ .sb-argstableBlock {
324
+ border-collapse: collapse;
325
+ border-spacing: 0;
326
+ font-size: 13px;
327
+ line-height: 20px;
328
+ margin: 25px auto 40px;
329
+ max-width: 600px;
330
+ text-align: left;
331
+ width: 100%;
332
+ }
333
+
334
+ .sb-argstableBlock th:first-of-type,
335
+ .sb-argstableBlock td:first-of-type {
336
+ padding-left: 20px;
337
+ }
338
+
339
+ .sb-argstableBlock th:nth-of-type(2),
340
+ .sb-argstableBlock td:nth-of-type(2) {
341
+ width: 35%;
342
+ }
343
+
344
+ .sb-argstableBlock th:nth-of-type(3),
345
+ .sb-argstableBlock td:nth-of-type(3) {
346
+ width: 15%;
347
+ }
348
+
349
+ .sb-argstableBlock th:last-of-type,
350
+ .sb-argstableBlock td:last-of-type {
351
+ width: 25%;
352
+ padding-right: 20px;
353
+ }
354
+
355
+ .sb-argstableBlock th span,
356
+ .sb-argstableBlock td span {
357
+ -webkit-animation: sb-glow 1.5s ease-in-out infinite;
358
+ animation: sb-glow 1.5s ease-in-out infinite;
359
+ background-color: rgba(0, 0, 0, 0.1);
360
+ border-radius: 0;
361
+ box-shadow: none;
362
+ color: transparent;
363
+ }
364
+
365
+ .sb-argstableBlock th {
366
+ padding: 10px 15px;
367
+ }
368
+
369
+ .sb-argstableBlock-body {
370
+ border-radius: 4px;
371
+ box-shadow:
372
+ rgba(0, 0, 0, 0.1) 0 1px 3px 1px,
373
+ rgba(0, 0, 0, 0.065) 0 0 0 1px;
374
+ }
375
+
376
+ .sb-argstableBlock-body tr {
377
+ background: transparent;
378
+ overflow: hidden;
379
+ }
380
+
381
+ .sb-argstableBlock-body tr:not(:first-child) {
382
+ border-top: 1px solid #e6e6e6;
383
+ }
384
+
385
+ .sb-argstableBlock-body tr:first-child td:first-child {
386
+ border-top-left-radius: 4px;
387
+ }
388
+
389
+ .sb-argstableBlock-body tr:first-child td:last-child {
390
+ border-top-right-radius: 4px;
391
+ }
392
+
393
+ .sb-argstableBlock-body tr:last-child td:first-child {
394
+ border-bottom-left-radius: 4px;
395
+ }
396
+
397
+ .sb-argstableBlock-body tr:last-child td:last-child {
398
+ border-bottom-right-radius: 4px;
399
+ }
400
+
401
+ .sb-argstableBlock-body td {
402
+ background: #fff;
403
+ padding-bottom: 10px;
404
+ padding-top: 10px;
405
+ vertical-align: top;
406
+ }
407
+
408
+ .sb-argstableBlock-body td:not(:first-of-type) {
409
+ padding-left: 15px;
410
+ padding-right: 15px;
411
+ }
412
+
413
+ .sb-argstableBlock-body button {
414
+ -webkit-animation: sb-glow 1.5s ease-in-out infinite;
415
+ animation: sb-glow 1.5s ease-in-out infinite;
416
+ background-color: rgba(0, 0, 0, 0.1);
417
+ border: 0;
418
+ border-radius: 0;
419
+ box-shadow: none;
420
+ color: transparent;
421
+ display: inline;
422
+ font-size: 12px;
423
+ line-height: 1;
424
+ padding: 10px 16px;
425
+ }
426
+
427
+ .sb-argstableBlock-summary {
428
+ margin-top: 4px;
429
+ }
430
+
431
+ .sb-argstableBlock-code {
432
+ margin-right: 4px;
433
+ margin-bottom: 4px;
434
+ padding: 2px 5px;
435
+ }
436
+ </style>
437
+
438
+ <script>
439
+ /* globals window */
440
+ /* eslint-disable no-underscore-dangle */
441
+ try {
442
+ if (window.top !== window) {
443
+ window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.top.__REACT_DEVTOOLS_GLOBAL_HOOK__;
444
+ window.__VUE_DEVTOOLS_GLOBAL_HOOK__ = window.top.__VUE_DEVTOOLS_GLOBAL_HOOK__;
445
+ window.top.__VUE_DEVTOOLS_CONTEXT__ = window.document;
446
+ }
447
+ } catch (e) {
448
+ // eslint-disable-next-line no-console
449
+ console.warn('unable to connect to top frame for connecting dev tools');
450
+ }
451
+ </script>