storybook 10.2.0-alpha.6 → 10.2.0-alpha.8

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 (67) hide show
  1. package/dist/_browser-chunks/{chunk-UXVP56J6.js → chunk-POMIZRJL.js} +1 -1
  2. package/dist/_browser-chunks/{chunk-KTOLYKZY.js → chunk-VUZYLZ4B.js} +6 -6
  3. package/dist/_node-chunks/{builder-manager-SRWOH6O7.js → builder-manager-2XASU3VS.js} +12 -12
  4. package/dist/_node-chunks/{camelcase-IPCCDY4U.js → camelcase-KIWRHB2G.js} +7 -7
  5. package/dist/_node-chunks/chunk-2ANLCK4Y.js +18 -0
  6. package/dist/_node-chunks/{chunk-T53OKK5L.js → chunk-2KSITKBI.js} +7 -7
  7. package/dist/_node-chunks/{chunk-RMPSZ2MA.js → chunk-2OC7H5MZ.js} +7 -7
  8. package/dist/_node-chunks/{chunk-5UF6URLY.js → chunk-3K6P75SS.js} +7 -7
  9. package/dist/_node-chunks/{chunk-YH2VABDS.js → chunk-3TW66YXG.js} +6 -6
  10. package/dist/_node-chunks/{chunk-QNHQNNV2.js → chunk-5BRYY6XB.js} +9 -9
  11. package/dist/_node-chunks/{chunk-IFCVXOGP.js → chunk-5GRHJJHD.js} +9 -9
  12. package/dist/_node-chunks/{chunk-62HH4XOF.js → chunk-5WQXPM6D.js} +6 -6
  13. package/dist/_node-chunks/{chunk-ZFBKUCCD.js → chunk-6TJUL42C.js} +14 -14
  14. package/dist/_node-chunks/{chunk-PI4OGMRN.js → chunk-7B4JYHGV.js} +6 -6
  15. package/dist/_node-chunks/{chunk-YSCJXVR2.js → chunk-COGO4JMD.js} +7 -7
  16. package/dist/_node-chunks/{chunk-5U7Q4G4A.js → chunk-DTM4A3DJ.js} +76 -19
  17. package/dist/_node-chunks/{chunk-VUL47RCU.js → chunk-DYQ6QR45.js} +15 -15
  18. package/dist/_node-chunks/{chunk-J4ASSZ5N.js → chunk-IJ34563N.js} +32 -32
  19. package/dist/_node-chunks/{chunk-HQCIQ33W.js → chunk-JWL5NLJU.js} +6 -6
  20. package/dist/_node-chunks/{chunk-GJU4KX6X.js → chunk-LEZENLG7.js} +7 -7
  21. package/dist/_node-chunks/chunk-LOXLI4XT.js +20 -0
  22. package/dist/_node-chunks/{chunk-2BHMURQI.js → chunk-MLYPMYG5.js} +6 -6
  23. package/dist/_node-chunks/{chunk-TNAUD72T.js → chunk-Q6WPGVIW.js} +6 -6
  24. package/dist/_node-chunks/{chunk-XKPOBYPY.js → chunk-S7FIFCTX.js} +18 -18
  25. package/dist/_node-chunks/{chunk-AQ5XNGJR.js → chunk-TTGXODEY.js} +7 -7
  26. package/dist/_node-chunks/chunk-UFXCGC4W.js +23 -0
  27. package/dist/_node-chunks/{chunk-YIC767NR.js → chunk-UNHOAAXU.js} +7 -7
  28. package/dist/_node-chunks/{chunk-OKIXNWVU.js → chunk-VJFHZL2T.js} +8 -8
  29. package/dist/_node-chunks/{chunk-IBLK5VBI.js → chunk-WKC523P7.js} +7 -7
  30. package/dist/_node-chunks/chunk-X4YDIHYE.js +61 -0
  31. package/dist/_node-chunks/{chunk-JCHPJOPI.js → chunk-ZKB7MQRR.js} +8 -8
  32. package/dist/_node-chunks/{dist-JJEWCMVH.js → dist-GICI6ZHU.js} +9 -9
  33. package/dist/_node-chunks/{globby-VLMVNFI7.js → globby-FWMT4OOQ.js} +9 -9
  34. package/dist/_node-chunks/{lib-FXIHPQYY.js → lib-YCGXIMW5.js} +7 -7
  35. package/dist/_node-chunks/{mdx-N42X6CFJ-MYO6PQF5.js → mdx-N42X6CFJ-CRGM5LTU.js} +8 -8
  36. package/dist/_node-chunks/{p-limit-OTUUNSPQ.js → p-limit-UJIYI4QT.js} +7 -7
  37. package/dist/babel/index.js +10 -10
  38. package/dist/bin/core.js +12 -12
  39. package/dist/bin/dispatcher.js +11 -11
  40. package/dist/bin/loader.js +9 -9
  41. package/dist/cli/index.d.ts +0 -1
  42. package/dist/cli/index.js +18 -18
  43. package/dist/common/index.js +19 -19
  44. package/dist/core-server/index.js +259 -633
  45. package/dist/core-server/presets/common-override-preset.js +9 -9
  46. package/dist/core-server/presets/common-preset.js +27 -29
  47. package/dist/csf/index.d.ts +41 -11
  48. package/dist/csf/index.js +8 -4
  49. package/dist/csf-tools/index.js +9 -9
  50. package/dist/manager/globals-runtime.js +6 -6
  51. package/dist/manager/runtime.js +1 -1
  52. package/dist/manager-api/index.js +7 -7
  53. package/dist/mocking-utils/index.js +8 -8
  54. package/dist/node-logger/index.js +9 -9
  55. package/dist/preview/runtime.js +7 -7
  56. package/dist/preview-api/index.js +1 -1
  57. package/dist/preview-errors.js +1 -1
  58. package/dist/server-errors.js +11 -11
  59. package/dist/telemetry/index.d.ts +9 -2
  60. package/dist/telemetry/index.js +27 -25
  61. package/dist/viewport/index.d.ts +3 -3
  62. package/package.json +2 -2
  63. package/dist/_node-chunks/chunk-2WJTWJRY.js +0 -20
  64. package/dist/_node-chunks/chunk-3SDF3TBW.js +0 -18
  65. package/dist/_node-chunks/chunk-6COWUVY6.js +0 -23
  66. package/dist/_node-chunks/chunk-7YD5E5Y5.js +0 -72
  67. package/dist/_node-chunks/chunk-GE3TP4E7.js +0 -61
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_teykolgptq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_teykolgptq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_teykolgptq from "node:module";
1
+ import CJS_COMPAT_NODE_URL_3bfbtrdgjix from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_3bfbtrdgjix from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_3bfbtrdgjix from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_teykolgptq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_teykolgptq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_teykolgptq.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_3bfbtrdgjix.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_3bfbtrdgjix.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_3bfbtrdgjix.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -14,6 +14,9 @@ import {
14
14
  addToGlobalContext,
15
15
  cleanPaths,
16
16
  computeStorybookMetadata,
17
+ getLastEvents,
18
+ getPrecedingUpgrade,
19
+ getSessionId,
17
20
  getStorybookMetadata,
18
21
  isExampleStoryId,
19
22
  metaFrameworks,
@@ -22,31 +25,30 @@ import {
22
25
  sanitizeAddonName,
23
26
  sanitizeError,
24
27
  telemetry
25
- } from "../_node-chunks/chunk-5U7Q4G4A.js";
26
- import "../_node-chunks/chunk-3SDF3TBW.js";
27
- import "../_node-chunks/chunk-J4ASSZ5N.js";
28
- import "../_node-chunks/chunk-GE3TP4E7.js";
29
- import "../_node-chunks/chunk-IBLK5VBI.js";
30
- import "../_node-chunks/chunk-JCHPJOPI.js";
31
- import {
32
- getPrecedingUpgrade
33
- } from "../_node-chunks/chunk-7YD5E5Y5.js";
34
- import "../_node-chunks/chunk-IFCVXOGP.js";
35
- import "../_node-chunks/chunk-YH2VABDS.js";
36
- import "../_node-chunks/chunk-RMPSZ2MA.js";
37
- import "../_node-chunks/chunk-2BHMURQI.js";
38
- import "../_node-chunks/chunk-PI4OGMRN.js";
39
- import "../_node-chunks/chunk-5UF6URLY.js";
40
- import "../_node-chunks/chunk-2WJTWJRY.js";
41
- import "../_node-chunks/chunk-AQ5XNGJR.js";
42
- import "../_node-chunks/chunk-T53OKK5L.js";
43
- import "../_node-chunks/chunk-62HH4XOF.js";
28
+ } from "../_node-chunks/chunk-DTM4A3DJ.js";
29
+ import "../_node-chunks/chunk-2ANLCK4Y.js";
30
+ import "../_node-chunks/chunk-IJ34563N.js";
31
+ import "../_node-chunks/chunk-X4YDIHYE.js";
32
+ import "../_node-chunks/chunk-WKC523P7.js";
33
+ import "../_node-chunks/chunk-ZKB7MQRR.js";
34
+ import "../_node-chunks/chunk-5GRHJJHD.js";
35
+ import "../_node-chunks/chunk-3TW66YXG.js";
36
+ import "../_node-chunks/chunk-2OC7H5MZ.js";
37
+ import "../_node-chunks/chunk-MLYPMYG5.js";
38
+ import "../_node-chunks/chunk-7B4JYHGV.js";
39
+ import "../_node-chunks/chunk-3K6P75SS.js";
40
+ import "../_node-chunks/chunk-LOXLI4XT.js";
41
+ import "../_node-chunks/chunk-TTGXODEY.js";
42
+ import "../_node-chunks/chunk-2KSITKBI.js";
43
+ import "../_node-chunks/chunk-5WQXPM6D.js";
44
44
  export {
45
45
  ErrorCollector,
46
46
  addToGlobalContext,
47
47
  cleanPaths,
48
48
  computeStorybookMetadata,
49
+ getLastEvents,
49
50
  getPrecedingUpgrade,
51
+ getSessionId,
50
52
  getStorybookMetadata,
51
53
  isExampleStoryId,
52
54
  metaFrameworks,
@@ -34,10 +34,10 @@ interface ViewportParameters {
34
34
  */
35
35
  viewport?: {
36
36
  /**
37
- * Remove the addon panel and disable the addon's behavior . If you wish to turn off this addon
38
- * for the entire Storybook, you should do so when registering addon-essentials
37
+ * Removes the tool and disables the feature's behavior. If you wish to turn off this feature
38
+ * for the entire Storybook, you can set the option in your `main.js|ts` configuration file.
39
39
  *
40
- * @see https://storybook.js.org/docs/essentials/index#disabling-addons
40
+ * @see https://storybook.js.org/docs/essentials/viewport#disable
41
41
  */
42
42
  disable?: boolean;
43
43
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook",
3
- "version": "10.2.0-alpha.6",
3
+ "version": "10.2.0-alpha.8",
4
4
  "description": "Storybook: Develop, document, and test UI components in isolation",
5
5
  "keywords": [
6
6
  "storybook",
@@ -201,6 +201,7 @@
201
201
  "@vitest/expect": "3.2.4",
202
202
  "@vitest/spy": "3.2.4",
203
203
  "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 || ^0.26.0 || ^0.27.0",
204
+ "open": "^10.2.0",
204
205
  "recast": "^0.23.5",
205
206
  "semver": "^7.6.2",
206
207
  "use-sync-external-store": "^1.5.0",
@@ -294,7 +295,6 @@
294
295
  "modern-tar": "^0.5.5",
295
296
  "nanoid": "^4.0.2",
296
297
  "npmlog": "^7.0.0",
297
- "open": "^10.2.0",
298
298
  "p-limit": "^6.2.0",
299
299
  "package-manager-detector": "^1.1.0",
300
300
  "picocolors": "^1.1.0",
@@ -1,20 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_teykolgptq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_teykolgptq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_teykolgptq from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_teykolgptq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_teykolgptq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_teykolgptq.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
- // ../../node_modules/slash/index.js
14
- function slash(path) {
15
- return path.startsWith("\\\\?\\") ? path : path.replace(/\\/g, "/");
16
- }
17
-
18
- export {
19
- slash
20
- };
@@ -1,18 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_teykolgptq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_teykolgptq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_teykolgptq from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_teykolgptq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_teykolgptq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_teykolgptq.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
- // package.json
14
- var version = "10.2.0-alpha.6";
15
-
16
- export {
17
- version
18
- };
@@ -1,23 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_teykolgptq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_teykolgptq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_teykolgptq from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_teykolgptq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_teykolgptq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_teykolgptq.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- import {
13
- any
14
- } from "./chunk-YH2VABDS.js";
15
-
16
- // src/cli/detect.ts
17
- async function detectPnp() {
18
- return !!any([".pnp.js", ".pnp.cjs"]);
19
- }
20
-
21
- export {
22
- detectPnp
23
- };
@@ -1,72 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_teykolgptq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_teykolgptq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_teykolgptq from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_teykolgptq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_teykolgptq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_teykolgptq.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
- // src/telemetry/event-cache.ts
14
- import { cache } from "storybook/internal/common";
15
- var operation = Promise.resolve(), setHelper = async (eventType, body) => {
16
- let lastEvents = await cache.get("lastEvents") || {};
17
- lastEvents[eventType] = { body, timestamp: Date.now() }, await cache.set("lastEvents", lastEvents);
18
- }, set = async (eventType, body) => (await operation, operation = setHelper(eventType, body), operation);
19
- var getLastEvents = async () => (await operation, await cache.get("lastEvents") || {}), upgradeFields = (event) => {
20
- let { body, timestamp } = event;
21
- return {
22
- timestamp,
23
- eventType: body?.eventType,
24
- eventId: body?.eventId,
25
- sessionId: body?.sessionId
26
- };
27
- }, UPGRADE_EVENTS = ["init", "upgrade"], RUN_EVENTS = ["build", "dev", "error"], lastEvent = (lastEvents, eventTypes) => {
28
- let descendingEvents = eventTypes.map((eventType) => lastEvents?.[eventType]).filter(Boolean).sort((a, b) => b.timestamp - a.timestamp);
29
- return descendingEvents.length > 0 ? descendingEvents[0] : void 0;
30
- }, getPrecedingUpgrade = async (events = void 0) => {
31
- let lastEvents = events || await cache.get("lastEvents") || {}, lastUpgradeEvent = lastEvent(lastEvents, UPGRADE_EVENTS), lastRunEvent = lastEvent(lastEvents, RUN_EVENTS);
32
- if (lastUpgradeEvent)
33
- return !lastRunEvent?.timestamp || lastUpgradeEvent.timestamp > lastRunEvent.timestamp ? upgradeFields(lastUpgradeEvent) : void 0;
34
- };
35
-
36
- // ../../node_modules/nanoid/index.js
37
- import { randomFillSync } from "crypto";
38
-
39
- // ../../node_modules/nanoid/url-alphabet/index.js
40
- var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
41
-
42
- // ../../node_modules/nanoid/index.js
43
- var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset, fillPool = (bytes) => {
44
- !pool || pool.length < bytes ? (pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER), randomFillSync(pool), poolOffset = 0) : poolOffset + bytes > pool.length && (randomFillSync(pool), poolOffset = 0), poolOffset += bytes;
45
- };
46
- var nanoid = (size = 21) => {
47
- fillPool(size -= 0);
48
- let id = "";
49
- for (let i = poolOffset - size; i < poolOffset; i++)
50
- id += urlAlphabet[pool[i] & 63];
51
- return id;
52
- };
53
-
54
- // src/telemetry/session-id.ts
55
- import { cache as cache2 } from "storybook/internal/common";
56
- var SESSION_TIMEOUT = 1e3 * 60 * 60 * 2, sessionId;
57
- var getSessionId = async () => {
58
- let now = Date.now();
59
- if (!sessionId) {
60
- let session = await cache2.get("session");
61
- session && session.lastUsed >= now - SESSION_TIMEOUT ? sessionId = session.id : sessionId = nanoid();
62
- }
63
- return await cache2.set("session", { id: sessionId, lastUsed: now }), sessionId;
64
- };
65
-
66
- export {
67
- nanoid,
68
- set,
69
- getLastEvents,
70
- getPrecedingUpgrade,
71
- getSessionId
72
- };
@@ -1,61 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_teykolgptq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_teykolgptq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_teykolgptq from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_teykolgptq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_teykolgptq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_teykolgptq.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
-
13
- // src/common/versions.ts
14
- var versions_default = {
15
- "@storybook/addon-a11y": "10.2.0-alpha.6",
16
- "@storybook/addon-docs": "10.2.0-alpha.6",
17
- "@storybook/addon-links": "10.2.0-alpha.6",
18
- "@storybook/addon-onboarding": "10.2.0-alpha.6",
19
- "storybook-addon-pseudo-states": "10.2.0-alpha.6",
20
- "@storybook/addon-themes": "10.2.0-alpha.6",
21
- "@storybook/addon-vitest": "10.2.0-alpha.6",
22
- "@storybook/builder-vite": "10.2.0-alpha.6",
23
- "@storybook/builder-webpack5": "10.2.0-alpha.6",
24
- storybook: "10.2.0-alpha.6",
25
- "@storybook/angular": "10.2.0-alpha.6",
26
- "@storybook/ember": "10.2.0-alpha.6",
27
- "@storybook/html-vite": "10.2.0-alpha.6",
28
- "@storybook/nextjs": "10.2.0-alpha.6",
29
- "@storybook/nextjs-vite": "10.2.0-alpha.6",
30
- "@storybook/preact-vite": "10.2.0-alpha.6",
31
- "@storybook/react-native-web-vite": "10.2.0-alpha.6",
32
- "@storybook/react-vite": "10.2.0-alpha.6",
33
- "@storybook/react-webpack5": "10.2.0-alpha.6",
34
- "@storybook/server-webpack5": "10.2.0-alpha.6",
35
- "@storybook/svelte-vite": "10.2.0-alpha.6",
36
- "@storybook/sveltekit": "10.2.0-alpha.6",
37
- "@storybook/vue3-vite": "10.2.0-alpha.6",
38
- "@storybook/web-components-vite": "10.2.0-alpha.6",
39
- sb: "10.2.0-alpha.6",
40
- "@storybook/cli": "10.2.0-alpha.6",
41
- "@storybook/codemod": "10.2.0-alpha.6",
42
- "@storybook/core-webpack": "10.2.0-alpha.6",
43
- "create-storybook": "10.2.0-alpha.6",
44
- "@storybook/csf-plugin": "10.2.0-alpha.6",
45
- "eslint-plugin-storybook": "10.2.0-alpha.6",
46
- "@storybook/react-dom-shim": "10.2.0-alpha.6",
47
- "@storybook/preset-create-react-app": "10.2.0-alpha.6",
48
- "@storybook/preset-react-webpack": "10.2.0-alpha.6",
49
- "@storybook/preset-server-webpack": "10.2.0-alpha.6",
50
- "@storybook/html": "10.2.0-alpha.6",
51
- "@storybook/preact": "10.2.0-alpha.6",
52
- "@storybook/react": "10.2.0-alpha.6",
53
- "@storybook/server": "10.2.0-alpha.6",
54
- "@storybook/svelte": "10.2.0-alpha.6",
55
- "@storybook/vue3": "10.2.0-alpha.6",
56
- "@storybook/web-components": "10.2.0-alpha.6"
57
- };
58
-
59
- export {
60
- versions_default
61
- };