storybook 9.0.0-alpha.2 → 9.0.0-alpha.4

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 (79) hide show
  1. package/README.md +1 -1
  2. package/dist/actions/decorator.d.ts +6 -0
  3. package/dist/actions/decorator.js +139 -0
  4. package/dist/actions/index.cjs +127 -0
  5. package/dist/actions/index.d.ts +105 -0
  6. package/dist/actions/index.js +112 -0
  7. package/dist/actions/manager.js +1196 -0
  8. package/dist/actions/preview.cjs +165 -0
  9. package/dist/actions/preview.d.ts +55 -0
  10. package/dist/actions/preview.js +156 -0
  11. package/dist/bin/index.cjs +63 -65
  12. package/dist/bin/index.js +63 -65
  13. package/dist/channels/index.cjs +209 -234
  14. package/dist/channels/index.js +304 -308
  15. package/dist/cli/bin/index.cjs +409 -409
  16. package/dist/cli/bin/index.js +414 -414
  17. package/dist/cli/index.cjs +1 -1
  18. package/dist/cli/index.d.ts +2 -2
  19. package/dist/cli/index.js +1 -1
  20. package/dist/client-logger/index.cjs +56 -88
  21. package/dist/client-logger/index.js +41 -47
  22. package/dist/common/index.cjs +148 -148
  23. package/dist/common/index.d.ts +1 -5
  24. package/dist/common/index.js +171 -171
  25. package/dist/components/index.cjs +9413 -11578
  26. package/dist/components/index.d.ts +92 -92
  27. package/dist/components/index.js +6768 -7544
  28. package/dist/core-events/index.d.ts +138 -25
  29. package/dist/core-server/index.cjs +5244 -5270
  30. package/dist/core-server/index.d.ts +1 -1
  31. package/dist/core-server/index.js +5356 -5380
  32. package/dist/core-server/presets/common-manager.js +11 -19
  33. package/dist/core-server/presets/common-preset.cjs +243 -242
  34. package/dist/core-server/presets/common-preset.js +379 -378
  35. package/dist/csf/index.cjs +76 -120
  36. package/dist/csf/index.d.ts +1 -3
  37. package/dist/csf/index.js +69 -113
  38. package/dist/docs-tools/index.cjs +1 -1
  39. package/dist/docs-tools/index.d.ts +2 -2
  40. package/dist/docs-tools/index.js +1 -1
  41. package/dist/instrumenter/index.cjs +1260 -1289
  42. package/dist/instrumenter/index.js +1344 -1348
  43. package/dist/manager/globals-module-info.cjs +272 -135
  44. package/dist/manager/globals-module-info.d.ts +1 -1
  45. package/dist/manager/globals-module-info.js +257 -120
  46. package/dist/manager/globals-runtime.js +59553 -22373
  47. package/dist/manager/globals.cjs +23 -19
  48. package/dist/manager/globals.d.ts +8 -5
  49. package/dist/manager/globals.js +10 -6
  50. package/dist/manager/runtime.js +129 -129
  51. package/dist/manager-api/index.cjs +1184 -1209
  52. package/dist/manager-api/index.d.ts +3 -3
  53. package/dist/manager-api/index.js +1012 -1012
  54. package/dist/preview/globals.cjs +21 -17
  55. package/dist/preview/globals.d.ts +4 -1
  56. package/dist/preview/globals.js +6 -2
  57. package/dist/preview/runtime.js +43946 -6548
  58. package/dist/preview-api/index.cjs +1245 -1243
  59. package/dist/preview-api/index.d.ts +105 -61
  60. package/dist/preview-api/index.js +1311 -1273
  61. package/dist/preview-errors.cjs +1 -1
  62. package/dist/preview-errors.js +1 -1
  63. package/dist/router/index.cjs +847 -871
  64. package/dist/router/index.js +193 -199
  65. package/dist/test/index.cjs +34778 -0
  66. package/dist/test/index.d.ts +186 -0
  67. package/dist/test/index.js +32916 -0
  68. package/dist/test/preview.cjs +15870 -0
  69. package/dist/test/preview.d.ts +54 -0
  70. package/dist/test/preview.js +14441 -0
  71. package/dist/test/spy.cjs +258 -0
  72. package/dist/test/spy.d.ts +66 -0
  73. package/dist/test/spy.js +240 -0
  74. package/dist/theming/create.cjs +79 -2269
  75. package/dist/theming/create.js +67 -841
  76. package/dist/theming/index.cjs +1065 -3232
  77. package/dist/theming/index.js +951 -1719
  78. package/dist/types/index.d.ts +242 -242
  79. package/package.json +155 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook",
