storybook 10.2.0-alpha.14 → 10.2.0-alpha.15

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 (74) hide show
  1. package/dist/_browser-chunks/{chunk-3PJE6VLG.js → chunk-ASKQZAOS.js} +1 -12
  2. package/dist/_browser-chunks/{chunk-BGSDJMFM.js → chunk-NVLTWT3B.js} +18 -6
  3. package/dist/_node-chunks/{builder-manager-5XVPVHCY.js → builder-manager-SOKYB5NF.js} +12 -12
  4. package/dist/_node-chunks/{camelcase-FFGUJRYA.js → camelcase-SXQWF7PW.js} +7 -7
  5. package/dist/_node-chunks/{chunk-5QADKW4W.js → chunk-274OMYGE.js} +20 -20
  6. package/dist/_node-chunks/{chunk-CMIHYY2B.js → chunk-2BHD5YKF.js} +6 -6
  7. package/dist/_node-chunks/{chunk-GCGJVMS3.js → chunk-2FQAOAQ6.js} +12 -12
  8. package/dist/_node-chunks/{chunk-MBD6J24T.js → chunk-45UIB4YF.js} +7 -7
  9. package/dist/_node-chunks/{chunk-BVSGQAFJ.js → chunk-4GKVZO2T.js} +9 -9
  10. package/dist/_node-chunks/{chunk-E6HZLFOP.js → chunk-5KEIALUH.js} +6 -6
  11. package/dist/_node-chunks/{chunk-WSH26TMB.js → chunk-6SIUW3HU.js} +12 -12
  12. package/dist/_node-chunks/{chunk-OYPD7MWQ.js → chunk-AIIQJ6UR.js} +7 -7
  13. package/dist/_node-chunks/{chunk-GCZN63RS.js → chunk-BOY3TNPC.js} +9 -9
  14. package/dist/_node-chunks/{chunk-QMQVY3KQ.js → chunk-BRW7NFUP.js} +7 -7
  15. package/dist/_node-chunks/{chunk-AAS5TNPH.js → chunk-E3Y5MHXD.js} +7 -7
  16. package/dist/_node-chunks/{chunk-APXUJGPH.js → chunk-ENNDE4GC.js} +10 -10
  17. package/dist/_node-chunks/{chunk-AKBKA7MR.js → chunk-FKBWQGIF.js} +6 -6
  18. package/dist/_node-chunks/{chunk-HCZ44VWL.js → chunk-HFKM7JHQ.js} +6 -6
  19. package/dist/_node-chunks/{chunk-HMYS7PGR.js → chunk-K4YVLJRS.js} +6 -6
  20. package/dist/_node-chunks/{chunk-QIMAARKG.js → chunk-KNGN3UEO.js} +7 -7
  21. package/dist/_node-chunks/{chunk-YTUKBZV2.js → chunk-MD52RVZX.js} +7 -7
  22. package/dist/_node-chunks/chunk-MM7Z4SG7.js +23 -0
  23. package/dist/_node-chunks/{chunk-3VHD3RGW.js → chunk-MQZLLJRG.js} +8 -8
  24. package/dist/_node-chunks/{chunk-XDKXHH75.js → chunk-PI7P5HFH.js} +13 -13
  25. package/dist/_node-chunks/{chunk-NTVADDN6.js → chunk-Q6WUEJ4S.js} +6 -6
  26. package/dist/_node-chunks/{chunk-YUBIHW7G.js → chunk-QPKBPYOY.js} +7 -7
  27. package/dist/_node-chunks/{chunk-2YADPD4P.js → chunk-RGWB6DD7.js} +6 -6
  28. package/dist/_node-chunks/{chunk-TXHI4M3M.js → chunk-SZWIX5YC.js} +9 -9
  29. package/dist/_node-chunks/{chunk-6GTCCSGS.js → chunk-T57UCO67.js} +7 -7
  30. package/dist/_node-chunks/{chunk-JFZSVDUQ.js → chunk-TN3Q52LO.js} +6 -6
  31. package/dist/_node-chunks/chunk-TYSSQECX.js +61 -0
  32. package/dist/_node-chunks/chunk-YP34ARUD.js +18 -0
  33. package/dist/_node-chunks/{globby-WIEDAEV7.js → globby-LGQ5P2JB.js} +9 -9
  34. package/dist/_node-chunks/{lib-2RMM65EQ.js → lib-5LBLULG3.js} +7 -7
  35. package/dist/_node-chunks/{mdx-N42X6CFJ-AFWG3A6F.js → mdx-N42X6CFJ-TAPL5IEO.js} +8 -8
  36. package/dist/_node-chunks/{p-limit-JNVCICJD.js → p-limit-GTMOHYQF.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 +176 -176
  42. package/dist/cli/index.js +18 -18
  43. package/dist/common/index.js +19 -19
  44. package/dist/components/index.d.ts +1 -0
  45. package/dist/components/index.js +167 -166
  46. package/dist/core-events/index.d.ts +4 -4
  47. package/dist/core-server/index.d.ts +11 -1
  48. package/dist/core-server/index.js +217 -76
  49. package/dist/core-server/presets/common-manager.js +176 -134
  50. package/dist/core-server/presets/common-override-preset.js +9 -9
  51. package/dist/core-server/presets/common-preset.js +27 -26
  52. package/dist/csf/index.d.ts +8 -6
  53. package/dist/csf/index.js +1 -1
  54. package/dist/csf-tools/index.js +10 -10
  55. package/dist/docs-tools/index.d.ts +2 -2
  56. package/dist/manager/globals-runtime.js +97 -94
  57. package/dist/manager/runtime.js +1755 -985
  58. package/dist/manager-api/index.d.ts +1 -1
  59. package/dist/manager-api/index.js +10 -8
  60. package/dist/mocking-utils/index.js +8 -8
  61. package/dist/node-logger/index.js +9 -9
  62. package/dist/preview/runtime.js +18 -6
  63. package/dist/preview-api/index.d.ts +67 -68
  64. package/dist/preview-api/index.js +1 -1
  65. package/dist/server-errors.js +11 -11
  66. package/dist/telemetry/index.js +22 -22
  67. package/dist/types/index.d.ts +12 -6
  68. package/dist/viewport/index.d.ts +5 -3
  69. package/dist/viewport/index.js +12 -3
  70. package/package.json +2 -2
  71. package/dist/_node-chunks/chunk-N72VKZTH.js +0 -23
  72. package/dist/_node-chunks/chunk-NKHFAHA7.js +0 -18
  73. package/dist/_node-chunks/chunk-ZJ3OV7OO.js +0 -61
  74. package/dist/_node-chunks/dist-OBG2P3MZ.js +0 -121
@@ -1,61 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_bgtyoteey4s from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_bgtyoteey4s from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_bgtyoteey4s from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_bgtyoteey4s.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_bgtyoteey4s.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_bgtyoteey4s.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.14",
16
- "@storybook/addon-docs": "10.2.0-alpha.14",
17
- "@storybook/addon-links": "10.2.0-alpha.14",
18
- "@storybook/addon-onboarding": "10.2.0-alpha.14",
19
- "storybook-addon-pseudo-states": "10.2.0-alpha.14",
20
- "@storybook/addon-themes": "10.2.0-alpha.14",
21
- "@storybook/addon-vitest": "10.2.0-alpha.14",
22
- "@storybook/builder-vite": "10.2.0-alpha.14",
23
- "@storybook/builder-webpack5": "10.2.0-alpha.14",
24
- storybook: "10.2.0-alpha.14",
25
- "@storybook/angular": "10.2.0-alpha.14",
26
- "@storybook/ember": "10.2.0-alpha.14",
27
- "@storybook/html-vite": "10.2.0-alpha.14",
28
- "@storybook/nextjs": "10.2.0-alpha.14",
29
- "@storybook/nextjs-vite": "10.2.0-alpha.14",
30
- "@storybook/preact-vite": "10.2.0-alpha.14",
31
- "@storybook/react-native-web-vite": "10.2.0-alpha.14",
32
- "@storybook/react-vite": "10.2.0-alpha.14",
33
- "@storybook/react-webpack5": "10.2.0-alpha.14",
34
- "@storybook/server-webpack5": "10.2.0-alpha.14",
35
- "@storybook/svelte-vite": "10.2.0-alpha.14",
36
- "@storybook/sveltekit": "10.2.0-alpha.14",
37
- "@storybook/vue3-vite": "10.2.0-alpha.14",
38
- "@storybook/web-components-vite": "10.2.0-alpha.14",
39
- sb: "10.2.0-alpha.14",
40
- "@storybook/cli": "10.2.0-alpha.14",
41
- "@storybook/codemod": "10.2.0-alpha.14",
42
- "@storybook/core-webpack": "10.2.0-alpha.14",
43
- "create-storybook": "10.2.0-alpha.14",
44
- "@storybook/csf-plugin": "10.2.0-alpha.14",
45
- "eslint-plugin-storybook": "10.2.0-alpha.14",
46
- "@storybook/react-dom-shim": "10.2.0-alpha.14",
47
- "@storybook/preset-create-react-app": "10.2.0-alpha.14",
48
- "@storybook/preset-react-webpack": "10.2.0-alpha.14",
49
- "@storybook/preset-server-webpack": "10.2.0-alpha.14",
50
- "@storybook/html": "10.2.0-alpha.14",
51
- "@storybook/preact": "10.2.0-alpha.14",
52
- "@storybook/react": "10.2.0-alpha.14",
53
- "@storybook/server": "10.2.0-alpha.14",
54
- "@storybook/svelte": "10.2.0-alpha.14",
55
- "@storybook/vue3": "10.2.0-alpha.14",
56
- "@storybook/web-components": "10.2.0-alpha.14"
57
- };
58
-
59
- export {
60
- versions_default
61
- };
@@ -1,121 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_bgtyoteey4s from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_bgtyoteey4s from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_bgtyoteey4s from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_bgtyoteey4s.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_bgtyoteey4s.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_bgtyoteey4s.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- import {
13
- toEstree
14
- } from "./chunk-QIMAARKG.js";
15
- import "./chunk-E6HZLFOP.js";
16
-
17
- // ../../node_modules/@storybook/docs-mdx/dist/index.js
18
- var getAttr = (elt, what) => elt.attributes.find((n) => n.type === "JSXAttribute" && n.name.name === what), getAttrValue = (elt, what) => getAttr(elt, what)?.value, getAttrLiteral = (elt, what) => {
19
- let attrValue = getAttrValue(elt, what);
20
- if (attrValue) {
21
- if (attrValue.type === "Literal")
22
- return attrValue.value;
23
- throw new Error(`Expected string literal ${what}, received ${attrValue.type}`);
24
- }
25
- }, getOf = (elt, varToImport) => {
26
- let ofAttrValue = getAttrValue(elt, "of");
27
- if (ofAttrValue)
28
- if (ofAttrValue.type === "JSXExpressionContainer") {
29
- let of = ofAttrValue.expression;
30
- if (of?.type === "Identifier") {
31
- let importName = varToImport[of.name];
32
- if (importName)
33
- return importName;
34
- throw new Error(`Unknown identifier ${of.name}`);
35
- } else
36
- throw new Error(`Expected identifier, received ${of.type}`);
37
- } else
38
- throw new Error(`Expected JSX expression, received ${ofAttrValue.type}`);
39
- }, getTags = (elt) => {
40
- let tagsAttr = getAttr(elt, "tags");
41
- if (!tagsAttr)
42
- return;
43
- let tagsContainer = tagsAttr.value;
44
- if (tagsContainer.type === "JSXExpressionContainer") {
45
- let tagsArray = tagsContainer.expression;
46
- if (tagsArray.type === "ArrayExpression")
47
- return tagsArray.elements.map((tag) => {
48
- if (tag.type === "Literal" && typeof tag.value == "string")
49
- return tag.value;
50
- throw new Error(`Expected string literal tag, received ${tag.type}`);
51
- });
52
- throw new Error(`Expected tags array, received ${tagsArray.type}`);
53
- } else
54
- throw new Error(`Expected JSX expression tags, received ${tagsContainer.type}`);
55
- }, getIsTemplate = (elt) => {
56
- let isTemplateAttr = getAttr(elt, "isTemplate");
57
- if (!isTemplateAttr)
58
- return !1;
59
- let isTemplate = isTemplateAttr.value;
60
- if (isTemplate == null)
61
- return !0;
62
- if (isTemplate.type === "JSXExpressionContainer") {
63
- let expression = isTemplate.expression;
64
- if (expression.type === "Literal" && typeof expression.value == "boolean")
65
- return expression.value;
66
- throw new Error(`Expected boolean isTemplate, received ${typeof expression.value}`);
67
- } else
68
- throw new Error(`Expected expression isTemplate, received ${isTemplate.type}`);
69
- }, extractTitle = (root, varToImport) => {
70
- let result = { title: void 0, of: void 0, name: void 0, isTemplate: !1 }, fragments = root.body.filter(
71
- (child) => child.type === "ExpressionStatement" && child.expression.type === "JSXFragment"
72
- );
73
- if (fragments.length > 1)
74
- throw new Error("duplicate contents");
75
- return fragments.length === 0 || fragments[0].expression.children.forEach((child) => {
76
- if (child.type === "JSXElement") {
77
- let { openingElement } = child;
78
- if (openingElement.name.name === "Meta") {
79
- if (result.title || result.name || result.of)
80
- throw new Error("Meta can only be declared once");
81
- result.title = getAttrLiteral(openingElement, "title"), result.name = getAttrLiteral(openingElement, "name"), result.of = getOf(openingElement, varToImport), result.isTemplate = getIsTemplate(openingElement), result.metaTags = getTags(openingElement);
82
- }
83
- } else if (child.type !== "JSXExpressionContainer")
84
- throw new Error(`Unexpected JSX child: ${child.type}`);
85
- }), result;
86
- }, extractImports = (root) => {
87
- let varToImport = {};
88
- return root.body.forEach((child) => {
89
- if (child.type === "ImportDeclaration") {
90
- let { source, specifiers } = child;
91
- if (source.type === "Literal")
92
- specifiers.forEach((s) => {
93
- varToImport[s.local.name] = source.value.toString();
94
- });
95
- else
96
- throw new Error("MDX: unexpected import source");
97
- }
98
- }), varToImport;
99
- }, plugin = (store) => (root) => {
100
- let estree = toEstree(root), varToImport = extractImports(estree), { title, of, name, isTemplate, metaTags } = extractTitle(estree, varToImport);
101
- return store.title = title, store.of = of, store.name = name, store.isTemplate = isTemplate, store.metaTags = metaTags, store.imports = Array.from(new Set(Object.values(varToImport))), root;
102
- }, analyze = async (code) => {
103
- let store = {
104
- title: void 0,
105
- of: void 0,
106
- name: void 0,
107
- isTemplate: !1,
108
- metaTags: void 0,
109
- imports: void 0
110
- }, { compile } = await import("./mdx-N42X6CFJ-AFWG3A6F.js");
111
- await compile(code, {
112
- rehypePlugins: [[plugin, store]]
113
- });
114
- let { title, of, name, isTemplate, metaTags, imports = [] } = store;
115
- return { title, of, name, isTemplate, metaTags, imports };
116
- };
117
- export {
118
- analyze,
119
- extractImports,
120
- plugin
121
- };