@storybook/react 10.2.0-alpha.6 → 10.2.0-alpha.7
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.
- package/dist/_browser-chunks/{chunk-Q7AKY2FO.js → chunk-BMWJYMA6.js} +1 -1
- package/dist/_browser-chunks/{chunk-34HS64JJ.js → chunk-GLRRNWDU.js} +1 -1
- package/dist/entry-preview.js +1 -1
- package/dist/index.js +2 -2
- package/dist/preset.js +11 -11
- package/dist/preview.js +2 -2
- package/package.json +3 -3
|
@@ -158,7 +158,7 @@ var decorators = [
|
|
|
158
158
|
(story, context) => {
|
|
159
159
|
if (context.tags?.includes("test-fn") && !global2.FEATURES?.experimentalTestSyntax)
|
|
160
160
|
throw new Error(
|
|
161
|
-
"To use the experimental test function, you must enable the experimentalTestSyntax feature flag. See https://storybook.js.org/docs/
|
|
161
|
+
"To use the experimental test function, you must enable the experimentalTestSyntax feature flag. See https://storybook.js.org/docs/api/main-config/main-config-features#experimentaltestsyntax"
|
|
162
162
|
);
|
|
163
163
|
return story();
|
|
164
164
|
}
|
package/dist/entry-preview.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__definePreview
|
|
3
|
-
} from "./_browser-chunks/chunk-
|
|
3
|
+
} from "./_browser-chunks/chunk-BMWJYMA6.js";
|
|
4
4
|
import {
|
|
5
5
|
entry_preview_exports,
|
|
6
6
|
renderToCanvas
|
|
7
|
-
} from "./_browser-chunks/chunk-
|
|
7
|
+
} from "./_browser-chunks/chunk-GLRRNWDU.js";
|
|
8
8
|
import {
|
|
9
9
|
entry_preview_argtypes_exports
|
|
10
10
|
} from "./_browser-chunks/chunk-DX2KEMQY.js";
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4pqbwn0lhtr from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4pqbwn0lhtr from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4pqbwn0lhtr from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4pqbwn0lhtr.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4pqbwn0lhtr.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4pqbwn0lhtr.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -2998,13 +2998,13 @@ function getCodeSnippet(csf, storyName, componentName) {
|
|
|
2998
2998
|
return t.isFunctionDeclaration(fn) ? fn : t.variableDeclaration("const", [t.variableDeclarator(t.identifier(storyName), fn)]);
|
|
2999
2999
|
}
|
|
3000
3000
|
invariant(componentName, "Could not generate snippet without component name.");
|
|
3001
|
-
let invalidSpread = buildInvalidSpread(invalidEntries), name = t.jsxIdentifier(componentName), openingElAttrs = invalidSpread ? [...injectedAttrs, invalidSpread] : injectedAttrs, arrow = t.arrowFunctionExpression(
|
|
3001
|
+
let invalidSpread = buildInvalidSpread(invalidEntries), name = t.jsxIdentifier(componentName), openingElAttrs = invalidSpread ? [...injectedAttrs, invalidSpread] : injectedAttrs, children = toJsxChildren(merged.children), selfClosing = children.length === 0, arrow = t.arrowFunctionExpression(
|
|
3002
3002
|
[],
|
|
3003
3003
|
t.jsxElement(
|
|
3004
|
-
t.jsxOpeningElement(name, openingElAttrs,
|
|
3005
|
-
t.jsxClosingElement(name),
|
|
3006
|
-
|
|
3007
|
-
|
|
3004
|
+
t.jsxOpeningElement(name, openingElAttrs, selfClosing),
|
|
3005
|
+
selfClosing ? null : t.jsxClosingElement(name),
|
|
3006
|
+
children,
|
|
3007
|
+
selfClosing
|
|
3008
3008
|
)
|
|
3009
3009
|
);
|
|
3010
3010
|
return t.variableDeclaration("const", [t.variableDeclarator(t.identifier(storyName), arrow)]);
|
package/dist/preview.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__definePreview
|
|
3
|
-
} from "./_browser-chunks/chunk-
|
|
4
|
-
import "./_browser-chunks/chunk-
|
|
3
|
+
} from "./_browser-chunks/chunk-BMWJYMA6.js";
|
|
4
|
+
import "./_browser-chunks/chunk-GLRRNWDU.js";
|
|
5
5
|
import "./_browser-chunks/chunk-DX2KEMQY.js";
|
|
6
6
|
import "./_browser-chunks/chunk-CMP5DLKH.js";
|
|
7
7
|
import "./_browser-chunks/chunk-DDIRQRCA.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react",
|
|
3
|
-
"version": "10.2.0-alpha.
|
|
3
|
+
"version": "10.2.0-alpha.7",
|
|
4
4
|
"description": "Storybook React renderer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@storybook/global": "^5.0.0",
|
|
53
|
-
"@storybook/react-dom-shim": "10.2.0-alpha.
|
|
53
|
+
"@storybook/react-dom-shim": "10.2.0-alpha.7",
|
|
54
54
|
"react-docgen": "^8.0.2"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
79
79
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
80
|
-
"storybook": "^10.2.0-alpha.
|
|
80
|
+
"storybook": "^10.2.0-alpha.7",
|
|
81
81
|
"typescript": ">= 4.9.x"
|
|
82
82
|
},
|
|
83
83
|
"peerDependenciesMeta": {
|