3
- "version": "9.0.0-alpha.2",
3
+ "version": "9.0.0-alpha.4",
4
4
  "description": "Storybook framework-agnostic API",
5
5
  "keywords": [
6
6
  "storybook"
@@ -21,6 +21,12 @@
21
21
  "license": "MIT",
22
22
  "sideEffects": false,
23
23
  "type": "module",
24
+ "imports": {
25
+ "#utils": {
26
+ "storybook": "./template/stories/utils.mock.ts",
27
+ "default": "./template/stories/utils.ts"
28
+ }
29
+ },
24
30
  "exports": {
25
31
  ".": {
26
32
  "types": "./dist/index.d.ts",
@@ -42,11 +48,21 @@
42
48
  "import": "./dist/theming/index.js",
43
49
  "require": "./dist/theming/index.cjs"
44
50
  },
51
+ "./theming": {
52
+ "types": "./dist/theming/index.d.ts",
53
+ "import": "./dist/theming/index.js",
54
+ "require": "./dist/theming/index.cjs"
55
+ },
45
56
  "./internal/theming/create": {
46
57
  "types": "./dist/theming/create.d.ts",
47
58
  "import": "./dist/theming/create.js",
48
59
  "require": "./dist/theming/create.cjs"
49
60
  },
61
+ "./theming/create": {
62
+ "types": "./dist/theming/create.d.ts",
63
+ "import": "./dist/theming/create.js",
64
+ "require": "./dist/theming/create.cjs"
65
+ },
50
66
  "./internal/core-server": {
51
67
  "types": "./dist/core-server/index.d.ts",
52
68
  "import": "./dist/core-server/index.js",
@@ -63,6 +79,40 @@
63
79
  "import": "./dist/core-server/presets/common-override-preset.js",
64
80
  "require": "./dist/core-server/presets/common-override-preset.cjs"
65
81
  },
82
+ "./internal/actions": {
83
+ "types": "./dist/actions/index.d.ts",
84
+ "import": "./dist/actions/index.js",
85
+ "require": "./dist/actions/index.cjs"
86
+ },
87
+ "./actions": {
88
+ "types": "./dist/actions/index.d.ts",
89
+ "import": "./dist/actions/index.js",
90
+ "require": "./dist/actions/index.cjs"
91
+ },
92
+ "./internal/actions/preview": {
93
+ "types": "./dist/actions/preview.d.ts",
94
+ "import": "./dist/actions/preview.js",
95
+ "require": "./dist/actions/preview.cjs"
96
+ },
97
+ "./actions/preview": {
98
+ "types": "./dist/actions/preview.d.ts",
99
+ "import": "./dist/actions/preview.js",
100
+ "require": "./dist/actions/preview.cjs"
101
+ },
102
+ "./internal/actions/manager": {
103
+ "import": "./dist/actions/manager.js"
104
+ },
105
+ "./actions/manager": {
106
+ "import": "./dist/actions/manager.js"
107
+ },
108
+ "./internal/actions/decorator": {
109
+ "types": "./dist/actions/decorator.d.ts",
110
+ "import": "./dist/actions/decorator.js"
111
+ },
112
+ "./actions/decorator": {
113
+ "types": "./dist/actions/decorator.d.ts",
114
+ "import": "./dist/actions/decorator.js"
115
+ },
66
116
  "./internal/core-events": {
67
117
  "types": "./dist/core-events/index.d.ts",
68
118
  "import": "./dist/core-events/index.js",
@@ -122,11 +172,21 @@
122
172
  "import": "./dist/preview-api/index.js",
123
173
  "require": "./dist/preview-api/index.cjs"
124
174
  },
175
+ "./preview-api": {
176
+ "types": "./dist/preview-api/index.d.ts",
177
+ "import": "./dist/preview-api/index.js",
178
+ "require": "./dist/preview-api/index.cjs"
179
+ },
125
180
  "./internal/manager-api": {
126
181
  "types": "./dist/manager-api/index.d.ts",
127
182
  "import": "./dist/manager-api/index.js",
128
183
  "require": "./dist/manager-api/index.cjs"
129
184
  },
185
+ "./manager-api": {
186
+ "types": "./dist/manager-api/index.d.ts",
187
+ "import": "./dist/manager-api/index.js",
188
+ "require": "./dist/manager-api/index.cjs"
189
+ },
130
190
  "./internal/router": {
131
191
  "types": "./dist/router/index.d.ts",
132
192
  "import": "./dist/router/index.js",
@@ -181,6 +241,36 @@
181
241
  "import": "./dist/instrumenter/index.js",
182
242
  "require": "./dist/instrumenter/index.cjs"
183
243
  },
244
+ "./internal/test/preview": {
245
+ "types": "./dist/test/preview.d.ts",
246
+ "import": "./dist/test/preview.js",
247
+ "require": "./dist/test/preview.cjs"
248
+ },
249
+ "./test/preview": {
250
+ "types": "./dist/test/preview.d.ts",
251
+ "import": "./dist/test/preview.js",
252
+ "require": "./dist/test/preview.cjs"
253
+ },
254
+ "./internal/test/spy": {
255
+ "types": "./dist/test/spy.d.ts",
256
+ "import": "./dist/test/spy.js",
257
+ "require": "./dist/test/spy.cjs"
258
+ },
259
+ "./test/spy": {
260
+ "types": "./dist/test/spy.d.ts",
261
+ "import": "./dist/test/spy.js",
262
+ "require": "./dist/test/spy.cjs"
263
+ },
264
+ "./internal/test": {
265
+ "types": "./dist/test/index.d.ts",
266
+ "import": "./dist/test/index.js",
267
+ "require": "./dist/test/index.cjs"
268
+ },
269
+ "./test": {
270
+ "types": "./dist/test/index.d.ts",
271
+ "import": "./dist/test/index.js",
272
+ "require": "./dist/test/index.cjs"
273
+ },
184
274
  "./internal/preview/runtime": {
185
275
  "import": "./dist/preview/runtime.js"
186
276
  },
@@ -206,12 +296,36 @@
206
296
  "internal/theming": [
207
297
  "./dist/theming/index.d.ts"
208
298
  ],
299
+ "theming": [
300
+ "./dist/theming/index.d.ts"
301
+ ],
209
302
  "internal/theming/create": [
210
303
  "./dist/theming/create.d.ts"
211
304
  ],
305
+ "theming/create": [
306
+ "./dist/theming/create.d.ts"
307
+ ],
212
308
  "internal/core-server": [
213
309
  "./dist/core-server/index.d.ts"
214
310
  ],
311
+ "internal/actions": [
312
+ "./dist/actions/index.d.ts"
313
+ ],
314
+ "actions": [
315
+ "./dist/actions/index.d.ts"
316
+ ],
317
+ "internal/actions/preview": [
318
+ "./dist/actions/preview.d.ts"
319
+ ],
320
+ "actions/preview": [
321
+ "./dist/actions/preview.d.ts"
322
+ ],
323
+ "internal/actions/decorator": [
324
+ "./dist/actions/decorator.d.ts"
325
+ ],
326
+ "actions/decorator": [
327
+ "./dist/actions/decorator.d.ts"
328
+ ],
215
329
  "internal/core-events": [
216
330
  "./dist/core-events/index.d.ts"
217
331
  ],
@@ -248,9 +362,15 @@
248
362
  "internal/preview-api": [
249
363
  "./dist/preview-api/index.d.ts"
250
364
  ],
365
+ "preview-api": [
366
+ "./dist/preview-api/index.d.ts"
367
+ ],
251
368
  "internal/manager-api": [
252
369
  "./dist/manager-api/index.d.ts"
253
370
  ],
371
+ "manager-api": [
372
+ "./dist/manager-api/index.d.ts"
373
+ ],
254
374
  "internal/router": [
255
375
  "./dist/router/index.d.ts"
256
376
  ],
@@ -280,6 +400,24 @@
280
400
  ],
281
401
  "internal/instrumenter": [
282
402
  "./dist/instrumenter/index.d.ts"
403
+ ],
404
+ "internal/test/preview": [
405
+ "./dist/test/preview.d.ts"
406
+ ],
407
+ "test/preview": [
408
+ "./dist/test/preview.d.ts"
409
+ ],
410
+ "internal/test/spy": [
411
+ "./dist/test/spy.d.ts"
412
+ ],
413
+ "test/spy": [
414
+ "./dist/test/spy.d.ts"
415
+ ],
416
+ "internal/test": [
417
+ "./dist/test/index.d.ts"
418
+ ],
419
+ "test": [
420
+ "./dist/test/index.d.ts"
283
421
  ]
284
422
  }
