@storybook/html 11.0.0-alpha.6 → 11.0.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.
|
@@ -40,7 +40,7 @@ var { Node } = global, render = (args, context) => {
|
|
|
40
40
|
Received: ${Component}
|
|
41
41
|
`), new Error(`Unable to render story ${id}`);
|
|
42
42
|
};
|
|
43
|
-
function renderToCanvas({ storyFn,
|
|
43
|
+
function renderToCanvas({ storyFn, title, name, showMain, showError, forceRemount }, canvasElement) {
|
|
44
44
|
let element = storyFn();
|
|
45
45
|
if (showMain(), typeof element == "string")
|
|
46
46
|
canvasElement.innerHTML = element, simulatePageLoad(canvasElement);
|
|
@@ -50,7 +50,7 @@ function renderToCanvas({ storyFn, kind, name, showMain, showError, forceRemount
|
|
|
50
50
|
canvasElement.innerHTML = "", canvasElement.appendChild(element), simulateDOMContentLoaded();
|
|
51
51
|
} else
|
|
52
52
|
showError({
|
|
53
|
-
title: `Expecting an HTML snippet or DOM node from the story: "${name}" of "${
|
|
53
|
+
title: `Expecting an HTML snippet or DOM node from the story: "${name}" of "${title}".`,
|
|
54
54
|
description: dedent`
|
|
55
55
|
Did you forget to return the HTML snippet from the story?
|
|
56
56
|
Use "() => <your snippet or node>" or when defining the story.
|
package/dist/entry-preview.js
CHANGED
package/dist/index.js
CHANGED
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_sbberiyktys from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_sbberiyktys from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_sbberiyktys from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_sbberiyktys.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_sbberiyktys.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_sbberiyktys.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/html",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.7",
|
|
4
4
|
"description": "Storybook HTML renderer: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@storybook/global": "^5.0.0",
|
|
48
|
-
"ts-dedent": "^2.
|
|
48
|
+
"ts-dedent": "^2.2.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"typescript": "^6.0.3"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"storybook": "^11.0.0-alpha.
|
|
54
|
+
"storybook": "^11.0.0-alpha.7"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|