285
423
  },
@@ -294,16 +432,28 @@
294
432
  "check": "jiti ./scripts/check.ts",
295
433
  "prep": "jiti ./scripts/prep.ts"
296
434
  },
435
+ "resolutions": {
436
+ "@testing-library/user-event": "patch:@testing-library/user-event@npm%3A14.6.1#~/../.yarn/patches/@testing-library-user-event-npm-14.6.1-5da7e1d4e2.patch"
437
+ },
297
438
  "dependencies": {
439
+ "@storybook/global": "^5.0.0",
440
+ "@testing-library/dom": "10.4.0",
441
+ "@testing-library/jest-dom": "^6.6.3",
442
+ "@testing-library/user-event": "^14.6.1",
443
+ "@types/uuid": "^9.0.1",
444
+ "@vitest/expect": "2.0.5",
445
+ "@vitest/spy": "2.0.5",
298
446
  "better-opn": "^3.0.2",
299
447
  "browser-assert": "^1.2.1",
300
448
  "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",
301
449
  "esbuild-register": "^3.5.0",
302
450
  "jsdoc-type-pratt-parser": "^4.0.0",
451
+ "polished": "^4.2.2",
303
452
  "process": "^0.11.10",
304
453
  "recast": "^0.23.5",
305
454
  "semver": "^7.6.2",
306
455
  "util": "^0.12.5",
456
+ "uuid": "^9.0.0",
307
457
  "ws": "^8.18.0"
308
458
  },
309
459
  "devDependencies": {
@@ -329,7 +479,6 @@
329
479
  "@radix-ui/react-scroll-area": "1.2.0-rc.7",
330
480
  "@radix-ui/react-slot": "^1.0.2",
331
481
  "@storybook/docs-mdx": "4.0.0-next.1",
332
- "@storybook/global": "^5.0.0",
333
482
  "@storybook/icons": "^1.3.2",
334
483
  "@tanstack/react-virtual": "^3.3.0",
335
484
  "@testing-library/react": "^14.0.0",
@@ -358,7 +507,9 @@
358
507
  "babel-plugin-react-docgen": "4.2.1",
359
508
  "boxen": "^7.1.1",
360
509
  "browser-dtector": "^3.4.0",
510
+ "bundle-require": "^5.1.0",
361
511
  "camelcase": "^8.0.0",
512
+ "chai": "^5.1.1",
362
513
  "cli-table3": "^0.6.1",
363
514
  "commander": "^12.1.0",
364
515
  "comment-parser": "^1.4.1",
@@ -408,6 +559,7 @@
408
559
  "react-dom": "^18.2.0",
409
560
  "react-draggable": "^4.4.5",
410
561
  "react-helmet-async": "^1.3.0",
562
+ "react-inspector": "^6.0.0",
411
563
  "react-popper-tooltip": "^4.4.2",
412
564
  "react-resize-detector": "^7.1.2",
413
565
  "react-router-dom": "6.0.2",
@@ -423,7 +575,7 @@
423
575
  "strip-json-comments": "^5.0.1",
424
576
  "telejson": "^7.2.0",
425
577
  "tiny-invariant": "^1.3.1",
426
- "tinyspy": "^2.2.0",
578
+ "tinyspy": "^3.0.2",
427
579
  "ts-dedent": "^2.0.0",
428
580
  "tsconfig-paths": "^4.2.0",
429
581
  "type-fest": "^4.18.1",